Fix USB priority preventing CAN TX from timing out
The blocking CAN implementation relies on SysTick for its timeout. USB had a higher priority than Systick, so the TX never timed out, causing the serial port to hang indefinitely.
This commit is contained in:
parent
8b2ae813fe
commit
e2610ad57d
|
@ -103,7 +103,8 @@ void HAL_PCD_MspInit(PCD_HandleTypeDef* pcdHandle)
|
|||
__HAL_RCC_USB_CLK_ENABLE();
|
||||
|
||||
/* Peripheral interrupt init */
|
||||
HAL_NVIC_SetPriority(USB_IRQn, 0, 0);
|
||||
// IMPORTANT: USB must have a lower priority than SysTick, or timeouts won't work
|
||||
HAL_NVIC_SetPriority(USB_IRQn, 1, 0);
|
||||
HAL_NVIC_EnableIRQ(USB_IRQn);
|
||||
/* USER CODE BEGIN USB_MspInit 1 */
|
||||
|
||||
|
|
Loading…
Reference in New Issue