Skip to content

Commit

Permalink
Merge pull request #15447 from josephduchesne/stm32g473-fdcan3-irq-crash
Browse files Browse the repository at this point in the history
Fix crash when using FDCAN3 RX IRQ on STM32G473 (and others)
  • Loading branch information
0xc0170 authored Aug 16, 2023
2 parents 13f43cc + 02b5737 commit 1720397
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions targets/TARGET_STM/can_api.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,13 @@
#include "PeripheralPins.h"
#include "mbed_error.h"

// Some STM32G4 series (and others) have 3 FDCAN devices
// while others have 2
#ifdef FDCAN3
static uintptr_t can_irq_contexts[3] = {0};
#else
static uintptr_t can_irq_contexts[2] = {0};
#endif
static can_irq_handler irq_handler;

/** Call all the init functions
Expand Down

0 comments on commit 1720397

Please sign in to comment.