cancel
Showing results for 
Search instead for 
Did you mean: 

STM32H750 DMA ADC crush

SFediakov
Associate II

Hello, 

I'm using STM32H750VBT

When I'm trying to use DMA for ADC data collection I'm experiencing MCU crush. Currently I know that issue happens when DMA fill half of defined buffer.


I'm using STM32CubeIDE and builded in CubeMX. To precize issue I used debug By SWD STLink. to be able run code step by step I desabled continuous conversion mode. Attaching my Cube MX  ADC settings:

SFediakov_0-1711556579801.png

SFediakov_1-1711556595128.png

And DMA settings 

SFediakov_2-1711556684995.png

After pre configured by CubeMX initiation I'm calling conversion by 
HAL_ADC_Start_DMA(&hadc2, (uint32_t*)testDMA, 20); 

And entering into while (1) loop where calling adc2 conversion

HAL_ADC_Start(&hadc2);
after every loop I checking testDMA[] buffer

and DMA cycle by cycle fills testDMA as well up to [8], but on testDMA[9] debugger shows errors and don't able to cintinue code running (example on attached screen) 

SFediakov_3-1711557188032.png

I tried to change in HAL_ADC_Start_DMA(&hadc2, (uint32_t*)testDMA, 20); from 20 to any another value and issue happens on half of the defined buffer.  array testDMA is big enough, in that case it's uint16_t testDMA [60];
Probably isue occurs because MCU can't call/execute interrupt

SFediakov_0-1711558012867.pngSFediakov_1-1711558021649.pngSFediakov_2-1711558035812.png

 

 

void HAL_ADC_ConvHalfCpltCallback(ADC_HandleTypeDef* hadc)

I'm attaching full project. My cubeIDE version is 1.14.1



Please help me run my DMA which would fill my buffer fully and would run succesfully interrupt 

void HAL_ADC_ConvCpltCallback 

1 ACCEPTED SOLUTION

Accepted Solutions
SFediakov
Associate II

After downgrade-ing from CubeIDE 1.14.0 to 1.8.0 and changing from firmware package H7 v1.11.2 to V1.11.0 everything works as should, so there is a bug in newer lib or MX pre-configurator.

View solution in original post

2 REPLIES 2
SFediakov
Associate II

I made temporrary solution, which allows by timer check buffer status and stop dma before it would reach half buffer, but it's very "buggy", if MCU would not turn off DMA in time application will crush 🙂 

SFediakov_0-1711577273815.png



So if someone know how to fix normally DMA on H750 please let me know

SFediakov
Associate II

After downgrade-ing from CubeIDE 1.14.0 to 1.8.0 and changing from firmware package H7 v1.11.2 to V1.11.0 everything works as should, so there is a bug in newer lib or MX pre-configurator.