Hello,
I've been scrathing my head to get two fdcan interfaces working simultaneously, from what I've gathered the problem lays in the fact that both interfaces share the same memory area. I've tried spliting them into two 1280 word area's but this doesn't seems to solve the issue.
Any help would be apreciated from someone who got it working.
STM32H743IIT6
ChibiOS ver. -> Current Master branch
Two FDCAN interfaces on STM32H7 Topic is solved
Moderator: RoccoMarco
- Edoardo1982
- Posts: 24
- Joined: Thu Aug 03, 2017 8:39 am
- Has thanked: 10 times
- Been thanked: 20 times
Re: Two FDCAN interfaces on STM32H7
dynfer wrote:Hello,
I've been scrathing my head to get two fdcan interfaces working simultaneously, from what I've gathered the problem lays in the fact that both interfaces share the same memory area. I've tried spliting them into two 1280 word area's but this doesn't seems to solve the issue.
Any help would be apreciated from someone who got it working.
STM32H743IIT6
ChibiOS ver. -> Current Master branch
Hi,
with the latest changes it’s possible to use more than one CAN instance concurrently. In the FDCANv2 driver for the H743, the memory area is partitioned based on how many instances are used.
Code: Select all
#if defined(STM32H743xx) || defined(STM32H753xx) || \
defined(STM32H745xx) || defined(STM32H755xx) || \
defined(STM32H747xx) || defined(STM32H757xx) || \
defined(__DOXYGEN__)
#if (STM32_CAN_USE_FDCAN1 && STM32_CAN_USE_FDCAN2)
#define STM32_FDCAN_FLS_NBR 32U
#define STM32_FDCAN_FLE_NBR 16U
#define STM32_FDCAN_RF0_NBR 16U
#define STM32_FDCAN_RF1_NBR 16U
#define STM32_FDCAN_RB_NBR 16U
#define STM32_FDCAN_TEF_NBR 8U
#define STM32_FDCAN_TB_NBR 16U
#define STM32_FDCAN_TM_NBR 16U
#else
#define STM32_FDCAN_FLS_NBR 64U
#define STM32_FDCAN_FLE_NBR 32U
#define STM32_FDCAN_RF0_NBR 32U
#define STM32_FDCAN_RF1_NBR 32U
#define STM32_FDCAN_RB_NBR 32U
#define STM32_FDCAN_TEF_NBR 16U
#define STM32_FDCAN_TB_NBR 32U
#define STM32_FDCAN_TM_NBR 32U
#endif
#endif /* defined(STM32H743xx) || defined(STM32H753xx) */
Please refer to the CAN demo in testhal for STM32H7xx.
These modifications are present in both the trunk
and the 21.11.x
Unfortunately, I haven’t had the opportunity to specifically test on the H743, only on the H750 and H735.
Edoardo