nRF52840 the device not recognize,When reated a composite device for CDC and MicPhone

1.Created a composite device for CDC and MicPhone. When the registration of mic SOF is interrupted, the device may not recognize the issue

ret = app_usbd_audio_sof_interrupt_register(class_inst_mic, mic_sof_ev_handler);

static void mic_sof_ev_handler(uint16_t framecnt)
{
UNUSED_VARIABLE(framecnt);
// make sure we're in proper state (configured)
if (APP_USBD_STATE_Configured != app_usbd_core_state_get())
{
NRF_LOG_INFO("config error");
NRF_LOG_FLUSH();
return;
}

}

2.Not use app_usbd_audio_sof_interrupt_register to register mic sof, the device can be found in pc with micphone and cdc. However,  transfer is not fine with app_usbd_audio_class_tx_start, the data isn't complete and occur BUSY(ret = 17)

app_usbd_audio_class_tx_start(&m_app_audio_microphone.base, m_temp_buffer, sizeof(m_temp_buffer));

Parents Reply Children
  • Hi luke.zheng,

    I am very sorry for the long wait.

    I couldn't see anything wrong with your approach. But I wonder if this is a caching issue in the host.

    Do you change the Vendor ID or Product ID between your tests where you change the USB descriptors? If not, the USB host my use a cache descriptor of the device, and your changes are not read again.

    Could you please try changing the Product ID?

    Also, if you are early in your project, please consider using the nRF Connect SDK. Creating USB composite device is a lot simpler there.
    The nRF5 SDK is also in maintenance mode and won't get any new feature update.

    Hieu

Related