2020-08-10 11:38 PM
Hello,
I am using STM32G030C8 microcontroller's several ADCs. Most of them are working okay but two of them (ADC1 IN15, PB11 and ADC1 IN16, PB12) are not showing correct ADC values.
In ADC IN15: When I use only this channel in the code then it shows 0 but when I read multiple channels it shows the value of the channel which is read before it.
In ADC IN16: The value is always very low regarding the actual voltage on that pin.
My VREF is 2.5V. I generated the code with CubeMX and using Keil IDE.
I have tested it in more than 1 hardware with same results. Also I have technically verified the voltage at the pin. The voltage at said pin is varied from 1.2V to 1.5V. Same type of input signals are applied to ADC channels 7,8,9,10,11 and reading values without any issues.
Also uploading the project for reference
2020-08-12 12:10 AM
I am changing the channels in my main code in while(1) loop
2020-08-12 06:24 AM
You're going to have to dig into the HAL code to ensure it's setting the right register values.
2020-08-12 09:57 AM
Read out and check/post the relevant registers content after switch.
JW
2021-03-22 02:04 AM
Was this issue solved?
I have the same issue with STM32G030K6.
My situation is :
While the ADC input signals using Voltage divider resistance, it works correct !
But if the input signals using opamp, it goes to zero ! (ADC_IN0-PA0/ ADC_IN1-PA1)
I've checked the HAL settings, all the same.
And double check by multi-meters, the true voltage is zero too while connecting to opamp!
These pins are really weird.
But using the same way on G431 is totally OK!
Is there any user guide to solve this issue?
2021-03-22 05:54 AM
Please start a new thread, stating the problem in details (what opamp do you use, how is it connected/set up, where do you measure, etc.), perhaps linking to this thread if it's relevant.
JW