FXTH871 Interrupt Enable/Disable Question

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

FXTH871 Interrupt Enable/Disable Question

ソリューションへジャンプ
1,008件の閲覧回数
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.

ラベル(1)
タグ(1)
1 解決策
827件の閲覧回数
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

元の投稿で解決策を見る

2 返答(返信)
828件の閲覧回数
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

827件の閲覧回数
csaunders9526
Contributor I

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

0 件の賞賛
返信