Skip to main content
Associate
March 4, 2024
Question

Problem with ADC using the DMA

Hi everyone,

The buffer 'adc_buf' is not filling at all. Here is the code. Can someone explain me where is the problem?

    This topic has been closed for replies.

    4 replies

    TDK
    March 4, 2024

    Is the code making it there? Perhaps it's getting stuck in MX_ETH_Init.

    Usual advice here: debug the program, examine where the code is at, examine state of software state machines and registers if something isn't matching up. There's an answer in there somewhere.

    adc_buf should be volatile, probably isn't the issue here.

    No mention of board hardware or chip name. Presumably the chip is in the IOC file.

    "If you feel a post has answered your question, please click ""Accept as Solution""."
    Associate
    March 4, 2024

    Thank you for the reply. The board i'm using is the nucleo-H723ZG.

    I can't understand why it's getting stuck in MX_ETH.

    I will try to change into a volatile buffer and see what happen.

    TDK
    March 4, 2024

    Do you have an ethernet cable plugged in with an active connection at the other end? If not, MX_ETH_Init will hang. Disable the ethernet peripheral if you aren't using ethernet.

    "If you feel a post has answered your question, please click ""Accept as Solution""."