Problem with ADC using the DMA
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-03-04 2:41 AM
Hi everyone,
The buffer 'adc_buf' is not filling at all. Here is the code. Can someone explain me where is the problem?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-03-04 5:41 AM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-03-04 6:16 AM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-03-04 6:29 AM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-03-05 1:19 AM
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.
