Skip to main content
Associate
December 17, 2024
Solved

Problems with CAN on STM32H753 after migration to CubeMX 6.13

  • December 17, 2024
  • 2 replies
  • 1257 views

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.

Best answer by tuo

So tha problem is that during the cubemx update the NominalTimeSeg parameters were changed. 

Screenshot 2025-01-06 161034.png

2 replies

Andrew Neil
Super User
December 17, 2024

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 that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
tuoAuthor
Associate
January 6, 2025

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:
(Screenshot 2025-01-06 143805.png

And here it is after the update:

Screenshot 2025-01-06 143826.png

Andrew Neil
Super User
January 6, 2025

Doesn't your scope have a means to download screenshots - rather than take blurry photos?

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
tuoAuthorBest answer
Associate
January 6, 2025

So tha problem is that during the cubemx update the NominalTimeSeg parameters were changed. 

Screenshot 2025-01-06 161034.png

Technical Moderator
January 6, 2025

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.
tuoAuthor
Associate
January 6, 2025

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 :)