cancel
Showing results for 
Search instead for 
Did you mean: 

Configuring circular burst DMA using the ioc file

S-Bat
Associate

I'm relatively new to STM32 and it's my first time working with DMA so this will probably be a very basic question.

I'm using STM32G474 and I want to have 3 channels of advanced timer TIM8 working in "PWM generation CHx CHxN" mode. At a later stage I'm looking to run FOC on them, but for now I just want to change the duty cycle of each channel period by period, by reading the duty cycle for the next period from a predefined table and transferring the duty cycle value using circular burst DMA to update all 3 channels at the same time without software overhead.

These are my DMA settings for TIM8 in the ioc file

SBat_0-1757406846993.png

I can't find the settings for which register i want to write to using DMA. I have ChatGPT telling me that DMA can only write to CCR register and Gemini telling me I can set which register to write to in the ioc. Both are pointing me to reference manual RM0440 (https://www.st.com/resource/en/reference_manual/dm00355726.pdf), but I'm getting overwhelmed there and can't find anything relevant in the DMA, DMAMUX or TIM8 chapters.

Basically:
- I'm looking to find out if i can change the register to be written to, as well as the burst length in the ioc file.
- If DMA is always writing to a set register for some peripheral where can I check what register that is?
- If it comes to it that it needs to be configured in the application code and not the ioc, what HAL function would I be using to start DMA in a circular, burst mode?

Thank you

 

1 REPLY 1
Dor_RH
ST Employee

Hello @S-Bat,

Could you try the TIM_DMABurst example on the NUCLEO-G474RE: Link(here)

It contains an .ioc file that will be helpful for your application with DMA burst and to guide you.

I hope my answer has helped you. When your question is answered, please select this topic as the solution that answered you, as it will help others find that answer faster.

Thanks for your contribution.

Dor_RH