We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
We have run into a problem in an old well functioning program. The arbitaration between two interrups seem not to work.
The two interrupts are the ASC0RxInterrupt and the T2_interrupt. Previously the T2_interrupt, used as a timer interrupt (10ms), had a very short service rutine but we had to increase it so it may take up too 500us. Now the ASC0RxInterrupt sometimes get hanged up and recieved chars are loosed. The ASC0RxInterrupt have higer interrupt level and should break the T2_interrupt but it does not always succeed. If we for instance make a while(1) in the T2_interrupt rutine we can see that the ASC0RxInterrupt works perfectly. So it definitly have a higer interrupt level. By toggling output pins we can study on an oscilloscope exactly whats happens. It looks like if a ASC0RxInterrupt occurs very close to a T2_interrupt the T2_interrupt will run until it is finnished and not until then the control is handled over to the ASC0RxInterrup. Since the RX0 is running on 9600 Baud a char is then lost.
Does anyone have any suggestion on what to do or try. We can find no sollution in the manuals?
Can I ask two questions?
1) Are you using local register banks (see errata INT_X.009)?
2) What is the interrupt level and group priority for the two interrupts? They can't have the same ILVL level.