FXTH87 STOP1 RTI Error

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

FXTH87 STOP1 RTI Error

跳至解决方案
954 次查看
mhusthutchinson
Contributor I

Hey,

I'm using FXTH8711 with RTI to 32ms and PWU wake-up mode to 1 second. These 2 timers use LFO clock (always ON in RUN/STOPx modes).

I have one specific processus for RTI and one other for PWU.

With the PWU: the TPMS wake-up and resets from reset-vector and when in my application I enable INTERRUPT (CLI) it enters in PWU handler. It is OK.

With the RTI the TPMS stays in STOP1 mode and when it resets (PWU timeout reached) the RTI interrupt flag is not set.

Is RTI timer running in STOP1 mode ? In the datasheet it is written that RTI timer can be used (with LFO clock) to wake-up from STOP1 because of interrupt event. It is indicated too that any reset (example: wake-up from STOP1 mode) clears the RTIF (RTI Flag pending event) so in my application I can never check if this timeout has been reached to execute a specific processus associated to RTI.

Can you help me please ?

Best regards,

Romain

标记 (4)
0 项奖励
回复
1 解答
829 次查看
TomasVaverka
NXP TechSupport
NXP TechSupport

Hi Romain,

Yes, the RTI can be used as wake-up source from STOP1.

Below is an example of initialization to use the RTI as wake up source from STOP4 or STOP1:

 

        // First clear flag

        SRTISC_RTIACK = SET;

        // Select LFO as clock

        SRTISC_RTICLKS = CLEAR;

        SRTISC_RTIS = period; // where period takes one of the values specified in Table 24

        // Enable interrupt // No effect for wake up from STOP1

        SRTISC_RTIE = SET;

 

Table 24.jpg

 

It is correct that upon wake up from STOP1 on RTI interrupt, there will be no associated flag in TPMS_INTERRUPT_FLAG or SIMSES register.

This fact can be used to determine if the wake up from STOP1 was due to RTI or not; for example the following can be done upon wake up from STOP1: if SPMSC2_PDF is set, TPMS_INTERRUPT_FLAG and SIMSES are clear and RTI interrupt was enabled before entering STOP1 (this information can be stored in a variable in the PARAM section) then the wake up was due to RTI and the specific process can be executed.

Best regards,

Tomas

 

在原帖中查看解决方案

0 项奖励
回复
2 回复数
830 次查看
TomasVaverka
NXP TechSupport
NXP TechSupport

Hi Romain,

Yes, the RTI can be used as wake-up source from STOP1.

Below is an example of initialization to use the RTI as wake up source from STOP4 or STOP1:

 

        // First clear flag

        SRTISC_RTIACK = SET;

        // Select LFO as clock

        SRTISC_RTICLKS = CLEAR;

        SRTISC_RTIS = period; // where period takes one of the values specified in Table 24

        // Enable interrupt // No effect for wake up from STOP1

        SRTISC_RTIE = SET;

 

Table 24.jpg

 

It is correct that upon wake up from STOP1 on RTI interrupt, there will be no associated flag in TPMS_INTERRUPT_FLAG or SIMSES register.

This fact can be used to determine if the wake up from STOP1 was due to RTI or not; for example the following can be done upon wake up from STOP1: if SPMSC2_PDF is set, TPMS_INTERRUPT_FLAG and SIMSES are clear and RTI interrupt was enabled before entering STOP1 (this information can be stored in a variable in the PARAM section) then the wake up was due to RTI and the specific process can be executed.

Best regards,

Tomas

 

0 项奖励
回复
829 次查看
mhusthutchinson
Contributor I

Hi Tomas,

Thanks for your help.

Best regards,

Romain

0 项奖励
回复