|
|||||||||||
Technical Support Support Resources
Product Information |
MCBX51: Problems With MON51 and Timer 2Information in this article applies to:
QUESTIONI'm using Timer 2 on the Philips 8xC51RD2 device. My program runs fine under the µVision 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? ANSWERThe 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 µVision 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.
Add the following to your application to reserve the serial interrupt of the external UART.
If you have not enabled Stop Program Execution with Serial Interrupt, you do not have to reserve this memory. MORE INFORMATION
SEE ALSOLast Reviewed: Thursday, February 25, 2021 | ||||||||||
|
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.