CAN bus doesn't work in loopback mode
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-02-12 2:29 AM - last edited on ‎2024-02-14 1:41 AM by mƎALLEm
Hi I followed this yt-guide for CAN-bus https://www.youtube.com/watch?v=JfWlIY0zAIc&t=918s
I'm however using a different type of nucleo board (L433RC-P in my case and F103C8tx in the video) and a different type of CAN-transceiver (MCP2561T-E/SN vs MCP2551 in the video). My board uses a different type of can periphery (can1 vs can). My solution to this difference was to just change all of the code where he writes can to can1. Yet checking with an oscilloscope, I don't seem to be sending any CAN signal.
relevant code:
Setup:
Solved! Go to Solution.
- Labels:
-
CAN
-
STM32L4 series
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-02-12 6:06 AM
yes thank you. I meant oscilloscope.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-02-12 6:14 AM
Please share your .ioc and main.c files.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-02-14 1:21 AM
Hello,
Attached a project using NUCLEO-L433RC-P on which CAN1 is configured in loopback mode.
Details:
- System clock @80MHz
- System clock: HSI
- CAN1 bitrate @1Mb/s
But be careful, here, HSI has been used as system clock because loopback mode is used. So the timings / jitter are similar on transmit and receive. But when you switch to Normal mode to communicate with another board you need to use HSE with a crystal as source of clock.
Hope it helps.

- « Previous
-
- 1
- 2
- Next »