cancel
Showing results for 
Search instead for 
Did you mean: 

CAN Bus 2.0 and CAN bus FD

IAgui
Associate II

We have developed our control system around CAN bus 2.0, but we are trying to move up to the H7, and it only has CAN FD. The question is, can CAN bus FD be configured for operating like CAN bus 2.0?

1 ACCEPTED SOLUTION

Accepted Solutions
SofLit
ST Employee

Hello,

Yes, you can configure H7 CANFD peripheral to operate in CAN classic mode.

Please refer to the example provided in STM32CubeH7 under the path: Projects\STM32H743I-EVAL\Examples\FDCAN\FDCAN_Classic_Frame_Networking

PS: If this comment answers your question, please mark this topic as answered by selecting Select as best. This will help other users find that answer faster.

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.

View solution in original post

7 REPLIES 7
SofLit
ST Employee

Hello,

Yes, you can configure H7 CANFD peripheral to operate in CAN classic mode.

Please refer to the example provided in STM32CubeH7 under the path: Projects\STM32H743I-EVAL\Examples\FDCAN\FDCAN_Classic_Frame_Networking

PS: If this comment answers your question, please mark this topic as answered by selecting Select as best. This will help other users find that answer faster.

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.
IAgui
Associate II

In the middle of giving this a shot.

Helo SofLit,

In classic mode with CANFD, if I am receiving an extended identifier in classic can bus what is the bit layout of the

the 11 bit and 18 bit sections of the message in terms of:

• uint32_t FDCAN_RxHeaderTypeDef::Identifier Specifies the identifier.

This parameter must be a number between: – 0 and 0x7FF, if IdType is FDCAN_STANDARD_ID –

0 and 0x1FFFFFFF, if IdType is FDCAN_EXTENDED_ID 

I am sure it's concatenated but which way?

Hello,

there are some examples from ST on the Github: https://github.com/STMicroelectronics/STM32CubeG4/tree/master/Projects/STM32G474E-EVAL/Examples/FDCAN

And there is a german guy (sorry for german, but I guess you can at least get an idea) who has some information: https://www.elektronik-keller.de/index.php/stm32-projekte1/stm32-3x-canfd

Best Regards, Seppel

IAgui
Associate II

Hello seppeltonics_v and all,

I got this working. I had to figure out how the bit alignment of the extended ID CAN 2.0 with their FDCAN_RxHeaderTypeDef as we use the protocol slightly different from typical.

Hello,

this is what I have used, at least it spit out a CAN-Frame. Please also check the IO-Setting, you may have to go to the GPIO-Setting, the IO-Pin-Speed may be an issue as well, I set them to "very high" and "pullup", I would also recommend "Fast Mode", if you got EMI issues, you can play with it later.

Best Regards, Seppeltronics

0693W00000HoU1jQAF.png0693W00000HoU0lQAF.png

IAgui
Associate II

Yes, thank you it's working. I successfully configured CANFD to work as CAN 2.0.