2025-01-21 06:48 AM
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
2025-01-21 06:53 AM
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?
2025-01-21 06:55 AM
Tell me which specific board.
https://community.st.com/t5/stm32-mcus-products/stm32-using-can-bus/td-p/155946
2025-01-21 08:24 AM - edited 2025-01-21 08:52 AM
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:
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
2025-01-21 08:48 AM
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
2025-01-21 09:02 AM
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)
2025-01-21 09:11 AM
@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.