STM32F407 CAN Loopback Mode work but Normal Mode not working
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-11-06 6:00 AM - last edited on ‎2023-12-27 5:36 AM by mƎALLEm
Hello, I am trying to establish standard CAN communication between the sn65hvd230 IC and the stm32f4 discovery and stm32f103. While the loopback mode works fine, when it sends data to the normal mode, the output goes to 0 and then back to 1. I still haven't found a solution.
Solved! Go to Solution.
- Labels:
-
CAN
-
STM32F4 Series
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-11-06 9:51 AM
Surely easier to cut-n-paste
Running from a 84 MHz bus, perhaps 1 Mbps? 500 kbps at 42 MHz.
Are you sure there's not a better balance of Prescaler, SJW, BS1, BS2 settings?
Perhaps SJW =1, BS1 = 4, BS2 = 2 or SJW =1, BS1 = 5, BS2 = 1
Loopback doesn't need a responding/acknowledging device on the bus, Normal mode does.
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-11-06 6:47 AM
I noticed that there is a Bit recessive Error in the SFR section, how can I fix this?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-11-06 6:55 AM
No details on your settings or what else is on bus responding or interacting.
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-11-06 8:38 AM
Currently, the transceiver circuit is connected to the stm32f407, but there is no device with which it interacts and the register called LEC in the SFR section gives a bit recessive error.
Here's how I get it
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-11-06 9:51 AM
Surely easier to cut-n-paste
Running from a 84 MHz bus, perhaps 1 Mbps? 500 kbps at 42 MHz.
Are you sure there's not a better balance of Prescaler, SJW, BS1, BS2 settings?
Perhaps SJW =1, BS1 = 4, BS2 = 2 or SJW =1, BS1 = 5, BS2 = 1
Loopback doesn't need a responding/acknowledging device on the bus, Normal mode does.
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-11-06 11:06 AM
I am working on the 42mhz bus and I adjusted these settings like this last time and it worked smoothly in loopback mode, but in normal mode, I tried to send data when there was no device on the other side, but I could not see the canbus frame in the logic analyzer. Unfortunately, since I am new, I do not have much knowledge about can and I do not understand some of the problems.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-11-06 10:51 PM - edited ‎2023-11-06 10:57 PM
Today I tried to connect 2 devices and send data, but it gave a bit dominant error.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-11-07 3:18 AM
Should perhaps be looking at the circuit and performance electrically. Error suggests it's not in control of the state of the bus, perhaps feedback via CAN RX is compromised.
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-11-07 5:47 AM
Yes, what you said may be true because when I disconnected the CANbus transceiver, an acknowledge error was seen in the LEC Register bit instead of a timing error.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-12-26 9:48 PM
Hi @Tesla DeLorean I am new to embedded development can you please me solve this issue?
I am facing an issue in CAN normal mode. I have tried loopback mode it's working fine but when I change the mode to loopback mode I get a Bit Dominant error while transmitting.
Thank you
