cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with ADC using the DMA

jakzep2001
Associate II

Hi everyone,

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

4 REPLIES 4
TDK
Guru

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".

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.

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".

Now it is not getting stuck in MX_ETH_Init, but the callback functions are not being called and the adc_buf is not filling at all.