FTM0_Init: Processor Expert

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

FTM0_Init: Processor Expert

Jump to solution
1,010 Views
armendgecaj
Contributor III

Hi all,

i am using the TWR_K60F Board with CPU: MK60FN1M0VLQ12.

I am trying to create a PWM Signal on a PIN (PTC3). The PWM Signal have to be a rectangle signal.

I used the FTM_Init Component from Processor Expert. 

My configurations are:

Clock

-Clock gate --> enabled

-Clock source --> System Clock

- Prescaler --> divide by 1

- Counter Init --> 0

- Modulo counter --> 4

Channel

- Channel 2 --> Enabled

- Channel Mode --> edge-aligned PWM

- channel value register --> 2

- Pin --> Enabled (PTC3)

Now i have a PWM signal with a period of 0.104 us (9.6 MHz) and a duty cycle of 50%.

If i look at the oscillocop then i see the following signal

pastedImage_3.jpg

But it has to be a rectangle signal. If i reduce my frequence (for example to 1MHz) then i will get a rectangle signal like that:

pastedImage_4.jpg

That is what i need because my camera needs a PWM signal that have a rising time maximum of 5 ns.

I also tried to add a GPIO_Init Component. I enabled the PTC3 - pin (pin sharing) and for the drive strength i selected high.

But i did not help. So if the frequence is to high then i will get a sinus wave.

What can i do?

I need a PWM signal with a frequence of 24 MHz and a duty cycle of 50%. With my configuration i will not get a rectangle signal but almost a sinus wave.

Thank you for your help!

Best Regards 

Armend Gecaj

Labels (1)
0 Kudos
1 Solution
773 Views
Robin_Shen
NXP TechSupport
NXP TechSupport

Hi Armend,

I am afraid that may caused by your 50MHz bandwidth oscilloscope.

See the 5989-5733EN (Evaluating Oscilloscope Bandwidths for Your Application).

Digital Clock Measurement Comparisons.png

Best Regards,

Robin

 

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

View solution in original post

0 Kudos
4 Replies
773 Views
egoodii
Senior Contributor III

The extreme 'overshoot' even on the slow-speed-waveform's edges tells me you are also dealing with a 'long wire' and 'improper termination' for the edge-rates you are trying to support.  Try putting a 47ohm resistor in series right at the Kinetis output.

I also assume the shown 'vertical scale' of 20V/div is 'expecting' a x10 probe, while you have a low-bandwidth x1 probe attached (straight wire???).

773 Views
armendgecaj
Contributor III

Hi EARL GOODRICH

you are right. It has to be a x10 probe, not a x1 probe. 

I will also try to put a 47 ohm resistor in series right at my output.

Thank you for your help.

Best Regards

Armend 

0 Kudos
774 Views
Robin_Shen
NXP TechSupport
NXP TechSupport

Hi Armend,

I am afraid that may caused by your 50MHz bandwidth oscilloscope.

See the 5989-5733EN (Evaluating Oscilloscope Bandwidths for Your Application).

Digital Clock Measurement Comparisons.png

Best Regards,

Robin

 

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
773 Views
armendgecaj
Contributor III

Hi Robin,

 I think you might be right. I will try it.

Thank you very much.

Best Regards

Armend

0 Kudos