Problems with CAN on STM32H753 after migration to CubeMX 6.13
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-12-17 6:02 AM
Hi everyone!
I've migrated my STM32H753 project to the new CubeMX version, and after that, something went wrong with the CAN bus communication (everything worked fine before the update). The CAN functions return no errors, and messages are being sent, but they are incorrect — I'm getting a Stuff Error on the receiver side (A Stuff Error occurs when 6 consecutive bits of the same value are detected on the bus).
I wonder if anyone else has encountered this issue and found a solution.
Solved! Go to Solution.
- Labels:
-
CAN
-
STM32CubeMX
-
STM32H7 Series
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-01-06 7:42 AM
So tha problem is that during the cubemx update the NominalTimeSeg parameters were changed.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-12-17 6:08 AM
Have you used an analyser or oscilloscope to see what's actually happening on the wire?
@tuo wrote:I'm getting a Stuff Error on the receiver side .
Is your device the sender, or the receiver? Or both?
A complex system designed from scratch never works and cannot be patched up to make it work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-01-06 5:46 AM
My device functions as both a receiver and a sender and is connected to the Vector CAN tool (VN1630A) and CANoe software, which I use to monitor and send data to my device.
Of course, I’ve checked what’s happening on the line. The transaction looks incorrect, which is causing the stuffing error I’m observing. This issue only occurs after migrating the project from STM32CubeMX 6.12.1 and FW_H7 1.11.2 to STM32CubeMX 6.13.0 and FW_H7 1.12.1.
Here you can see how it looks before the update:
(
And here it is after the update:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-01-06 6:27 AM
Doesn't your scope have a means to download screenshots - rather than take blurry photos?
A complex system designed from scratch never works and cannot be patched up to make it work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-01-06 6:49 AM
No, it’s not possible for now. If it were, I would have done it. Have you faced the same issue with CAN? If not, I’ll just continue solving the problem myself. I don’t need help with remote debugging :)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-01-06 7:42 AM
So tha problem is that during the cubemx update the NominalTimeSeg parameters were changed.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-01-06 8:36 AM
Hello @tuo ,
Let me thank you for posting and welcome to the ST Community.
I suggest that you take a look at this Post.
The Nominal Time Seg1 must be between 1 and 256 and the Nominal Time Seg2 must be between 1 and 128.
This Issue is fixed on STM32CubeMX 6.13.0
Thanks.
Mahmoud
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-01-06 8:55 AM
I don’t think the post you mentioned has anything in common with my issue. The Nominal Time Seg1 and Nominal Time Seg2 were correct and set to 2. However, after I updated the CubeMX version from 6.12.1 to 6.13.0, these parameters were magically changed to 1 :)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-01-07 12:23 AM
Hello @tuo ,
On STM32CubeMX 6.12.1 the initial value of Nominal Time Seg1 and Nominal Time Seg2 are equal to 2.
This issue is fixed on STM32CubeMX 6.13.0 under this internal ticket: 185818.
Therefore, after the migration you find that the Nominal Time Seg1 and the Nominal Time Seg2 are equal by default to 1.
Thanks.
Mahmoud
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-01-07 1:09 AM
The problem is that 2 - is the value that I set and I needed it to remain 2, not 1.
