ARM Technical Support Knowledge Articles


Applies to: MCBx51 Evaluation Board


Information in this article applies to:


I'm using Timer 2 on the Philips 8xC51RD2 device. My program runs fine under the uVision Simulator, but when I use the Monitor-51 Driver, the program stops at the first line of the initialization of Timer 2. Then, I receive the following message:


What is going wrong?


The most likely cause of this is that you are using Timer2 as the baudrate generator for the serial UART. When this is the case, you may not change the configuration of Timer 2 without losing the serial connection (since this will also affect the baudrate of the serial port).

If you must use Timer 2 in your application, you must use a different timer for the serial port baudrate generator.

The Keil MCBx51 Evaluation Board allows you to use an external (16550) UART for Monitor communication. This is selected when you set the DIP switch ext_UART to ON. Using the external UART frees up the on-chip UART and Timer for use by your application.

If you use the MCBx51 Evaluation Board and if the Stop Program Execution with Serial Interrupt option in uVision is enabled (see Project - Options for Target - Debug - Keil Monitor Driver Settings - Stop Program Execution with Serial Interrupt) you must reserve the memory used by the serial interrupt in your application. When you enable the serial interrupt option, the monitor automatically writes the serial interrupt vector. If you have program code or data there, it is overwritten.

Add the following to your application to reserve the serial interrupt of the on-chip 8051 UART.

char code reserve [3] _at_ 0x23;         /* Space for on-chip UART serial interrupt */

Add the following to your application to reserve the serial interrupt of the external UART.

char code reserve [3] _at_ 0x3;          /* Space for EXT0 interrupt */

If you have not enabled Stop Program Execution with Serial Interrupt, you do not have to reserve this memory.



Article last edited on: 2006-11-19 09:27:55

Rate this article

Disagree? Move your mouse over the bar and click

Did you find this article helpful? Yes No

How can we improve this article?

Link to this article
Copyright © 2011 ARM Limited. All rights reserved. External (Open), Non-Confidential