Keil™, An ARM® Company

Technical Support

MON166: MONITOR STOPS WORKING AFTER EXECUTING CODE


Information in this article applies to:

  • C166 Version 3.x
  • C166 Version 4.x

SYMPTOMS

When using MON166 and executing code, the monitor stops responding after starting the target program.

CAUSE

This problem may be caused by the following:

  • Overwriting the interrupt vectors used by the monitor.
  • Overwriting the monitor code or data areas.
  • Changing the P3 direction register (used by the serial port).

RESOLUTION

Overwriting the interrupt vectors used by the monitor.

If you use the Monitor in Bootstrap mode, you must reserve the interrupt vectors and the monitor code area. In most cases you have to RESERVE at least the serial interrupt 0 and the NMI trap with L166. Under µVision2 you need to enter this information under Options - L166 Misc - Reserve:

8H-0BH, 0ACH-0AFH

Overwriting the monitor code or data areas.

You should also reserve the monitor code and data area. Please check the configuration of your monitor to figure out which areas you need to reserve. For most boards you will find this information under µVision2 in the dialog Options - Debug - Monitor Settings - Description.

Changing the port 3 direction register (used by the serial port).

I/O port 3 is used by the monitor for the serial port (typically) but may also be used in your application. Therefore, you need to make sure that the register P3 and DP3 are configured as follows:

  • TxD0 (P3.10) as output and initilize the P3.10 port with '1'.
  • RxD0 (P3.11) as input.

For example:

  P3   = 0x0400;         // P3.10 must be 'high'
  DP3  = 0x0400;        // P3.10 must be 'output'

FORUM THREADS

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

Last Reviewed: Tuesday, September 14, 2004


Did this article provide the answer you needed?
 
Yes
No
Not Sure