Ario87
Newbie
- Joined
- Nov 2, 2024
- Messages
- 4
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1
- 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.
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.