ARM Technical Support Knowledge Articles

USER INTERRUPT FUNCTION DOES NOT WORK

Applies to: RTX51 Tiny Real-time Kernel

Answer


Information in this article applies to:


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

SEE ALSO

Article last edited on: 2006-03-14 01:28:53

Rate this article

[Bad]
|
|
[Good]
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