Keil Logo

ISD51: DEBUGGING RTX51 TINY APPLICATIONS, PART 2


Information in this article applies to:

  • ISD51 Version 2

QUESTION

When running a program under control of ISD51 with software breakpoints, the program execution speed is reduced considerably. But timer 0, which is used by RTX51 Tiny, runs at its inherent speed, and overflows some hundred times per second, causing the program to constantly call the timer 0 interrupt service routine. This makes debugging of RTX51 Tiny applications with ISD51 almost impossible.

Is there a way to avoid this problem (except by using Flash Breakpoints)?

ANSWER

The timer 0 interrupt routine used by RTX51 Tiny reduces its interrupt priority which causes this problem (this can be seen in the HW_TIMER_CODE macro in the file Conf_tny.A51).

The following change in ISD51.H stops timer 0 while ISD51 is executing:

sbit TR0 = TCON ^ 4;
  :
  :
SerialInterrupt:
                 CLR    TR0        ; added instruction: stop timer 0

When leaving the ISD51 interrupt service routine, timer 0 must be started again. This is done by replacing any RETI instructions in ISD51.A51 by:

                 SETB    TR0            ; added instruction: activate timer 0
                 RETI

With these changes, timer 0 still runs several times faster, compared with the user program, but sufficiently slow for debugging purposes.

MORE INFORMATION

SEE ALSO

Last Reviewed: Friday, July 15, 2005


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.