| |||||
Technical Support Support Resources
Product Information | RTX51 TINY: USER INTERRUPT FUNCTION DOES NOT WORKInformation in this article applies to:
QUESTIONThe 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? ANSWERRTX51 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 ALSOLast Reviewed: Tuesday, March 14, 2006 | ||||
| |||||