Hi NXP team,
I'm using an S32K144 MCU, and I'm facing a strange issue with the ADC1_SE11 input (pin PTE6).
I have a voltage divider circuit connected to a 27V battery supply as follows:
27V --- R1 (825k) ---+--- R2 (120k) --- GND
|
PTE6 (ADC1_SE11)
|
100nF to GND
When I configure PTE5 as a GPIO input, I can measure the expected voltage (~3.3V) at the divider node. However, when I configure it as ADC input (ADC1_SE11), the voltage at the same point drops to nearly 0V.
In a previous project, I used the same voltage divider circuit (with the same resistor and capacitor values) connected to PTB13 (ADC0_SE8), and it worked correctly—ADC0 was able to read the voltage without any issues.
My ADC1 configuration is as follows:
const adc_converter_config_t adConv2_ConvConfig0 = {
.clockDivide = ADC_CLK_DIVIDE_4,
.sampleTime = 255U,
.resolution = ADC_RESOLUTION_12BIT,
.inputClock = ADC_CLK_ALT_1,
.trigger = ADC_TRIGGER_SOFTWARE,
.pretriggerSel = ADC_PRETRIGGER_SEL_PDB,
.triggerSel = ADC_TRIGGER_SEL_PDB,
.dmaEnable = false,
.voltageRef = ADC_VOLTAGEREF_VREF,
.continuousConvEnable = false,
.supplyMonitoringEnable = false,
};
Additional info:
ADC1_SE11 is used only by the ADC, no other modules.
The board VREFH is connected to 5V.
When I manually force 5V onto PTE6, ADC1 does read it correctly, which seems to rule out hardware damage.
According to the S32K144 Reference Manual, ADC degradation may occur with high-speed interfaces or bonding limitations, but this pin is not listed in the affected pins table.
Question:
Why does the voltage at PTD5 drop when configured as ADC input, while it is present when configured as GPIO input? Is there any internal loading or configuration I might be missing for ADC1_SE11?
Thanks in advance for your support.
"When I configure PTE5 as a GPIO input, I can measure the expected voltage (~3.3V) at the divider node. However, when I configure it as ADC input (ADC1_SE11), the voltage at the same point drops to nearly 0V."
Is it always nearly 0V? Or does it return to normal? Have you made any measurements on it with an oscilloscope?
Hi Senlent,
Thanks for your follow-up.
I have tested the voltage on PTE5 (ADC1_SE11) with an oscilloscope. During power-up and initialization, there's a brief voltage spike, but after that, the voltage quickly drops and stays close to 0V.
This behavior is consistent and repeatable every time I power up the board.
Let me know what could cause this, or if there are any further debugging suggestions.
Hi@Changyuke
So from your description, the sampling result of ADC is correct, because the result you measured through the oscilloscope is also close to 0V.
And you have done a test of directly measuring 5V before, and the sampling result is also normal, which means that the configuration and function of ADC are normal.
Then the only possible reason is a hardware problem.
You should test three endpoints, namely 27V, GND and PTE6.
Hi@Changyuke
If the resistance of the voltage divider resistor is too large, the driving current of the circuit will become very small, which will cause the charging time of the internal acquisition capacitor of the ADC to be longer.
So I want to check whether this is the cause of this problem.
Can you do a simple test, that is, modify the resistance of the voltage divider resistor. Reduce the resistance of the voltage divider resistor and try again.