Wait mode, period of Time interrupt   change

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Wait mode, period of Time interrupt   change

跳至解决方案
2,058 次查看
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

标签 (1)
1 解答
1,745 次查看
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.


在原帖中查看解决方案

4 回复数
1,746 次查看
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.


1,745 次查看
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 项奖励
回复
1,745 次查看
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.


1,745 次查看
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.