FXTH871 Interrupt Enable/Disable Question

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

FXTH871 Interrupt Enable/Disable Question

Jump to solution
983 Views
csaunders9526
Contributor I

Hello Community, 

I was looking through the code for the FXTH871, and I noticed that the code has this defined:

#define EnableInterrupts __asm CLI /*!< Macro to enable all interrupts. */
#define DisableInterrupts __asm SEI /*!< Macro to disable all interrupts. */

CLI means Clear Interrupts in Assembly
SEI means Set Interrupts in Assembly.

Shouldn't these be reversed?  Am I missing something?

Also, I was wondering:

If I disable all interrupts, and then call STOP1, can I keep the device disabled until I clock the Reset Pin?  I want to keep it in STOP1 indefinitely, until I trigger the Reset Pin.

Thanks Community.

Labels (1)
Tags (1)
1 Solution
802 Views
TomasVaverka
NXP TechSupport
NXP TechSupport

Hello Carl,

In the S08 microcontroller, clearing the interrupt mask bit (CLI) enables the interrupts and setting the interrupt mask bit (SEI) disables the interrupts.

 

Disabling the interrupts will not prevent a wake up from STOP1 but will prevent the execution of the interrupt vector: the FXTH will wake up from STOP1 even if the interrupts are disabled, but the interrupt vector will be not be accessed after the device wakes up.

 

It is not possible to keep the FXTH in STOP1 indefinitely, the FXTH will always wake up on a PWU interrupt. The PWU cannot be disabled, but can be configured to the maximum period in order to wake up with the longest period possible.

Best regards,

Tomas

View solution in original post

2 Replies
803 Views
TomasVaverka
NXP TechSupport
NXP TechSupport

Hello Carl,

In the S08 microcontroller, clearing the interrupt mask bit (CLI) enables the interrupts and setting the interrupt mask bit (SEI) disables the interrupts.

 

Disabling the interrupts will not prevent a wake up from STOP1 but will prevent the execution of the interrupt vector: the FXTH will wake up from STOP1 even if the interrupts are disabled, but the interrupt vector will be not be accessed after the device wakes up.

 

It is not possible to keep the FXTH in STOP1 indefinitely, the FXTH will always wake up on a PWU interrupt. The PWU cannot be disabled, but can be configured to the maximum period in order to wake up with the longest period possible.

Best regards,

Tomas

802 Views
csaunders9526
Contributor I

Thank you very much Tomas.  I really appreciate your help.

0 Kudos
Reply