Skip to main content
Jnevi.1
Associate III
May 5, 2023
Solved

switch from stm32f407 to H753 PWM period halved

  • May 5, 2023
  • 2 replies
  • 1649 views

Hi,

i had a programm running on the stm32f407 and PWM output via Tim2

The timer is configured with clock 84MHz and PWM Counter Period 5040 which gives me a period time of 60us. The timer is clocked via APB1. this works fine


_legacyfs_online_stmicro_images_0693W00000bjT3gQAE.pngnow i use an h753 with the same settings(at least this is what i think) and my output period is halved with the same counter period of 5040

ok, i could double my counter period and get the result i want but i do not understand what setting i'm missing which halves my period. can anybody give me a hint where to look?


_legacyfs_online_stmicro_images_0693W00000bjT45QAE.png

This topic has been closed for replies.
Best answer by Tesla DeLorean

Unpack the clock routing from the chip side, not the PC GUI.

Dump/Decode the RCC registers.

Check the Peripheral Clock selections as there are now muxes to route different TIM clocks, not just the APB or APB*2​

2 replies

Tesla DeLorean
Tesla DeLoreanBest answer
Guru
May 5, 2023

Unpack the clock routing from the chip side, not the PC GUI.

Dump/Decode the RCC registers.

Check the Peripheral Clock selections as there are now muxes to route different TIM clocks, not just the APB or APB*2​

Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
Jnevi.1
Jnevi.1Author
Associate III
May 5, 2023

ok, everything works as expected. D2PPPRE1 was wrong. seems like i had main.c opened while generating with cubemx, so the changes where completly written. after regenrating, the the divider was set correctly and now the period is 60us as expected.

so the error sits in front of the pc. buisiness as usual :(