STM32F030 ADC Unit not working properly

Ario87

Newbie
Joined
Nov 2, 2024
Messages
4
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Visit site
Activity points
42
Hi
I have designed a hardware to read 4 dc currents and 4 dc voltages using ADC unit of STM32F030K6T6. Analog voltage or current is read in 12-bit resolution using DMA to transfer data directly from peripheral to memory. Some calculations are done on data received from ADC to get the desired value and then data is sent to PC using UART and RS485 interface. 5 first channels (ADC0 to ADC4) are working properly but other 3 channels (ADC5 to ADC7) read wrong data (output value starts from 0 and increases gradually with a distinct step for each channel regardless of MCU pin voltage). Calculations for Voltage channels (ADC0/2/4/6) or Current channels (ADC1/3/5/7) are the same.
Also I've checked hardware and voltage or current levels are correct.
The code is attached.
Thanks to anyone who can help about this problem.
 

Attachments

  • main.rar
    3.3 KB · Views: 15

The following links may help you to troubleshoot your code:
 

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…