2025-12-18 8:53 PM
Hi all,
I've recently been working on a Nucleo H723ZG with a working implementation that allows for ADC reading over DMA. I've got a Timer event that triggers it at 20kHz and it was reading and processing multiple ADCs.
I've shifted to using a custom developed board with a surface mounted STMH733VGT6. I've configured the ADCs and timers to what I believe is the exact same as before. I have verified that there is nothing wrong with the ADC circuitry by initially setting them up using poll for conversion, I was able to get valuable data out of the board doing this.
When I went to setup the ADCs to use DMA however I started to have issues, I believe that the
Solved! Go to Solution.
2025-12-21 7:27 PM
Issue has been found, my buffer for the DMA had defaulted to a memory location that it could not access. Defining a new memory region in the linker script and initializing the buffer there solved the issue.
2025-12-18 10:17 PM
> Below I have copied in my TIM1 init function as well as my ADC1 init function in hopes that it may help someone assist me with my issue.
There is an "insert/edit code sample" menu item ("</>"), please use it next time.
> When I went to setup the ADCs to use DMA however I started to have issues, I believe that the
2025-12-19 5:37 AM
Are ADC and DMA interrupts enabled? Attach your IOC.
You haven't shown any code that actually starts the ADC.
> htim1.Init.Prescaler = 137.5-1;
The prescaler is an integer. Not the issue here but this is weird.
2025-12-21 3:34 PM
To answer your questions, yes ADC and DMA interrupts are enabled. Before the main while loop of my code I call all of the regular inits but then also the following functions for TIM1 and TIM3, and ADC1 and ADC3 respectively. The ADCs are configured to trigger off Timer 1 TRGO, which is set to OC1REF, I had no issues with this setup on my nucleo.
HAL_TIM_Base_Start_IT()
HAL_ADC_Start_DMA()Attached is an image of my NVIC setup in cubeMX , I realised earlier that the priorities were all 0 and thought that may be causing issues so changed the system to what is depicted below, this did not fix it though.
The only change I can think of between the two implementations is that I have more values being read on a single dma stream (up to 8).
I am a bit confused as to what to try next, @Ozone I'm not quite sure what you mean by placing it in the interrupt handler instead, I'm not sure where that would be.
2025-12-21 6:28 PM
I don't see any issues with the code or screenshots you've presented. I suspect the issue is elsewhere. Systick priority should probably be higher but I don't think that's the main issue.
2025-12-21 7:27 PM
Issue has been found, my buffer for the DMA had defaulted to a memory location that it could not access. Defining a new memory region in the linker script and initializing the buffer there solved the issue.