|
|||||||||||
Technical Support Support Resources
Product Information |
RTX51 TINY: Hardware Timer Interrupt failsInformation in this article applies to:
QUESTIONI'm using the RTX Tiny kernel on an Analog Devices ADuC834 MicroConverter. I have added the following hardware timer interrupt code to the CONF_TNY.A51 configuration file:
I am using the simulator to verify my code behavior. Everything seems to work correctly (several timer interruption calls with the correct behavior) however, from time to time, the value of us_value is changed when the program exits for RTX_TNY call. What can be the reason for this problem? ANSWERThe hardware interrupt code needs to save all modified registers. You need to PUSH and POP the following registers that are altered in your code: DPL, DPH (=DPTR), PSW (required for Carry flag that is modified by ADDC). When you change your code as follows, everything should work fine:
If you are in doubt, you should write the interrupt service routine with the C51 Compiler and copy the generated assembler instructions (i.e. generated with the SRC directive) to the CONF_TNY.A51 file. MORE INFORMATION
SEE ALSO
Last Reviewed: Thursday, February 25, 2021 | ||||||||||
|
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.