DAC in DMA not working?
- 2 replies
- 770 views
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
