CherryUSB / cherryusb_wch

CherryUSB demo for WCH
20 stars 10 forks source link

audio_v1_mic_multichan_template not working properly #3

Closed nikkov closed 1 year ago

nikkov commented 1 year ago

I tried built and test FS audio_v1_mic_multichan_template based audio_v1_mic_multichan_template . Enumeration is OK, but recording working only once. First opening device is successfully, I see "open EP" in terminal and 'a' value in data from device. But after stopped and started recording again, I see "open EP" in terminal and errors in USB requests because device not send any data.

sakumisu commented 1 year ago

I dont think wch support iso, so do not test audio or video.

nikkov commented 1 year ago

I did a some testing and found that usbd_audio_iso_callback never called, so ep_tx_busy_flag is not reset and

           while (ep_tx_busy_flag) {
            }

in audio_test runs forever

sakumisu commented 1 year ago

stop using wch with audio and video.

sakumisu commented 1 year ago

I do not think wch is ready for this.

sakumisu commented 1 year ago

Just enum for fun.

sakumisu commented 1 year ago

If you want to use audio, please select other chips, thanks. I think this issue is done.

techlabz commented 1 year ago

A few things, make sure to add USBHS_UIE_ISO_ACT to the interrupt enable register. Then add the interrupt flag in your in the IRQhandler and handle properly. You have to modify the descriptors potentially for USB 2.0 High Speed to work. I have so far got it working with USB 2.0 Full Speed.

image

techlabz commented 1 year ago

@sakumisu @HaiMianBBao

A lot must have went in this project, good job on the progress so far. Some notes, I would suggest updating the readme and letting your users know what has actually been tested, what is in progress etc, like a checklist? Also quirks like const and other issues that users may face with this stack with respect to WCH chips. We're shooting in the dark right now.

sakumisu commented 1 year ago

Thank you, these have added.