Skip to content

Commit

Permalink
Merge pull request #15398 from jtmyz9/STMH7-FDCAN-RX-IRQ
Browse files Browse the repository at this point in the history
force FIFO IRQ for FDCan RX on H7
  • Loading branch information
0xc0170 authored Apr 6, 2023
2 parents 5801b16 + 1bb1036 commit 3aab43f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions targets/TARGET_STM/can_api.c
Original file line number Diff line number Diff line change
Expand Up @@ -546,7 +546,7 @@ static void can_irq(CANName name, int id)
irq_handler(can_irq_contexts[id], IRQ_TX);
}
}
#if (defined FDCAN_IT_RX_BUFFER_NEW_MESSAGE)
#if (defined FDCAN_IT_RX_BUFFER_NEW_MESSAGE) && !defined(TARGET_STM32H7)
if (__HAL_FDCAN_GET_IT_SOURCE(&CanHandle, FDCAN_IT_RX_BUFFER_NEW_MESSAGE)) {
if (__HAL_FDCAN_GET_FLAG(&CanHandle, FDCAN_IT_RX_BUFFER_NEW_MESSAGE)) {
__HAL_FDCAN_CLEAR_FLAG(&CanHandle, FDCAN_IT_RX_BUFFER_NEW_MESSAGE);
Expand Down Expand Up @@ -628,7 +628,7 @@ void can_irq_set(can_t *obj, CanIrqType type, uint32_t enable)
interrupts = FDCAN_IT_TX_COMPLETE;
break;
case IRQ_RX:
#if (defined FDCAN_IT_RX_BUFFER_NEW_MESSAGE)
#if (defined FDCAN_IT_RX_BUFFER_NEW_MESSAGE) && !defined(TARGET_STM32H7)
interrupts = FDCAN_IT_RX_BUFFER_NEW_MESSAGE;
#else
interrupts = FDCAN_IT_RX_FIFO0_NEW_MESSAGE;
Expand Down

0 comments on commit 3aab43f

Please sign in to comment.