FDCAN On STM32H563 Topic is solved

Discussions and support about ChibiOS/HAL, the MCU Hardware Abstraction Layer.
Post Reply
Emara
Posts: 6
Joined: Wed Dec 10, 2025 3:05 pm
Has thanked: 4 times
Been thanked: 3 times

FDCAN On STM32H563

Post by Emara »

Hi! Is FDCAN fully supported on STM32H563??
I didn't find the FDCAN ISRs in stm32_isr.inc of the stm32h563, is it not fully supported or defined somewhere else?
User avatar
Giovanni
Site Admin
Posts: 14893
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 997 times

Re: FDCAN On STM32H563

Post by Giovanni »

Hi,

It is supported, ISRs are in those stm32_fdcanN.inc files.

Status is unknown, it has been tested on G4 and H7 so far.

Giovanni
Emara
Posts: 6
Joined: Wed Dec 10, 2025 3:05 pm
Has thanked: 4 times
Been thanked: 3 times

Re: FDCAN On STM32H563

Post by Emara »

HI!
FDCAN Handlers are not linked to its vectors there, Had to add it manually to stm32_isr.inc


Code: Select all

#define STM32_FDCAN1_IT0_NUMBER             39
#define STM32_FDCAN1_IT1_NUMBER             40
#define STM32_FDCAN2_IT0_NUMBER             109
#define STM32_FDCAN2_IT1_NUMBER             110
#define STM32_FDCAN1_IT0_HANDLER            VectorDC
#define STM32_FDCAN1_IT1_HANDLER            VectorE0
#define STM32_FDCAN2_IT0_HANDLER            Vector1F4
#define STM32_FDCAN2_IT1_HANDLER            Vector1F8
User avatar
Giovanni
Site Admin
Posts: 14893
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 997 times

Re: FDCAN On STM32H563

Post by Giovanni »

Hi,

Thanks for finding, I committed the change on trunk.

Giovanni
Emara
Posts: 6
Joined: Wed Dec 10, 2025 3:05 pm
Has thanked: 4 times
Been thanked: 3 times

Re: FDCAN On STM32H563

Post by Emara »

Hi! thanks for the update, also in stm32_isr.c fdcan irqs need to be initialized in irqInit()

Code: Select all

  fdcan1_irq_init();
  fdcan2_irq_init();


and in irqDeinit()

Code: Select all

  fdcan1_irq_deinit();
  fdcan2_irq_deinit();
User avatar
Giovanni
Site Admin
Posts: 14893
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 997 times

Re: FDCAN On STM32H563

Post by Giovanni »

Forgot about that, committed.

Giovanni
Emara
Posts: 6
Joined: Wed Dec 10, 2025 3:05 pm
Has thanked: 4 times
Been thanked: 3 times

Re: FDCAN On STM32H563

Post by Emara »

Hi,
Regarding the same file stm32_isr.h for the STM32H563, I believe there may be a minor naming issue in the following definition:

Code: Select all

#define STM32_TIM1_UP_TIM16_NUMBER 42

It seems this should instead be:

Code: Select all

#define STM32_TIM1_UP_NUMBER 42
User avatar
Giovanni
Site Admin
Posts: 14893
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 997 times

Re: FDCAN On STM32H563

Post by Giovanni »

Hi,

Changes committed, thanks.

Giovanni
Post Reply