2024-06-01 08:05 PM
I’m using CubeIDE + STM32G4 to configure DMA transfers and I’m a bit confused by the interrupt code it generates. Configuring DMA transfers on TIM8 defaults 'DMA1 Channel1 global interrupt' to enabled and generates a DMA1_Channel1_IRQ_Handler function. The point of using DMA is to avoid using interrupt code, so I’m hoping this is unnecessary bloat. How much of this code has to exist?
2024-06-02 12:07 AM
DMA is unaware of what triggers it. In other words, the DMA interrupts are not triggered from the peripheral which triggers DMA; they are triggered from DMA. There are three events when the single-port DMA in 'G4 interrupts: Half Complete, Transfer Complete, and Transfer Error. Read the DMA chapter in RM.
That Cube interwebs DMA and TIM and interrupt and whatever code, for whatever purpose, is Cube's thing. I don't use Cube.
JW