2 Replies Latest reply on Mar 7, 2019 11:37 PM by jiwa_284501

    Dual Application Jump and CDC Interface.


      Hello Cypress Community,


      I work on a project where i have a dual Application structure. (Bootloader + APP1 + APP2)


      Furthermore, in each APP i have an USBFS with an USB interface and CDC interface.


      I use a C# application (Windows 7 64bits) to switch between APP. (with a specific command on USB or CDC channel).


      My issue:

      Example with USB command, the psoc boot in APP1, i open the usb port, i send switch app command (if CDC port has been open i close and free it before sends switch command), the psoc5 jump in APP2.

      The issue is when i try to (re)open the COM port (CDC) when i have jumped in the APP2, Windows tells me that the COM port doesn't exist, but in my device manager it is present.


      Example with CDC command, the psoc boot in APP1, i open the CDC port, i send switch app command, the psoc5 jump in APP2.

      Same issue.


      An interesting information, if i go back in the APP1(with USB switch command), i can open the CDC port.

      So if i reboot PSOC5 (with power shutdown) i can open the port in APP2.

      Same behavior if the PSOC boot first in APP2 and i jump in APP1(issue on CDC port).


      My question is, the CDC port should be cleared/stopped in psoc firmware before jump? If yes what is the API to perform this?


      Best Regards,



        • 1. Re: Dual Application Jump and CDC Interface.

          Hello Jimmy,


          Just want to confirm if the PSoC is switching the app when the COM Port Application has the particular COM Port opened? You have mentioned that you are sending switch app command via CDC. Ideally the COM Port needs to be disconnected i the PC application before actually disconnecting it in hardware?


          Can you try opening the COM Port in any other terminal application while the custom application throws the error? Are you able to connect to the COM Port from there?




          • 2. Re: Dual Application Jump and CDC Interface.

            Hello Hima,


            Yes i close the COM port (if already opened)  in my C# application when before switching in another PSOC app. (After switching when i test the serialPort.isOpen() API in C#, it return false.


            Yes i have try to open the COM port in realterm and putty after switching and same issue.


            But yesterday i have resolved one case of my issue.

            This case now works now:

            Open CDC port / Send Switching CMD / Close CDC Port / PSOC5 Switching /Re-Open CDC port(PASS).

            In this case i have just add the Close port Step, I thought it was not going to have time to close the port before the jump but i fact i have time.


            But this second case doesn't works:

            Open USB port / Send Switching CMD / Disconnect USB port(Com port never open) / PSOC5 Switching / Open COM port (FAIL!!)

            If in the device manager i disable and enable my com port i can open it after.


            This issue seems to be a Windows 7 issue, in fact on Windows 10 no issue all case work fine! Windows 10 seems better to handle COM port connection disconnection.

            I am convinced now that my issue come from windows application and not Psoc5 firmwware, thank a lot for your support!