7 Replies Latest reply on Sep 20, 2016 3:16 AM by user_1377889

    Issue with implementing multiple ISRs

    wiae_1586196

      Hey there,

         

      I'm using PSoC Creator for nearly half a year now and had Problems with multiple ISRs in the past, but could handle them (that "often occuring problem" when you don't use CY_ISR_PROTO).

         

      Now I'm stuck at a Project with five different ISRs and can't find a way out so I hope someone can help me here.

         

       

         

      I'm using a CY8CKIT-059 on a self-designed prototyping platform with two Manchester-Coded-Inputs to perform UART-over-USB-Communication with a PC. The Decoding is done by oversampling with help of an SPI-Slave. An Edge-Detector recognises the first Edge of the incoming Signal and Starts the Buffering of the oversampled Data by causing an Interrupt. Each Manchester-Bit is oversampled, next Bits are recognised after the SPI is "full" (2nd Interrupt), which will lead to copying the oversampled data to a buffer. This is done 34 Times as this is the Telegram-Length of the incoming signal. This Hardware-Part is included two times as there are two Manchester Inputs, so there are 4 Decoder-Interrupts. Two for edge-detecting-purposes, and two to recognise a finished oversampling. I implemente3d those Interrupts as external ones to implement my own code and all four use the mode "RISING-EDGE", which worked well in some other Projects with the same need for Manchester-Decoding, but all in all 2 Interrupts per Project (one declared as CY_ISR_PROTO, one as CY_ISR, both defined with CY_ISR ).

         

      The fifth Interrupt is used to recognise an incoming UART-Byte (Used to control the System).It also uses the mode "RISING-EDGE" and has the highest priority in the system. I also have tested the UART-Part in other Projects and never had a problem.

         

      Now I have this project where I want to use all this parts together. Two Manchester-Decoder and the UART-Part, as you can see in the Attached Picture. I also added the code with all the hardware-starts and Interrupt parts in it. When I comment all Interrupts except the one for UART, the ISR will work, but more than one ISRs don't work.

         

      I tried different combinations with declaring different ISRs as PROTO, using different priorities and even made the code easier, but  nothing helped really. Collisions between the 4 Decoder-ISRs can't be, only with the UART-ISR, but even if there is no Manchester-Code incoming, the UART-ISR doesn't fire.

         

      I hope someone can help me with my problem. If you need additional information, just ask. I will try to answer.

         
         

       

         

      If you find a writing mistake, you can keep it.

         

      Greetings from Germany :)