Wait mode, period of Time interrupt   change

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

Wait mode, period of Time interrupt   change

Jump to solution
908 Views
aguo1223
Contributor III

Hi all,

     Now I can enter Wait mode and wake up through CAN receive interrupt.

But after wake up  the period of Time interrupt  was changed !!! 

 

Kris

Labels (1)
1 Solution
595 Views
RadekS
NXP Employee
NXP Employee

Could you please add few details?

This topic is related to S12P. Correct?

By “Time interrupt” you mean RTI, TIM, API,…?

By “period of Time interrupt” you mean just first period after wake-up, or all periods after wake-up?

What you set as clock source for your time interrupt?

I can imagine case when you use PBE mode (busclock=oscclock/2) and MCU wake-up from full stop mode. In that case will be PLL enabled automatically (PLLSEL=1) and after wake-up you should wait for UPOSC flag (oscillator ready) and clears PLLSEL bit back, otherwise you will get different bus clock value.


View solution in original post

4 Replies
596 Views
RadekS
NXP Employee
NXP Employee

Could you please add few details?

This topic is related to S12P. Correct?

By “Time interrupt” you mean RTI, TIM, API,…?

By “period of Time interrupt” you mean just first period after wake-up, or all periods after wake-up?

What you set as clock source for your time interrupt?

I can imagine case when you use PBE mode (busclock=oscclock/2) and MCU wake-up from full stop mode. In that case will be PLL enabled automatically (PLLSEL=1) and after wake-up you should wait for UPOSC flag (oscillator ready) and clears PLLSEL bit back, otherwise you will get different bus clock value.


595 Views
aguo1223
Contributor III

Hi Radek Sestak,

                        I have another Question now。 When have entered Wait Mode,the watchdog is working too, so COP will reset MCU !    Can I close the watchdog before enter wait mode? how ?

0 Kudos
595 Views
RadekS
NXP Employee
NXP Employee

There are two ways how enable COP.

  1. Write to CPMUCOP. CPMUCOP register is writing once in normal mode.
  2. We can configure FOPT at address 0xFF0E. During reset this value is loaded into CPMUCOP register automatically (See chapter 1.12 COP Configuration in reference manual, page 47; COPCTL is just error in documentation = copy from older MCUs datasheet). In that case we still have one write, but writing CR[2:0] to “000” has no effect.

Therefore we cannot simply disable COP in wait mode.

For stop mode:

The clock source for the COP is either IRCCLK or OSCCLK depending on the setting of the COPOSCSEL bit. In Stop Mode with PSTP=1 (Pseudo Stop Mode), COPOSCSEL=1 and PCE=1 the COP continues to run, else the COP counter halts in Stop Mode.


595 Views
aguo1223
Contributor III

Hi Radek Sestak,

      Thank you first,

       You  are right ,this topic is related to S12P and all periods of TIM after wake up from wait mode. Not from full stop mode.