cancel
Showing results for 
Search instead for 
Did you mean: 

stm32f429 tim8 in up count mode, update interrupt couldn't generate 10Mhz PWM.

sheng yang
Associate III

stm32f429 ran in PCLK2 with 160MHz, and TIM8 prescaler division set to 0, auto reload set to 1.set up interrupt enable.

in TIM8 update interrupt handler, just toggle PD4 pin out.

when use oscilloscope to check the wave of PD4, just get around 2.3MHz. Can TIM8 generate 10MHz PWM with PD4 ?

1 ACCEPTED SOLUTION

Accepted Solutions

MCU is overloaded by interrupts. Be aware that entering and exiting interrupt routine take some time as well as your code inside. Generaly you should not call more then about 100k ISR per second (and even that depends on how long the ISR is).
You should use "hardware" PWM (using timer outputs). 

View solution in original post

2 REPLIES 2

MCU is overloaded by interrupts. Be aware that entering and exiting interrupt routine take some time as well as your code inside. Generaly you should not call more then about 100k ISR per second (and even that depends on how long the ISR is).
You should use "hardware" PWM (using timer outputs). 

I'm sorry reply so late. I wonder can PD4 associate with a PWM output?I just see PD4 alternate function as:

shengyang_0-1719796602088.png