2020-12-03 08:56 AM
Hi
I'm just trying to run a simple DAC program using the DMA but its not working. The details are as follows:
in my main function before entering while loop i do the following
I have been using complete call-backs and half complete call-back as well to check whether the data has been chunk out or not but no success.
I have also tried to change the priority level of the DAC DMA stream 5 to high as well but still no success.
Any solution to this problem would be much appreciated
P.S I am using the latest versions of cube MX and IDE
2020-12-03 09:32 AM
Follow the example in CubeMX:
Don't call both HAL_DAC_Start and HAL_DAC_Start_DMA.
> HAL_DAC_DMA_START
It's a lot better to just paste your code here so people can read/interpret it. That way you avoid issues like typos like this.
2020-12-04 02:11 AM
Thanks for the reply @TDK . I know it was a silly move to call both HAL_DAC_START and HAL_DAC_START_DMA functions as nothing was working at that moment but it turned out the timer i was using for DMA trigger out event was set to "Timer event selection = RESET" whereas it needs to be on "UPDATE EVENT" for DAC DMA to work properly. My bad