Keil Logo

µVISION DEBUGGER: Serial Interrupt of Monitor does not work


Information in this article applies to:

  • µVision 2.34
  • Cx51 Compiler, all versions
  • C251 Compiler, all versions

QUESTION

I am using the Keil Monitor (MON51, MON251, FLASHMON, and MON390) to debug my application. Although I checked the box Serial Interrupt in the Settings Dialog, the Monitor does not stop and reports a connection error.

How can I solve this error?

ANSWER

There are two things you need to do in your application:

  • Reserve the Interrupt vector
    Your application may not write to the serial interface vector. The easiest way to reserve this vector is to locate an array of 3 bytes at a fixed address at the beginning of your C program. Just reserve the serial interrupt of the on-chip interface that your monitor configuration uses.
    • For the standard (or first) onchip UART:
       char code reserve[3] _at_ 0x23;
      
    • For the second onchip UART:
       char code reserve[3] _at_ 0x53;
      
  • Enable the interrupt system
    The interrupt system must be enabled with the global EA flag for serial interrupt. The Monitor only initializes the interrupt system, and it does not set the general interrupt flag EA. So you need to set EA in your application, which may look like:
 EA = 1;

Note, the name of the EA register might be different on some 8051 device variants.

SEE ALSO

Last Reviewed: Thursday, January 7, 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.