2 Replies Latest reply on Nov 10, 2017 4:49 AM by mav_2104486

    USBCOM interrupt priority and debugging

      Good afternoon. I'm facing a question about USBCOM (virtual serial over USB). My project has an interrupt driven data acquisition (with a message queue) and a USBCOM component to send the processed reads to the computer.

      Everything works as expected but I have a doubt about interrupt priority. My 'input' PIN and all the USB interrupts have been assigned 7 as priority. Since my data is made of 'bursts' of packet, I thought that I should give my 'data capture' ISR a lower priority than USB (eg:6).

      The queue should 'smooth' the peaks. What I find is that if I lower my ISR priority, USB seems to go wild, with the computer not responding to mouse anymore.


      My ISR looks like this (DataReady is the interrupt pin):







      ... write input to queue







      My main program writes to serial with a loop of



                      while (0u == USBCOM_CDCIsReady());    


      This is my first PSOC project and I must say that I'm impressed with the possibilities of the hardware and PSOC Creator (it REALLY rocks!!!).


      More questions:

      -is there a way to debug only 'main' program and not ISR ? Every step that I do moves to some interrupt handling routine for USB.

      -is there some 'official' guideline to promote PSOC DIY opensource applications (logos/links to web hosting etc)

        • 1. Re: USBCOM interrupt priority and debugging

          Priority – This is used to enter the interrupt priority. The valid range is displayed in the header. The smaller the number, the higher priority.

          From the discussion it seems that the USB is required to be of Higher priority in the application

          For debugging query-

          You can post opensource applications using  PSoC  on hackster-

          Cypress Projects

          2 of 2 people found this helpful
          • 2. Re: USBCOM interrupt priority and debugging

            I found out that priority is not the issue. The problem happens when I connect the device and I start immediatly to write strings to the serial port (because interrupt are fired). Maybe this is because the board was already powered through KitProg when connecting the main USB. I confirm that lowering the interrupt priority WORKS.

            Thanks for your detailed responses about debugging and hackster