diff --git a/hw/mcu/nordic/FreeRTOSConfig.h b/hw/mcu/nordic/FreeRTOSConfig.h index be2768ba..96de8f8c 100644 --- a/hw/mcu/nordic/FreeRTOSConfig.h +++ b/hw/mcu/nordic/FreeRTOSConfig.h @@ -112,7 +112,10 @@ do {\ if ( !(_exp) ) { \ volatile uint32_t* ARM_CM_DHCSR = ((volatile uint32_t*) 0xE000EDF0UL); /* Cortex M CoreDebug->DHCSR */ \ - if ( (*ARM_CM_DHCSR) & 1UL ) __asm("BKPT #0\n"); /* Only halt mcu if debugger is attached */\ + if ( (*ARM_CM_DHCSR) & 1UL ) { /* Only halt mcu if debugger is attached */ \ + taskDISABLE_INTERRUPTS(); \ + __asm("BKPT #0\n"); \ + }\ }\ } while(0) #else @@ -136,7 +139,7 @@ /* The lowest interrupt priority that can be used in a call to a "set priority" function. */ -#define configLIBRARY_LOWEST_INTERRUPT_PRIORITY 0x0f +#define configLIBRARY_LOWEST_INTERRUPT_PRIORITY ((1<xfer_complete.len) { (void) event->xfer_complete.result; // TODO handle control error/stalled - osal_semaphore_post( _usbd_ctrl_sem, true); + osal_semaphore_post( _usbd_ctrl_sem, in_isr); } }else { - osal_queue_send(_usbd_q, event, true); + osal_queue_send(_usbd_q, event, in_isr); } TU_ASSERT(event->xfer_complete.result == DCD_XFER_SUCCESS,); break;