vref_1_example#
Overview#
The vref example shows how to use the vref driver.
In this example, the adc16 module is initiealized and used to measure the VREF output voltage. So, it cannot use interal VREF as the reference voltage. Instead, it can use VDD_ANA or VREFH, for detailed information, please refer to device datasheet.
Then, user should configure the VREF output pin as the ADC16’s sample input. When running the project, it will measure the VREF output voltage under different trim value.
Note: This example is only used for platforms that have the UTRIM[TRIM2V1] function.
Supported Boards#
FRDM-MCXN236
Hardware requirements
Type-C USB cable
FRDM-MCXN236 board
Personal Computer
Board settings
Connect J8-12(P4_23) with J2-19(VREFO)
Prepare the Demo
Connect the type-c and mini USB cable between the PC host and the USB ports on the board.
Open a serial terminal on PC for the serial device with these settings:
115200 baud rate
8 data bits
No parity
One stop bit
No flow control
Download the program to the target board.
Either press the reset button on your board or launch the debugger in your IDE to begin running the demo.
Running the demo
The following lines are printed to the serial terminal when the demo program is executed.
VREF example
ADC Full Range: 65536
Default (Factory) trim value is :15
Use trim value: 0
ADC conversion result: 19861
Actual voltage on VREF_OUT: 1.000V
Use trim value: 1
ADC conversion result: 21827
Actual voltage on VREF_OUT: 1.099V
Use trim value: 2
ADC conversion result: 23812
Actual voltage on VREF_OUT: 1.199V
Use trim value: 3
ADC conversion result: 25792
Actual voltage on VREF_OUT: 1.299V
Use trim value: 4
ADC conversion result: 27776
Actual voltage on VREF_OUT: 1.399V
Use trim value: 5
ADC conversion result: 29741
Actual voltage on VREF_OUT: 1.498V
Use trim value: 6
ADC conversion result: 31790
Actual voltage on VREF_OUT: 1.601V
Use trim value: 7
ADC conversion result: 33734
Actual voltage on VREF_OUT: 1.699V
Use trim value: 8
ADC conversion result: 35763
Actual voltage on VREF_OUT: 1.801V
Use trim value: 9
ADC conversion result: 37699
Actual voltage on VREF_OUT: 1.898V
Use trim value: 10
ADC conversion result: 39667
Actual voltage on VREF_OUT: 1.997V
Use trim value: 11
ADC conversion result: 41632
Actual voltage on VREF_OUT: 2.096V
FRDM-MCXN947
Hardware requirements
Type-C USB cable
FRDM-MCXN947 Board
Personal Computer
Board settings
Connect J8-28(P4_23) with TP1(VREFO)
Prepare the Demo
Connect the type-c and mini USB cable between the PC host and the USB ports on the board.
Open a serial terminal on PC for the serial device with these settings:
115200 baud rate
8 data bits
No parity
One stop bit
No flow control
Download the program to the target board.
Either press the reset button on your board or launch the debugger in your IDE to begin running the demo.
Running the demo
The following lines are printed to the serial terminal when the demo program is executed.
VREF example
ADC Full Range: 65536
Default (Factory) trim value is :15
Use trim value: 0
ADC conversion result: 19861
Actual voltage on VREF_OUT: 1.000V
Use trim value: 1
ADC conversion result: 21827
Actual voltage on VREF_OUT: 1.099V
Use trim value: 2
ADC conversion result: 23812
Actual voltage on VREF_OUT: 1.199V
Use trim value: 3
ADC conversion result: 25792
Actual voltage on VREF_OUT: 1.299V
Use trim value: 4
ADC conversion result: 27776
Actual voltage on VREF_OUT: 1.399V
Use trim value: 5
ADC conversion result: 29741
Actual voltage on VREF_OUT: 1.498V
Use trim value: 6
ADC conversion result: 31790
Actual voltage on VREF_OUT: 1.601V
Use trim value: 7
ADC conversion result: 33734
Actual voltage on VREF_OUT: 1.699V
Use trim value: 8
ADC conversion result: 35763
Actual voltage on VREF_OUT: 1.801V
Use trim value: 9
ADC conversion result: 37699
Actual voltage on VREF_OUT: 1.898V
Use trim value: 10
ADC conversion result: 39667
Actual voltage on VREF_OUT: 1.997V
Use trim value: 11
ADC conversion result: 41632
Actual voltage on VREF_OUT: 2.096V
FRDM-MCXN947T
Hardware requirements
Type-C USB cable
FRDM-MCXN947T Board
Personal Computer
Board settings
Connect J8-28(P4_23) with TP1(VREFO)
Prepare the Demo
Connect the type-c and mini USB cable between the PC host and the USB ports on the board.
Open a serial terminal on PC for the serial device with these settings:
115200 baud rate
8 data bits
No parity
One stop bit
No flow control
Download the program to the target board.
Either press the reset button on your board or launch the debugger in your IDE to begin running the demo.
Running the demo
The following lines are printed to the serial terminal when the demo program is executed.
VREF example
ADC Full Range: 65536
Default (Factory) trim value is :15
Use trim value: 0
ADC conversion result: 19861
Actual voltage on VREF_OUT: 1.000V
Use trim value: 1
ADC conversion result: 21827
Actual voltage on VREF_OUT: 1.099V
Use trim value: 2
ADC conversion result: 23812
Actual voltage on VREF_OUT: 1.199V
Use trim value: 3
ADC conversion result: 25792
Actual voltage on VREF_OUT: 1.299V
Use trim value: 4
ADC conversion result: 27776
Actual voltage on VREF_OUT: 1.399V
Use trim value: 5
ADC conversion result: 29741
Actual voltage on VREF_OUT: 1.498V
Use trim value: 6
ADC conversion result: 31790
Actual voltage on VREF_OUT: 1.601V
Use trim value: 7
ADC conversion result: 33734
Actual voltage on VREF_OUT: 1.699V
Use trim value: 8
ADC conversion result: 35763
Actual voltage on VREF_OUT: 1.801V
Use trim value: 9
ADC conversion result: 37699
Actual voltage on VREF_OUT: 1.898V
Use trim value: 10
ADC conversion result: 39667
Actual voltage on VREF_OUT: 1.997V
Use trim value: 11
ADC conversion result: 41632
Actual voltage on VREF_OUT: 2.096V
FRDM-MCXW71
Hardware requirements
Type-C USB cable
FRDM-MCXW71 Board
Personal Computer
Board settings
Remove JP5 3-4,short JP5 5-6.
Prepare the Demo
Connect the micro and mini USB cable between the PC host and the USB ports on the board.
Open a serial terminal on PC for the serial device with these settings:
115200 baud rate
8 data bits
No parity
One stop bit
No flow control
Download the program to the target board.
Either press the reset button on your board or launch the debugger in your IDE to begin running the demo.
Running the demo
The following lines are printed to the serial terminal when the demo program is executed.
VREF example
ADC Full Range: 65536
Default (Factory) trim value is :15
Use trim value: 0
ADC conversion result: 19861
Actual voltage on VREF_OUT: 1.000V
Use trim value: 1
ADC conversion result: 21827
Actual voltage on VREF_OUT: 1.099V
Use trim value: 2
ADC conversion result: 23812
Actual voltage on VREF_OUT: 1.199V
Use trim value: 3
ADC conversion result: 25792
Actual voltage on VREF_OUT: 1.299V
Use trim value: 4
ADC conversion result: 27776
Actual voltage on VREF_OUT: 1.399V
Use trim value: 5
ADC conversion result: 29741
Actual voltage on VREF_OUT: 1.498V
Use trim value: 6
ADC conversion result: 31790
Actual voltage on VREF_OUT: 1.601V
Use trim value: 7
ADC conversion result: 33734
Actual voltage on VREF_OUT: 1.699V
Use trim value: 8
ADC conversion result: 35763
Actual voltage on VREF_OUT: 1.801V
Use trim value: 9
ADC conversion result: 37699
Actual voltage on VREF_OUT: 1.898V
Use trim value: 10
ADC conversion result: 39667
Actual voltage on VREF_OUT: 1.997V
Use trim value: 11
ADC conversion result: 41632
Actual voltage on VREF_OUT: 2.096V
MCX-W71-EVK
Hardware requirements
Type-C USB cable
MCX-W71-EVK Board
Personal Computer
Board settings
Remove JP5 3-4,short JP5 5-6.
Prepare the Demo
Connect a USB cable between the host PC and the EVK board J14.
Open a serial terminal on PC for the serial device with these settings:
115200 baud rate
8 data bits
No parity
One stop bit
No flow control
Download the program to the target board.
Either press the reset button on your board or launch the debugger in your IDE to begin running the demo.
Running the demo
The following lines are printed to the serial terminal when the demo program is executed.
VREF example
ADC Full Range: 65536
Default (Factory) trim value is :15
Use trim value: 0
ADC conversion result: 19861
Actual voltage on VREF_OUT: 1.000V
Use trim value: 1
ADC conversion result: 21827
Actual voltage on VREF_OUT: 1.099V
Use trim value: 2
ADC conversion result: 23812
Actual voltage on VREF_OUT: 1.199V
Use trim value: 3
ADC conversion result: 25792
Actual voltage on VREF_OUT: 1.299V
Use trim value: 4
ADC conversion result: 27776
Actual voltage on VREF_OUT: 1.399V
Use trim value: 5
ADC conversion result: 29741
Actual voltage on VREF_OUT: 1.498V
Use trim value: 6
ADC conversion result: 31790
Actual voltage on VREF_OUT: 1.601V
Use trim value: 7
ADC conversion result: 33734
Actual voltage on VREF_OUT: 1.699V
Use trim value: 8
ADC conversion result: 35763
Actual voltage on VREF_OUT: 1.801V
Use trim value: 9
ADC conversion result: 37699
Actual voltage on VREF_OUT: 1.898V
Use trim value: 10
ADC conversion result: 39667
Actual voltage on VREF_OUT: 1.997V
Use trim value: 11
ADC conversion result: 41632
Actual voltage on VREF_OUT: 2.096V
KW45B41Z-EVK
Hardware requirements
Mini/micro USB cable
KW45B41Z-EVK Board
Personal Computer
Board settings
Remove JP5 3-4,short JP5 5-6.
Prepare the Demo
Connect the micro and mini USB cable between the PC host and the USB ports on the board.
Open a serial terminal on PC for the serial device with these settings:
115200 baud rate
8 data bits
No parity
One stop bit
No flow control
Download the program to the target board.
Either press the reset button on your board or launch the debugger in your IDE to begin running the demo.
Running the demo
The following lines are printed to the serial terminal when the demo program is executed.
VREF example
ADC Full Range: 65536
Default (Factory) trim value is :15
Use trim value: 0
ADC conversion result: 19861
Actual voltage on VREF_OUT: 1.000V
Use trim value: 1
ADC conversion result: 21827
Actual voltage on VREF_OUT: 1.099V
Use trim value: 2
ADC conversion result: 23812
Actual voltage on VREF_OUT: 1.199V
Use trim value: 3
ADC conversion result: 25792
Actual voltage on VREF_OUT: 1.299V
Use trim value: 4
ADC conversion result: 27776
Actual voltage on VREF_OUT: 1.399V
Use trim value: 5
ADC conversion result: 29741
Actual voltage on VREF_OUT: 1.498V
Use trim value: 6
ADC conversion result: 31790
Actual voltage on VREF_OUT: 1.601V
Use trim value: 7
ADC conversion result: 33734
Actual voltage on VREF_OUT: 1.699V
Use trim value: 8
ADC conversion result: 35763
Actual voltage on VREF_OUT: 1.801V
Use trim value: 9
ADC conversion result: 37699
Actual voltage on VREF_OUT: 1.898V
Use trim value: 10
ADC conversion result: 39667
Actual voltage on VREF_OUT: 1.997V
Use trim value: 11
ADC conversion result: 41632
Actual voltage on VREF_OUT: 2.096V
KW47-EVK
Hardware requirements
Type-C USB cable
KW47-EVK Board
Personal Computer
Board settings
No special is needed.
Prepare the Demo
Connect a USB cable between the host PC and the EVK board J14.
Open a serial terminal on PC for the serial device with these settings:
115200 baud rate
8 data bits
No parity
One stop bit
No flow control
Download the program to the target board.
Either press the reset button on your board or launch the debugger in your IDE to begin running the demo.
Running the demo
The following lines are printed to the serial terminal when the demo program is executed.
VREF example
ADC Full Range: 65536
Default (Factory) trim value is :15
Use trim value: 0
ADC conversion result: 20665
Actual voltage on VREF_OUT: 1.006V
Use trim value: 1
ADC conversion result: 22726
Actual voltage on VREF_OUT: 1.106V
Use trim value: 2
ADC conversion result: 24827
Actual voltage on VREF_OUT: 1.208V
Use trim value: 3
ADC conversion result: 26915
Actual voltage on VREF_OUT: 1.310V
Use trim value: 4
ADC conversion result: 28968
Actual voltage on VREF_OUT: 1.410V
Use trim value: 5
ADC conversion result: 31041
Actual voltage on VREF_OUT: 1.511V
Use trim value: 6
ADC conversion result: 33173
Actual voltage on VREF_OUT: 1.615V
Use trim value: 7
ADC conversion result: 35173
Actual voltage on VREF_OUT: 1.712V
Use trim value: 8
ADC conversion result: 37292
Actual voltage on VREF_OUT: 1.815V
Use trim value: 9
ADC conversion result: 39309
Actual voltage on VREF_OUT: 1.913V
Use trim value: 10
ADC conversion result: 41332
Actual voltage on VREF_OUT: 2.012V
Use trim value: 11
ADC conversion result: 43384
Actual voltage on VREF_OUT: 2.112V
LPCXpresso55S36
Hardware requirements
Micro USB cable
Personal Computer
LPCXpresso55S36 board
Board settings
Populate the R555
Connect J12-16(VREF_OUT) with J9-3(PIO0_31,ADC CH8A)
Prepare the Demo
Connect the micro and mini USB cable between the PC host and the USB ports on the board.
Open a serial terminal on PC for the serial device with these settings:
115200 baud rate
8 data bits
No parity
One stop bit
No flow control
Download the program to the target board.
Either press the reset button on your board or launch the debugger in your IDE to begin running the demo.
Running the demo
The following lines are printed to the serial terminal when the demo program is executed.
VREF example
ADC Full Range: 65536
Default (Factory) trim value is :15
Use trim value: 0
ADC conversion result: 19599
Actual voltage on VREF_OUT: 0.987V
Use trim value: 1
ADC conversion result: 21839
Actual voltage on VREF_OUT: 1.100V
Use trim value: 2
ADC conversion result: 23942
Actual voltage on VREF_OUT: 1.206V
......
Use trim value: 11
ADC conversion result: 41580
Actual voltage on VREF_OUT: 2.094V
MCX-N5XX-EVK
Hardware requirements
Mini/micro USB cable
MCX-N5XX-EVK Board
Personal Computer
Board settings
Connect J20-28(P4_23) with JP28-1(VREFO)
Prepare the Demo
Connect the micro and mini USB cable between the PC host and the USB ports on the board.
Open a serial terminal on PC for the serial device with these settings:
115200 baud rate
8 data bits
No parity
One stop bit
No flow control
Download the program to the target board.
Either press the reset button on your board or launch the debugger in your IDE to begin running the demo.
Running the demo
The following lines are printed to the serial terminal when the demo program is executed.
VREF example
ADC Full Range: 65536
Default (Factory) trim value is :15
Use trim value: 0
ADC conversion result: 19861
Actual voltage on VREF_OUT: 1.000V
Use trim value: 1
ADC conversion result: 21827
Actual voltage on VREF_OUT: 1.099V
Use trim value: 2
ADC conversion result: 23812
Actual voltage on VREF_OUT: 1.199V
Use trim value: 3
ADC conversion result: 25792
Actual voltage on VREF_OUT: 1.299V
Use trim value: 4
ADC conversion result: 27776
Actual voltage on VREF_OUT: 1.399V
Use trim value: 5
ADC conversion result: 29741
Actual voltage on VREF_OUT: 1.498V
Use trim value: 6
ADC conversion result: 31790
Actual voltage on VREF_OUT: 1.601V
Use trim value: 7
ADC conversion result: 33734
Actual voltage on VREF_OUT: 1.699V
Use trim value: 8
ADC conversion result: 35763
Actual voltage on VREF_OUT: 1.801V
Use trim value: 9
ADC conversion result: 37699
Actual voltage on VREF_OUT: 1.898V
Use trim value: 10
ADC conversion result: 39667
Actual voltage on VREF_OUT: 1.997V
Use trim value: 11
ADC conversion result: 41632
Actual voltage on VREF_OUT: 2.096V
MCX-N9XX-EVK
Hardware requirements
Mini/micro USB cable
MCX-N9XX-EVK Board
Personal Computer
Board settings
Connect J20-28(P4_23) with JP28-1(VREFO)
Prepare the Demo
Connect the micro and mini USB cable between the PC host and the USB ports on the board.
Open a serial terminal on PC for the serial device with these settings:
115200 baud rate
8 data bits
No parity
One stop bit
No flow control
Download the program to the target board.
Either press the reset button on your board or launch the debugger in your IDE to begin running the demo.
Running the demo
The following lines are printed to the serial terminal when the demo program is executed.
VREF example
ADC Full Range: 65536
Default (Factory) trim value is :15
Use trim value: 0
ADC conversion result: 19861
Actual voltage on VREF_OUT: 1.000V
Use trim value: 1
ADC conversion result: 21827
Actual voltage on VREF_OUT: 1.099V
Use trim value: 2
ADC conversion result: 23812
Actual voltage on VREF_OUT: 1.199V
Use trim value: 3
ADC conversion result: 25792
Actual voltage on VREF_OUT: 1.299V
Use trim value: 4
ADC conversion result: 27776
Actual voltage on VREF_OUT: 1.399V
Use trim value: 5
ADC conversion result: 29741
Actual voltage on VREF_OUT: 1.498V
Use trim value: 6
ADC conversion result: 31790
Actual voltage on VREF_OUT: 1.601V
Use trim value: 7
ADC conversion result: 33734
Actual voltage on VREF_OUT: 1.699V
Use trim value: 8
ADC conversion result: 35763
Actual voltage on VREF_OUT: 1.801V
Use trim value: 9
ADC conversion result: 37699
Actual voltage on VREF_OUT: 1.898V
Use trim value: 10
ADC conversion result: 39667
Actual voltage on VREF_OUT: 1.997V
Use trim value: 11
ADC conversion result: 41632
Actual voltage on VREF_OUT: 2.096V
MCX-W72-EVK
Hardware requirements
Type-C USB cable
MCX-W72-EVK Board
Personal Computer
Board settings
Remove JP5 3-4,short JP5 5-6.
Prepare the Demo
Connect a USB cable between the host PC and the EVK board J14.
Open a serial terminal on PC for the serial device with these settings:
115200 baud rate
8 data bits
No parity
One stop bit
No flow control
Download the program to the target board.
Either press the reset button on your board or launch the debugger in your IDE to begin running the demo.
Running the demo
The following lines are printed to the serial terminal when the demo program is executed.
VREF example
ADC Full Range: 65536
Default (Factory) trim value is :15
Use trim value: 0
ADC conversion result: 20665
Actual voltage on VREF_OUT: 1.006V
Use trim value: 1
ADC conversion result: 22726
Actual voltage on VREF_OUT: 1.106V
Use trim value: 2
ADC conversion result: 24827
Actual voltage on VREF_OUT: 1.208V
Use trim value: 3
ADC conversion result: 26915
Actual voltage on VREF_OUT: 1.310V
Use trim value: 4
ADC conversion result: 28968
Actual voltage on VREF_OUT: 1.410V
Use trim value: 5
ADC conversion result: 31041
Actual voltage on VREF_OUT: 1.511V
Use trim value: 6
ADC conversion result: 33173
Actual voltage on VREF_OUT: 1.615V
Use trim value: 7
ADC conversion result: 35173
Actual voltage on VREF_OUT: 1.712V
Use trim value: 8
ADC conversion result: 37292
Actual voltage on VREF_OUT: 1.815V
Use trim value: 9
ADC conversion result: 39309
Actual voltage on VREF_OUT: 1.913V
Use trim value: 10
ADC conversion result: 41332
Actual voltage on VREF_OUT: 2.012V
Use trim value: 11
ADC conversion result: 43384
Actual voltage on VREF_OUT: 2.112V
KW47-LOC
Hardware requirements
Type-C USB cable
KW47-LOC Board
Personal Computer
Board settings
No special is needed.
Prepare the Demo
Connect a USB cable between the host PC and the LOC board J3.
Open a serial terminal on PC for the serial device with these settings:
115200 baud rate
8 data bits
No parity
One stop bit
No flow control
Download the program to the target board.
Either press the reset button on your board or launch the debugger in your IDE to begin running the demo.
Running the demo
The following lines are printed to the serial terminal when the demo program is executed.
VREF example
ADC Full Range: 65536
Default (Factory) trim value is :15
Use trim value: 0
ADC conversion result: 21607
Actual voltage on VREF_OUT: 1.006V
Use trim value: 1
ADC conversion result: 23732
Actual voltage on VREF_OUT: 1.104V
Use trim value: 2
ADC conversion result: 25934
Actual voltage on VREF_OUT: 1.207V
Use trim value: 3
ADC conversion result: 28097
Actual voltage on VREF_OUT: 1.308V
Use trim value: 4
ADC conversion result: 30306
Actual voltage on VREF_OUT: 1.410V
Use trim value: 5
ADC conversion result: 32433
Actual voltage on VREF_OUT: 1.509V
Use trim value: 6
ADC conversion result: 34704
Actual voltage on VREF_OUT: 1.615V
Use trim value: 7
ADC conversion result: 36801
Actual voltage on VREF_OUT: 1.713V
Use trim value: 8
ADC conversion result: 39008
Actual voltage on VREF_OUT: 1.815V
Use trim value: 9
ADC conversion result: 41139
Actual voltage on VREF_OUT: 1.915V
Use trim value: 10
ADC conversion result: 43264
Actual voltage on VREF_OUT: 2.013V
Use trim value: 11
ADC conversion result: 45413
Actual voltage on VREF_OUT: 2.113V
MCXW72-LOC
Hardware requirements
Type-C USB cable
MCXW72-LOC Board
Personal Computer
Board settings
No special is needed.
Prepare the Demo
Connect a USB cable between the host PC and the LOC board J3.
Open a serial terminal on PC for the serial device with these settings:
115200 baud rate
8 data bits
No parity
One stop bit
No flow control
Download the program to the target board.
Either press the reset button on your board or launch the debugger in your IDE to begin running the demo.
Running the demo
The following lines are printed to the serial terminal when the demo program is executed.
VREF example
ADC Full Range: 65536
Default (Factory) trim value is :15
Use trim value: 0
ADC conversion result: 21607
Actual voltage on VREF_OUT: 1.006V
Use trim value: 1
ADC conversion result: 23732
Actual voltage on VREF_OUT: 1.104V
Use trim value: 2
ADC conversion result: 25934
Actual voltage on VREF_OUT: 1.207V
Use trim value: 3
ADC conversion result: 28097
Actual voltage on VREF_OUT: 1.308V
Use trim value: 4
ADC conversion result: 30306
Actual voltage on VREF_OUT: 1.410V
Use trim value: 5
ADC conversion result: 32433
Actual voltage on VREF_OUT: 1.509V
Use trim value: 6
ADC conversion result: 34704
Actual voltage on VREF_OUT: 1.615V
Use trim value: 7
ADC conversion result: 36801
Actual voltage on VREF_OUT: 1.713V
Use trim value: 8
ADC conversion result: 39008
Actual voltage on VREF_OUT: 1.815V
Use trim value: 9
ADC conversion result: 41139
Actual voltage on VREF_OUT: 1.915V
Use trim value: 10
ADC conversion result: 43264
Actual voltage on VREF_OUT: 2.013V
Use trim value: 11
ADC conversion result: 45413
Actual voltage on VREF_OUT: 2.113V
FRDM-MCXW72
Hardware requirements
Type-C USB cable
FRDM-MCXW72 Board
Personal Computer
Board settings
No special is needed.
Prepare the Demo
Connect a USB cable between the host PC and the FRDM board J10.
Open a serial terminal on PC for the serial device with these settings:
115200 baud rate
8 data bits
No parity
One stop bit
No flow control
Download the program to the target board.
Either press the reset button on your board or launch the debugger in your IDE to begin running the demo.
Running the demo
The following lines are printed to the serial terminal when the demo program is executed.
VREF example
ADC Full Range: 65536
Default (Factory) trim value is :15
Use trim value: 0
ADC conversion result: 19861
Actual voltage on VREF_OUT: 1.000V
Use trim value: 1
ADC conversion result: 21827
Actual voltage on VREF_OUT: 1.099V
Use trim value: 2
ADC conversion result: 23812
Actual voltage on VREF_OUT: 1.199V
Use trim value: 3
ADC conversion result: 25792
Actual voltage on VREF_OUT: 1.299V
Use trim value: 4
ADC conversion result: 27776
Actual voltage on VREF_OUT: 1.399V
Use trim value: 5
ADC conversion result: 29741
Actual voltage on VREF_OUT: 1.498V
Use trim value: 6
ADC conversion result: 31790
Actual voltage on VREF_OUT: 1.601V
Use trim value: 7
ADC conversion result: 33734
Actual voltage on VREF_OUT: 1.699V
Use trim value: 8
ADC conversion result: 35763
Actual voltage on VREF_OUT: 1.801V
Use trim value: 9
ADC conversion result: 37699
Actual voltage on VREF_OUT: 1.898V
Use trim value: 10
ADC conversion result: 39667
Actual voltage on VREF_OUT: 1.997V
Use trim value: 11
ADC conversion result: 41632
Actual voltage on VREF_OUT: 2.096V
FRDM-MCXA577
Hardware requirements
Type-C USB cable
FRDM-MCXA577 board
Personal Computer
Board settings
Please ensure a 220nF capacitor is added between P2_7 and GND on the FRDM-MCXA577 board.
Prepare the Demo
Connect a USB Type-C cable between the host PC and the MCU-Link USB port on the target board.
Open a serial terminal with the following settings:
115200 baud rate
8 data bits
No parity
One stop bit
No flow control
Download the program to the target board.
Either press the reset button on your board or launch the debugger in your IDE to begin running the demo.
Running the demo
The log below shows the output of the hello world demo in the terminal window:
MCUX SDK version: 2026.06.00-pvw1
VREF example
ADC Full Range: 65536
Default (Factory) trim value is :0
Use trim value: 1
ADC conversion result: 24920
Actual voltage on VREF_OUT: 1.240V
Use trim value: 2
ADC conversion result: 29863
Actual voltage on VREF_OUT: 1.485V
Use trim value: 3
ADC conversion result: 35963
Actual voltage on VREF_OUT: 1.789V
Use trim value: 4
ADC conversion result: 40938
Actual voltage on VREF_OUT: 2.036V
Use trim value: 5
ADC conversion result: 49924
Actual voltage on VREF_OUT: 2.483V
FRDM-MCXA287
Hardware requirements
Type-C USB cable
FRDM-MCXA287 board
Personal Computer
Board settings
No special settings are required.
Prepare the Demo
Connect a USB Type-C cable between the host PC and the MCU-Link USB port on the target board.
Open a serial terminal with the following settings:
115200 baud rate
8 data bits
No parity
One stop bit
No flow control
Download the program to the target board.
Either press the reset button on your board or launch the debugger in your IDE to begin running the demo.
Running the demo
The log below shows the output of the hello world demo in the terminal window:
VREF example
ADC Full Range: 65536
Default (Factory) trim value is :0
Use trim value: 0
ADC conversion result: 20214
Actual voltage on VREF_OUT: 1.006V
Use trim value: 1
ADC conversion result: 25110
Actual voltage on VREF_OUT: 1.249V
Use trim value: 2
ADC conversion result: 30150
Actual voltage on VREF_OUT: 1.500V
Use trim value: 3
ADC conversion result: 36212
Actual voltage on VREF_OUT: 1.801V
Use trim value: 4
ADC conversion result: 41135
Actual voltage on VREF_OUT: 2.046V
Use trim value: 5
ADC conversion result: 50208
Actual voltage on VREF_OUT: 2.498V