Hi I'm trying to change peripheral usbd_ble_uart_freertos example to central with nus_c
I added the scan and nuc_c module.
When I'm testing the application, before making a connection with the peripheral all USB events are working as expected.
After the connection is established new USB events stop working.
This is the code that is responsible for USB events
Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
void usb_new_event_isr_handler(app_usbd_internal_evt_t const * const p_event, bool queued)
{
BaseType_t xHigherPriorityTaskWoken = pdFALSE;
UNUSED_PARAMETER(p_event);
UNUSED_PARAMETER(queued);
ASSERT(m_usbd_thread != NULL);
/* Release the semaphore */
vTaskNotifyGiveFromISR(m_usbd_thread, &xHigherPriorityTaskWoken);
portYIELD_FROM_ISR(xHigherPriorityTaskWoken);
}
static void usbd_thread(void * arg)
{
ret_code_t ret;
static const app_usbd_config_t usbd_config = {
.ev_isr_handler = usb_new_event_isr_handler,
.ev_state_proc = usbd_user_ev_handler
};
UNUSED_PARAMETER(arg);
ret = app_usbd_init(&usbd_config);
It looks that events are received in usb_new_event_isr_handler function, but usbd_thread keep waiting for the event - stuck in ulTaskNotifyTake