K28, FTM driving PWM and sleep modes

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

K28, FTM driving PWM and sleep modes

534 Views
netstv73
Contributor III

Hello NXP forum.

I'm wondering if I can do this as the documentation may say I can, but I can't find it.

I have two FTM's that I would like to start a PWM signal on.  Two different channels and frequencies.

While these PWM signals are working, I'd like to be in the VLPW state that just waits for one of the interrupts that will trigger when it is time to change the PWM frequencies.  That way, before I sleep, I can turn off anything I need to turn off and only have on the GPIO Ports I need.

Then when the GPIO's IRQ comes in, I want to handle some short business and then go back to sleep.

I thought I read about the ability to do this with DMA, can I also do it without DMA?

Thank You in Advance!

-stv

0 Kudos
1 Reply

428 Views
gerardo_rodriguez
NXP Employee
NXP Employee

Hello Steve,

 

The application you describe is possible.

 

According to Table 8-2. Module operation in low power modes from the K28 reference manual the FTM is fully functional in VLPW mode.

pastedImage_1.png

 

You can refer to the following examples from the latest SDK for the K28:

 

-For the FTM operation: driver_examples\ftm_simple_pwm

-For the VLPW operation: demo_apps\power_mode_switch

 

It is also possible to use the DMA to update the PWM frequency. However, you need to consider that the MOD register is buffered, so the update of the register is dependent on the clock source, FTM operation mode and FTM configuration. For more information on this, you can refer to the application note AN5261 - Kinetis Flextimer Buffered Registers Update.

 

Regards,

Gerardo