2019-09-04 10:17 AM
dear all,
I keep studing the STM32H7 architecture and this time I am trying to control a DAC using DMA which seems an easy task. However, in my case, the output is always at zero. I have used it without DMA and it works, therefore my HW debugging works.
If I understood correctly the various tutorials the following lines should do the job:
MX_DMA_Init();
MX_DAC1_Init();
MX_TIM6_Init();
HAL_TIM_Base_Start(&htim6);
HAL_DAC_Start_DMA(&hdac1,DAC1_CHANNEL_1(uint32_t*)table,TABLE_SIZE,DAC_ALIGN_8B_R);
where uint32_t table[TABLE_SIZE];
The DAC is triggered by TIM6 Update event. Timer clock is 64Mhz, prescaler 16, period 40000 which should correspond to 10ms conversion rate. DAC DMA is set as circular, DMA 1stream 0.
I am sure to have used the same configuration without problems with a F4..Anyone knows what I am doing wrong?
thank you
2019-09-04 01:38 PM
I don't use Cube/CubeMX, but the substantial difference between 'F4 and 'H7 in this regard is, that while the routing of the trigger from timer to DMA channel in 'F4 is fixed (see table in DMA chapter in RM), in 'H7 there's the DMAMUX routing the trigger from timer to DMA itself. So you have to tell somehow Cube, that you intend to trigger given DMA stream from timer.
JW
2019-09-04 02:44 PM
Interesting. I found this post which looks like myself writing 🙂 https://community.st.com/s/question/0D50X00009bMe5kSAC/stm32cubemx-issues-with-stm32h743zitx
However I do not see a solution at the moment.