cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F103RET6 mcu , reading adc value in dma mode with mult channel and send to pc using usb

Aayaan
Associate

Hii team i am working with STM32F103RET6 mcu and i want to read the ADC value in DMA mode of multi channel and send these value to the PC using USB. but i am getting stuck in MX_ADC1_Init(). 

if (HAL_ADC_ConfigChannel(&hadc1, &sConfig) != HAL_OK)

{

Error_Handler();

} here my code is going to Error Handler and also i am getting proper value from ADC. i am
attaching my Zip file please review it and modify accordingly. i am newer to Stm32 so not getting any proper
solution for this.

1 REPLY 1
nouirakh
ST Employee

Hello @Aayaan,

Welcome to ST Community!
I have downloaded your project .ZIP and tested it. and it works correctly.
Setup: Board STM32103-DISCO
Could you please check the configuration of your board, solder bridges, jumper(s)?
6616918f-831e-432a-ba0e-66a065b67282.jpgdownload.gif1d394fb0-423a-40b3-bcc1-73f3869bb040.jpg3269d8aa-6529-42a4-be50-be86ed7088c0.jpg