Keil Logo

RTX51 TINY: USER INTERRUPT FUNCTION DOES NOT WORK


Information in this article applies to:

  • C51 All Versions

QUESTION

The RTX51 Tiny User's Guide states that C51 interrupt functions can be used in parallel with the kernel. However, my RTX51 Tiny application hangs when I enable the following interrupt function.

void adc_int (void) interrupt 0 using  1 {
  unsigned char msb, lsb;

  msb = rd_msb;
  lsb = rd_lsb;
  msb = msb<<4;
  lsb = lsb>>4;
  adc_v= msb | lsb;
  isr_send_signal(4);
}

What could be the problem?

ANSWER

RTX51 Tiny does work in parallel with interrupt functions. However, RTX51 Tiny, by default, uses register bank 1 for its timer 0 interrupt. The registerbank configuration may be changed in CONF_TNY.A51.

When using the default timer interrupt setting for RTX51 Tiny, you must ensure that you use a different registerbank for other interrupts. Changing your interrupt function definition to:

void adc_int (void) interrupt 0 using  2 {

should solve the problem.

MORE INFORMATION

  • Refer to Interrupts in the RTX51 Tiny User's Guide.

SEE ALSO

Last Reviewed: Tuesday, March 14, 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.