3 Replies Latest reply on Sep 27, 2018 9:27 PM by anks

    PSOC4 USBFS CDC API (automatic memory management not supported)

    markhagen

      I'm trying to understand the best way to handle the CDC interface while using automatic memory management in USBFS as a composite device, (I'm using the CY8CKIT_046_USB_Audio as a starting point). It's confusing that the USBFS API includes code for operating in this mode but the component datasheet (v3.20) states that it is not supported. The non-support makes sense because it appears that the out endpoint is not re-enabled automatically and my attempts to re-enable it manually work for a few  out transfers before the interface hangs, hanging other DMA USB interfaces along with it (audio streaming and HID). CDC input seems to work by inserting a NULL at the end of the transfer, per Michael's recommendation here: USB CDC using DMA. I can receive data from the device by using USBFS_PutData() using this API mod.

       

      The 'USBFS_UART' and API documentation states that USBFS_start() should be called, which sets up the USB interfaces DMA channels (I don't do this currently because the USB audio example sets up the audio streaming DMAs manually). If I call USB_Start() and then re-init the audio stream DMA channels manually per the example, will it break the API in other ways by doing so, especially if the management mode isn't supported anyway? If so, is there a different way to do this other than manually handling CDC endpoints directly with the assigned interrupts?