Keil Logo

CX51: Filling Unused Interrupt Vectors with SJMP $


Information in this article applies to:

  • Cx51 All Versions

QUESTION

I need to certify my application, and one of the requirements is that I must fill unused interrupt vectors with an SJMP $ instruction.

How can I do this?

ANSWER

Add a small assembler module to your application that defines absolute segments for each unused interrupt vector location. For example:

          CSEG AT 0x0013  ; external interrupt 1
          SJMP   $

          CSEG AT 0x001B  ; timer 1 interrupt
          SJMP   $

          CSEG AT 0x0023  ; UART interrupt
          SJMP   $

          CSEG AT 0x002B  ; timer 2 interrupt
          SJMP   $

          END

SEE ALSO


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.