Skip to main content
Visitor II
May 31, 2024
Question

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

  • May 31, 2024
  • 1 reply
  • 781 views

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.

    This topic has been closed for replies.

    1 reply

    ST Employee
    June 12, 2024

    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