This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Issue enabling usb cdc without softdevice enable.

chip - nrf52840
sdk - nRF5_SDK_15.3.0_59ac345
softdevice - s140nrf52611

Issue enabling usb cdc without softdevice enable.

The COM port does not show up without the softdevice.
Can somebody explain this dependency on the softdevice and show me how to enable usb cdc without it.

Working code :

int main(void)
{
uint32_t ram_start = 0;
static const app_usbd_config_t usbd_config = {.ev_state_proc = usbd_user_ev_handler};


lfclk_init();

// Start APP_TIMER to generate timeouts.
app_timer_init();

app_usbd_serial_num_generate();
app_usbd_init(&usbd_config);

// Softdevice enable
nrf_sdh_enable_request();
nrf_sdh_ble_enable(&ram_start);

app_usbd_power_events_enable();
app_usbd_class_append(app_usbd_cdc_acm_class_inst_get(&m_app_cdc_acm));

timer_start();

while (true)
{
usbd_driver_background_process();
__WFE();
}
}


My code : COM port is not detected without softdevice

int main(void)
{
uint32_t ram_start = 0;
static const app_usbd_config_t usbd_config = {.ev_state_proc = usbd_user_ev_handler};


lfclk_init();

// Start APP_TIMER to generate timeouts.
app_timer_init();

app_usbd_serial_num_generate();
app_usbd_init(&usbd_config);

app_usbd_power_events_enable();
app_usbd_class_append(app_usbd_cdc_acm_class_inst_get(&m_app_cdc_acm));

timer_start();

while (true)
{
usbd_driver_background_process();
__WFE();
}
}

Parents Reply Children
No Data
Related