Keil Logo

µVISION DEBUGGER: SERIAL INTERRUPT OF MONITOR DOES NOT WORK


Information in this article applies to:

  • µVision Version 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.

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 in 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, 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 that the name of the EA register might be different on some 8051 device variants.

SEE ALSO

FORUM THREADS

The following Discussion Forum threads may provide information related to this topic.

Last Reviewed: Tuesday, September 12, 2006


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.