2024-12-17 06: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.
2025-01-06 07:42 AM
So tha problem is that during the cubemx update the NominalTimeSeg parameters were changed.
2024-12-17 06: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?
2025-01-06 05: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:
2025-01-06 06:27 AM
Doesn't your scope have a means to download screenshots - rather than take blurry photos?
2025-01-06 06: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 :)
2025-01-06 07:42 AM
So tha problem is that during the cubemx update the NominalTimeSeg parameters were changed.
2025-01-06 08:36 AM
2025-01-06 08: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 :)
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
2025-01-07 01:09 AM
The problem is that 2 - is the value that I set and I needed it to remain 2, not 1.