Sometimes, data does not flow on the CAN bus.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-02-06 6:17 PM - last edited on ‎2025-04-30 6:47 AM by mƎALLEm
Hi.
In my program, I am transmitting the following CAN IDs at a 20ms cycle:
1. 0x080
2. 0x100
3. 0x15B
4. 0x215
5. 0x315
6. 0x415
7. 0x515
8. 0x40D
When continuing the periodic transmission, I have observed that sometimes No 4-8 do not flow on the CAN bus and are not transmitted periodically.
I confirmed that when changing No 4-8 as follows, all data is transmitted periodically on the CAN bus:
1. 0x080
2. 0x100
3. 0x15B
4. 0x215→0x15C *changed
5. 0x315→0x15D *changed
6. 0x415→0x15E *changed
7. 0x515→0x15F *changed
8. 0x40D→0x160 *changed
Could you please explain why changing the CAN IDs allows for successful transmission?
I appreciate your assistance.
- Labels:
-
CAN
-
STM32F7 Series
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-04-30 7:24 AM
Hi @coffeelover,
The problem you encountered is likely related to the priority of messages in the transmission boxes (Tx mailboxes) of the CAN controller.
According to the CAN protocol, the priority of messages is determined by the message identifier. The message with the lowest identifier has the highest priority:
By changing the identifiers to lower values, the messages gain higher priority, allowing for successful transmission.
Additionally, the transmission duration of 20 ms might be short, so maybe it's necessary to space out the transmissions also it is recommended to ensure that at least one transmission mailbox (Tx mailbox) is free to transmit a message.
Thank you.
ELABI.1
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-04-30 2:06 PM
More than likely due to how you're transmitting, checking HAL return status and if you are queuing your CAN messages. Show your relevant code.
TimerCallback tutorial! | UART and DMA Idle tutorial!
If you find my solution useful, please click the Accept as Solution so others see the solution.
