RT117x keep clock running to CPU when entering WFI()

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

RT117x keep clock running to CPU when entering WFI()

1,183 Views
carstengroen
Senior Contributor II

While porting code from RT1064 to RT1176, I need to keep the clock running to the core(s) when entering WFI.
I use WFI in my idle loop (RTOS), at the same time I need the CPU clock to be enabled.

In RT1064 this was easily done with:

CLOCK_SetMode(kCLOCK_ModeRun)

However, on the RT1176 I'm kind of lost. I don't need all the bells and whistles of the clock schemes, setpoints etc. I simply just need the CPU clock to keep running in wait (WFI).
How do I accomplish this the easiest way ??

0 Kudos
Reply
5 Replies

1,125 Views
lucas_cao
NXP Employee
NXP Employee

Hi 

I test your method on RT1060 EVK by the following code. The CPU will under WFI status untill a interrupt is triggered.

lucas_cao_0-1692844417091.png

 

 

0 Kudos
Reply

1,118 Views
carstengroen
Senior Contributor II

Thanks @lucas_cao ,

but if you look at my question, this is not my problem

I have it running just fine on RT1064. It is on RT1176 we have a problem as there is no similar function to enable the clock.

0 Kudos
Reply

1,143 Views
Miguel04
NXP TechSupport
NXP TechSupport

Hi @carstengroen 

RT10xx and RT11xx have a different power scheme, look into  AN13148

I hope this application note helps you to understand better the RT117x, let me know if you have a question.

Best Regards, Miguel.

0 Kudos
Reply

1,140 Views
carstengroen
Senior Contributor II

Thanks @Miguel04 

I/we have been reading the different AN and manuals on the clock/power modes.

The problem is that this is extremely complicated and complex. It is indeed VERY hard to figure out what is needed when and how (I think I'm not the only one that thinks this...), and digging thru the AN you linked and its 59 pages, and then study the RM for all this is a huge task for such a relatively simple question (I think ?)

So, isn't there a simple easy to understand way of enabling the CPU clock in WFI mode ? Just like the single easy SDK function on RT1064 which simply enabled the clock also in wait mode ??
This is really all I need in order to finish the porting (the need is for a idle loop in a realtime kernel to calculate CPU load).

We looked in the SDK examples etc, and could not find our way in or out with regards to this simple requirement.

Please help if possible

0 Kudos
Reply

1,061 Views
Miguel04
NXP TechSupport
NXP TechSupport

Hi @carstengroen 

It is not that simple on the RT11xx, the power state depends on: CPU mode, setpoints (SP )and Standby (STBY).

For example:

  • Run mode, SP1, no STBY.
  • Wait mode, SP5, STBY.
  • Stop mode, SP10, No STBY.
  • Suspend mode, SP1, STBY.

You change the configurations of the setpoints on setpoint_table_def.h file.

Miguel04_0-1693421281878.png

This image illustrates the state of the clock depending on the Setpoint and there is more information of the setpoints on the appnote.

Also, there is an example on the sdk for power modes.

Best Regards, Miguel.

0 Kudos
Reply