STM32H7,STM32H743 ADC with DMA
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2017-10-11 6:09 AM
In summer 2017, I started an project with the STM32F767 on the Nucleo board, because the H743 was still announced but not available. For some weeks I got the new Nucleo board of the STM32H743.
After I transferred the code from the F767 to the H743, I recognized the not working DMA interrupt. The DMA interrupt was working on the 767 perfectly. So I reduced the code of the F767 and the H743 (by using cube) to only this function for see what�s the difference.- TIM3 managed 4 PWM Signals (22KHz) and triggers the ADC1 on falling edge and call the interrupt call back function. (LED GREEN toggles).
- When ADC1 conversion is finished, the DMA is triggered and copies the data.
- When the DMA transfer is completed, the call back function is called, and the BLUE LED toggles
I can�t see, why the interrupt for the DMA at the STM32H743 is not working!
Have somebody done something like this already and was successful?
I put both projects for Cube and the AC6 workbench to the attachment. Hope somebody can help me.
BR Volker
#stm32h743 #stm32h7Solved! Go to Solution.
- Labels:
-
ADC
-
DMA
-
STM32H7 Series
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2017-10-12 4:00 AM
Would be helpful to have some working HAL examples from ST.
I have the same problem with Ethernet.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2017-10-12 4:14 AM
Hi Joerg,
thanks for your spending time. I already also read your problem with the Ethernet.
Maybe there is a bug in the init of the DMA process.
I also not understand, why the cube not automatically reserves a D2 Ram domain for DMA transfer.
- Volker -
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2017-10-12 5:00 AM
Problem solved !
Two things have to be observed:
- hadc1.Init.ConversionDataManagement =
ADC_CONVERSIONDATA_DR;
have to change to: hadc1.Init.ConversionDataManagement =ADC_CONVERSIONDATA_DMA_CIRCULAR;
If only this done theHAL_DMA_IRQHandler(&hdma_adc1);
appears and run intohdma->ErrorCode |= HAL_DMA_ERROR_TE;
--> this already can be done in the Cube definition
- Memory location need to be defined in the D2 domain section see e.g. my linker and source file changes.
Than
HAL_DMA_IRQHandler(&hdma_adc1)
calls voidHAL_ADC_ConvCpltCallback(ADC_HandleTypeDef* hadc)
{and all work fine.
- Volker -
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2017-10-12 7:03 AM
Congrats.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2017-10-12 7:27 AM
+1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2017-10-29 12:41 PM
Bremauer.Volker
‌This looks like a very nasty bug in the Cube, took me almost a day to track this one down. Found the solution in this thread eventually
I noticed that after modifying the linker script, the link stage takes way longer. Do you get the same thing?
Thanks,
Evgeny
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2017-10-30 1:10 AM
Hi Evgeny,
I did not pay attention to that.
So I can not tell you if something has changed.
BR Volker
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2017-11-06 7:45 AM
Hey
Bremauer.Volker
,Have you, by any chance, experimented with BAM mode? To have D3 inDRun (ADC3+BDMA) while D1/D2 in DStandby?
Thanks,
Evgeny
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2017-11-07 1:47 AM
Hey Evgeny,
sorry no, not needed
BR Volker
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2018-06-05 4:40 AM
Hi Volker, could you outline briefly what were the 'source file changes' for the memory location definition?
Thank you.
