STM32H743 pwm interrupts with high frequency
Greetings!
I generate periodically a 10MHz PWM signal of 8 pulses. The PWM signal has high polarity so the first edge is falling. I need to generate an interrupt/event on the rising edge that'll signal DMA to move data from a GPIO IDR to a data buffer. So 8 interrupts/events that cause 8 DMA transfers. I have tried using one pulse mode with a repetition counter of 8 but either the pwm doesn't stop during the interrupt or it goes too fast and if I just generate one pulse with no repetition and use a counter in
HAL_TIM_PWM_PulseFinishedCallback(TIM_HandleTypeDef* htim){
tim_irqs++;
if(tim_irqs < 8){
HAL_TIM_PWM_Start_IT(&htim15, TIM_CHANNEL_1);
}
}
it generates only one pulse. Variable tim_irqs is declared as volatile. Not doing any of that DMA stuff yet, just been trying to get the interrupts working correctly. I've been thinking if this is an timing problem (program runs too slow) or is the timer configured incorrectly? But the CPU frequency is 480MHz and the timer frequency is 240MHz. This is the first time I'm using timers like this and honestly not 100% sure what I'm doing. Any help would be appreciated. I've attached screenshots of my Cube setup and clock configuration.
EDIT: Added the photos to the text body


