I have a problem handling multiple interrupts.
Apparently, with MC9S08GB60 8-bit controller, I am trying to configure SCI2 communication using C in Freescale CodeWarrior. The application itself is upon receiving a particular string (e.g. !0000#), the receiving unit is to identify the string(!0000#) coming in and transmitting out acknowledgement (e.g. RecvOk). I have enabled both Transmit Interrupt (TIE) and Receiver Interrupt (RIE) to perform the task.
However, the problem here is when I enable both interrupts (i.e.,before "EnableInterrupts;" ), the main loop [for(;; )] is never executed at all [I put some LED indications(toggling) within for(;; ) loop to visibly see the execution].
I am sure I have cleared the SCI interrupt flags according to what is mentioned in the application notes by reading SCI2S1 register and write to SCI2D register for Tx IRQ.
What I suspect here is that one of the interrupts is never going out from itself which results in not giving a chance to the main program. But I am not sure what is preventing the main program from running.
Hope somebody will help me with this.