diff options
author | Angus Gratton <angus@redyak.com.au> | 2024-05-23 17:46:47 +1000 |
---|---|---|
committer | Damien George <damien@micropython.org> | 2025-01-17 13:12:17 +1100 |
commit | 21b7bd9f44a1e9dff2881b8aa1c72f400d3c7c39 (patch) | |
tree | 8fb8a35f8e64b5a356d9c3b207c925f22ee81678 | |
parent | 3a60f32c9db15060a95db69a3d2ca5df33a36f1b (diff) |
stm32/fdcan: Fix extended CAN ID filtering for stm32g4.
The memory bank addresses used for these are independent, can (and must)
enable both.
Also looks like no need to shrink these if FDCAN2 is added, the Reference
Manual is a bit unclear but looks like the peripheral's RAM multiplies out
for each additional controller.
Signed-off-by: Angus Gratton <angus@redyak.com.au>
-rw-r--r-- | ports/stm32/fdcan.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ports/stm32/fdcan.c b/ports/stm32/fdcan.c index 26a886098..04d8135c0 100644 --- a/ports/stm32/fdcan.c +++ b/ports/stm32/fdcan.c @@ -86,8 +86,8 @@ bool can_init(pyb_can_obj_t *can_obj, uint32_t mode, uint32_t prescaler, uint32_ init->DataSyncJumpWidth = 1; init->DataTimeSeg1 = 1; init->DataTimeSeg2 = 1; - init->StdFiltersNbr = 28; // /2 ? if FDCAN2 is used !!? - init->ExtFiltersNbr = 0; // Not used + init->StdFiltersNbr = 28; + init->ExtFiltersNbr = 8; init->TxFifoQueueMode = FDCAN_TX_FIFO_OPERATION; #elif defined(STM32H7) // The dedicated FDCAN RAM is 2560 32-bit words and shared between the FDCAN instances. |