cancel
Showing results for 
Search instead for 
Did you mean: 

PWM TIM4 4KHz 50% Duty Cycle

Martin.Sergio
Associate III
Posted on October 03, 2017 at 09:09

The original post was too long to process during our migration. Please click on the attachment to read the original post.
1 ACCEPTED SOLUTION

Accepted Solutions
Posted on October 03, 2017 at 10:04

Don't you have an 8MHz crystal also on that second board?

JW

View solution in original post

4 REPLIES 4
Posted on October 03, 2017 at 09:42

   With this PCB(25Mhz) and these configurations the output signal is not 4KHz

And how much is it?

You can verify the system clock frequency by outputting it onto a MCO pin.

JW

Martin.Sergio
Associate III
Posted on October 03, 2017 at 09:51

Hi,

   The output Frecuency in the PWM Pin is 1.28KHz...

InputClock

25MHz/8MHz = 3.125 times faster

Output Signal

8MHz -> 4KHZ

25MHz -> 1.28KHz

The Output Signal is 3.125 times slower

Something in my configuration is wrong but I can't find it

Thanks in advance,

    Sergio

Posted on October 03, 2017 at 10:04

Don't you have an 8MHz crystal also on that second board?

JW

Posted on October 03, 2017 at 10:13

Hi,

   That was the mistake

...

   I thought I had soldered a 25MHz crystal but soldered one of 8MHz also on this PCB

   I was convinced that I had sold one of 25 and that the error was in the software

Thank you very much

   Sergio