cancel
Showing results for 
Search instead for 
Did you mean: 

Documentation on CAN bus

Siemens
Visitor

Can anyone give a hint on where to look for proper documentation on CAN bus development? I see some primitive examples online, though there are a lot of moments that are not explained as they should
For example, CAN filtering and identificator masking are not reflected anywhere (as far as I look). Am I missing something?
The CAN standard specification is there, of course. Should it be fullfilling in regard of development for STM?

Sorry if I'm breaking local ethics of asking a question

Thank you

6 REPLIES 6

Are you talking about CAN in general, or the specific details of the CAN operation within your particular (unnamed) STM32 chip?

Have you looked on the Product Page for your chip for Application Notes on CAN?

Have you looked for CAN examples in the Cube Firmware Pack for your chip?

 

Javier1
Principal

Tell me which specific board.

https://community.st.com/t5/stm32-mcus-products/stm32-using-can-bus/td-p/155946

we dont need to firmware by ourselves, lets talk
SofLit
ST Employee

If your question is generic, the CAN/FDCAN embedded on STM32 products follow the CAN standard.

If your question is specific need to ask a specific question. Which CAN interface? bxCAN or FDCAN?

Need to read the CAN/FDCAN section in the respective product reference manual.

+ for FDCAN: AN5348 "Introduction to FDCAN peripherals for STM32 MCUs"

Articles:

1- STM32 in dual CAN configuration: bxCAN Filter bank explanation and relation with CAN2 Start Bank parameter

2 - CAN reception issues: Reasons and general troubleshooting

3 - STM32 FDCAN running at 8 Mb/s on NUCLEO boards

4 - Troubleshooting bxCAN issues in Loop Back mode on STM32 MCUs

5 - FAQ: Fixing STM32 FDCAN communication disruptions - APB bus, kernel, and time quanta clocks

6 - How to use FDCAN to create a simple communication with a basic filter

 

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.
PS: This is NOT an online support (https://ols.st.com) but a collaborative space. So please be polite in your reply. Otherwise, it will be reported as inappropriate and you will be permanently blacklisted from my help/support.
Siemens
Visitor

My chips are F303RE and L476RG. Regular CAN is my interface.
The thing is that this is my first experience with CAN so far. The "bx" itself frustrates at first look, not knowing that it's an STM specific market/technology feature. That doesn't matter.
Of course I've surfed through application notes and searched in examples - nothing there is connected to CAN in case of my chips.
It's ok though. I'll take examples from other sub-family such as F4 or F1. Thanks to Javier for sharing a useful link

Writing code to work with bxCAN especially on CMSIS, no difficulties.

HAL is very overloaded here.

But this is probably from the area of ​​religion))

Github open spaces and GPT chat to help you)


@Siemens wrote:

My chips are F303RE and L476RG. Regular CAN is my interface.


It's a bxCAN peripheral. 


@Siemens wrote:

 The "bx" itself frustrates at first look, not knowing that it's an STM specific market/technology feature. That doesn't matter.


This is a naming. bxCAN complies with CAN 2.0 protocol and FDCAN complies with CAN FD protocol.

To start you can inspire from the examples in the respective Cube HAL and read the reference manuals / bxCAN section. I don't recommend to start with baremetal.

F3: https://github.com/STMicroelectronics/STM32CubeF3/tree/master/Projects/STM32303C_EVAL/Examples/CAN/CAN_Networking

L4: https://github.com/STMicroelectronics/STM32CubeL4/tree/master/Projects/STM32L476G-EVAL/Examples/CAN/CAN_Networking

 

 

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.
PS: This is NOT an online support (https://ols.st.com) but a collaborative space. So please be polite in your reply. Otherwise, it will be reported as inappropriate and you will be permanently blacklisted from my help/support.