diff options
Diffstat (limited to 'os/hal/platforms/STM32/can_lld.c')
-rw-r--r-- | os/hal/platforms/STM32/can_lld.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/os/hal/platforms/STM32/can_lld.c b/os/hal/platforms/STM32/can_lld.c index 4b24ec810..6fe3cf30d 100644 --- a/os/hal/platforms/STM32/can_lld.c +++ b/os/hal/platforms/STM32/can_lld.c @@ -174,10 +174,14 @@ void can_lld_start(CANDriver *canp) { /* Clock activation.*/
#if USE_STM32_CAN1
if (&CAND1 == canp) {
- NVICEnableVector(USB_HP_CAN1_TX_IRQn, STM32_CAN1_IRQ_PRIORITY);
- NVICEnableVector(USB_LP_CAN1_RX0_IRQn, STM32_CAN1_IRQ_PRIORITY);
- NVICEnableVector(CAN1_RX1_IRQn, STM32_CAN1_IRQ_PRIORITY);
- NVICEnableVector(CAN1_SCE_IRQn, STM32_CAN1_IRQ_PRIORITY);
+ NVICEnableVector(USB_HP_CAN1_TX_IRQn,
+ CORTEX_PRIORITY_MASK(STM32_CAN1_IRQ_PRIORITY));
+ NVICEnableVector(USB_LP_CAN1_RX0_IRQn,
+ CORTEX_PRIORITY_MASK(STM32_CAN1_IRQ_PRIORITY));
+ NVICEnableVector(CAN1_RX1_IRQn,
+ CORTEX_PRIORITY_MASK(STM32_CAN1_IRQ_PRIORITY));
+ NVICEnableVector(CAN1_SCE_IRQn,
+ CORTEX_PRIORITY_MASK(STM32_CAN1_IRQ_PRIORITY));
RCC->APB1ENR |= RCC_APB1ENR_CAN1EN;
}
#endif
|