PSOC4 USBFS CDC API (automatic memory management not supported)

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
MaHa_3133581
Level 1
Level 1

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?

0 Likes
1 Solution
lock attach
Attachments are accessible only for community members.

Attaching the project which is presently missing from :

Designing PSoC4200L USB Composite Device - Hackster.io

View solution in original post

0 Likes
3 Replies
AnkitaS_51
Employee
Employee
100 likes received 50 likes received 25 likes received

Please check the project given at this link:

Designing PSoC4200L USB Composite Device - Hackster.io

The project gives a short description on how to design a USB design which would enumerate as an HID, COM PORT and audio devices

0 Likes

Thank you. I found that article before and there is no code attached to it, so other than for setting up the USB interface descriptors, which I have been able to do successfully, the article isn't of much use. Plus, the USB com is shown operating as an echo device to the pc; I have that functionality but am trying to deal with PC messages sent to the PSoC. If you can point me to the download link for the example code project mentioned in the article, I would be grateful.

0 Likes
lock attach
Attachments are accessible only for community members.

Attaching the project which is presently missing from :

Designing PSoC4200L USB Composite Device - Hackster.io

0 Likes