Keil Logo

C166: RTC Interrupt Request Flag remains set in Simulator


Information in this article applies to:

  • C166 All Versions

QUESTION

I'm using the ST10F269 Real-Time Clock (RTC). The manual states that an interrupt request flag is set by hardware whenever a service request from the respective source occurs. It is cleared automatically upon entry into the interrupt service routine or upon a PEC service.

However, this does not seem to be the case in the µVision simulator. Is there an error in the simulator?

ANSWER

No. There is no error in the Simulator.

The RTC is implemented as an X-Peripheral. RTC interrupts in the ST10F269 are connected indirectly to the Interrupt Controller as an alternate source for the external interrupts. Using EXISEL, you may select the source for the external Interrupt (Port2, an Alternate Source like the RTX, or Both combined through AND/OR).

Therefore, when an RTC interrupt occurs, it sets an External interrupt flag which is then automatically cleared upon entry into the interrupt service routine. The RTC flag which caused this interrupt is not cleared automatically. This is by design. If the External Interrupt is selected as RTC Interrupt OR'ed with Port2, you would be unable to distinguish which caused the interrupt if the RTC flag were to be cleared by the hardware.

MORE INFORMATION


Last Reviewed: Thursday, February 25, 2021


Did this article provide the answer you needed?
 
Yes
No
Not Sure
 
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.