2024-10-02 12:08 AM
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
2024-10-02 03:38 AM
Hello @manhoosbilli1 ,
Could you please check DAC_SignalsGeneration example available in our firmware package? You can find it under this path:
With regards,
2024-10-16 08:35 AM
Thanks for pointing that out. For some reason I can't see in my stm32 file tree such an examples folder. But upon inspection in github space i found that while there are examples that deal with DMA and DAC seperately. There isn't one that deals with them in union like there is for Flash to RAM with DMA i think I'd need something that will deal with peripheral. All further advice will be appreciated.
Regards,
Shoaib,
Undergraduate Physics,
COMSATS Islamabad, Pakistan