cancel
Showing results for 
Search instead for 
Did you mean: 

Problems with CAN on STM32H753 after migration to CubeMX 6.13

tuo
Associate II

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.

1 ACCEPTED SOLUTION

Accepted Solutions
tuo
Associate II

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

Screenshot 2025-01-06 161034.png

View solution in original post

9 REPLIES 9

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?

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

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

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

tuo
Associate II

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

Screenshot 2025-01-06 161034.png

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

 

 

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

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

 

The problem is that 2 - is the value that I set and I needed it to remain 2, not 1.