MCXN947/N547 LPADC temp sensor (ch26): Vbe1/Vbe8 order changes in HW-triggered chain Hello, I am measuring the LPADC internal temperature sensor inside a high-speed, hardware-triggered ADC command chain on MCXN947/MCXN547. I am getting valid temperatures with a workaround, but I have observed behavior that is not described in the Reference Manual. I would like to confirm whether this is expected behavior and whether the workaround is safe for production. 1. Environment MCU: MCXN947 (reproduced on FRDM-MCXN947); target device is MCXN547 SDK: MCUXpresso SDK 2026.06.00 ADC0 clock 48 MHz, 16-bit, VREF Alt1 Trigger: PWM0 SM0 → INPUTMUX → ADC0 TRIG0, 20 µs period (HW trigger) Chain: CMD1–CMD5 (9 external inputs: 4 × dual single-ended + 1 × single A, ADCK11) → CMD6 (ch26 temperature sensor) CMD6: ch26, differential (DiffBothSide), STS7 (131 ADCK), no HW averaging 2. Observations CMD6 with LOOP 1 (2 results) inside the chain: both results are at the Vbe1 level; Vbe8 never appears. CMD6 with LOOP 3 (4 results) inside the chain: the order is Vbe1, Vbe1, Vbe8, Vbe1. Continuous standalone conversions of the temperature sensor only: results alternate Vbe1/Vbe8 on every conversion. The 1x/8x state does not appear to be reset per command: With the RM method alone (CMD7, STS7, AVGS 128, LOOP 1, SW trigger), the second result is Vbe8 right after initialization, but after the high-speed chain has been running, the first result is Vbe8. The first result of a standalone measurement is Vbe1 on some boots and Vbe8 on others. 3. SDK code referenced (MCX-N5XX-EVK SDK 2026.09.00, lpadc_temperature_measurement example) lpadc_temperature_measurement.c, line 183: “Eliminate the first two inaccurate results.” — one measurement (2 results) is discarded right after initialization. No reason is given. hardware_init.c, lines 48–53 (only for devices with FSL_FEATURE_LPADC_TEMP_SENS_BUFFER_SIZE == 4): the comment says the recommended LOOP count is 4 but the first two results are useless. MCXN547 features.h (line 240) defines a buffer size of 2, so this does not apply to MCX N. hardware_init.c, lines 59 and 62: the two results are used in fixed order as Vbe1 → Vbe8 (no magnitude check). 4. Current workaround CMD6 with LOOP 2 (3 results): discard [0], use [1]/[2] as a pair. The larger of the two is taken as Vbe8 (handles the unfixed order). Average 128 pairs in software, then apply the formula in RM §41.3.7 with A/B/α from datasheet Table 57 (771 / 302 / 10.06). Compared with the RM method (room temperature, 13 s): mean difference −0.15 °C, standard deviation 0.26 °C. Chain runs normally (~50,000 chains/s, no FIFO overflow or trigger exception). 5. Questions What causes the first ch26 result to be unexpected when ch26 is converted right after other channels? Is the first conversion inaccurate (sensor/buffer settling), or is the 1x/8x switch applied late? In SDK hardware_init.c line 49, why are the first two results “useless” for devices with a buffer size of 4? For the same reason, should the first ch26 result after other-channel conversions also be discarded on MCX N (buffer size 2)? What is the cause of “Eliminate the first two inaccurate results” in lpadc_temperature_measurement.c line 183? Does it apply only right after initialization, or also after other ADC activity? Under what conditions does the sensor switch between 1x and 8x current, and what resets that state (power-up, ADC reset, command change, etc.)? RM 41.3.7 and the SDK (hardware_init.c lines 59/62) assume “first = Vbe1, second = Vbe8”, but on this board the order is sometimes reversed. Under what conditions is this order guaranteed? Is the workaround above (discard one result, classify the next two by magnitude, average in software) acceptable for production? Are there risks across the temperature range or part-to-part variation? Is there any related errata, application note, or other documentation? (I could not find a related item in MCXNx4x_0P02G Errata Rev. 1.0.) I can provide additional data or test code if needed. Thank you. Development Board FRDM-Training MCXN
View full article