Hello,we have a problem which is probably related to the interrupt handler. We devolved a thread which waits for a buffer to be transmitted via the serial interface. The transmission is done interrupt based (SER 2 TX level = 0x0c). Occasionally , this thread has to wait forever, because somebody has switched of the interrupt (SER 2 TX level = 0x0C) permanently. I checked the variable NAIRQMask which indicates which interrupts had been switched on/off via the functions NAEnableIsr()/NADisableIsr(). According to this variable, the interrupt is switched on. But if I read the IER register (0xffb00030), while no other interrupt is pending, the interrupt is deactivated. Has somebody a clue what the cause if this problem could be ? Is there a stack size to small ? If yes which one ? Thanks in advance Noah
I guess you have written your own ISR? In that case I have a few questions: 1. Have do disabled the NetOS serial driver in bsp.h and in appconf.h o your com port. If not, NetOS will use this port as a dialog port and/or a port for sending printf text. 2. Do you use the NAInstallIsr routine when you connect your ISR to the interrupt handler?
Hello Jesper, we found the problem. The problem was not stack related. The problem was caused by the function NAEnableIsr()/NADisableIsr(). We used the function NAEnableIsr()/NADisableIsr() out of different threads. These functions are not reentrant because they access the global variable NAIRQMask . After disabling all Interrupts within these function solved the problem. Thanks Noah
You should again check your IER Register, it may be that a little bit error is occurring.