cancel
Showing results for 
Search instead for 
Did you mean: 

Need help fetching transfer complete interrupt with DMA and DAC

manhoosbilli1
Associate

I'm trying to output a triangular wave, i'm very new to this so let me know if i'm doing anything wrong. 

I'm using stm32 f3 discovery board with stm32f303vc, I selected circular mode, started timer 7 with some frequency and update event mode, configured dma with channel 3 so it can go to dac channel 1. I'm trying to lookout for the transfer complete interrupt, when detected i'd like to increment dac channel 2 value. however i'm not sure how to look for the interrupt? i'm using HAL and i looked through the examples but i couldn't find how to enable the appropriate interrupt and how to look for it. 

I found a callbackmethod in dac.c that was weak type and i defined that in my main.c file and put a break point in it. but nothing happened i think because i haven't enabled the interrupt. 

I was also wondering if circular mode would be appropriate for my needs, is normal mode better for this? but i'm not sure who to trigger the dma manually. 

Any links to tutorials and helping material will be very appreciated. Thanks 

1 REPLY 1
SHs
ST Employee

Hello @manhoosbilli1 ,

Could you please check DAC_SignalsGeneration example available in our firmware package? You can find it under this path:

STM32CubeF3/Projects/STM32F303RE-Nucleo/Examples/DAC/DAC_SignalsGeneration at master · STMicroelectronics/STM32CubeF3 · GitHub

 

With regards,

Please close this topic by clicking on “Accept as solution" button if it fully answered your question.