2024-08-08 03:45 AM - last edited on 2024-08-20 03:07 AM by SofLit
I am using CAN bus on my project and I am using NUCLEO-H753ZI board. The second board is nvdia orin nx. I also using CAN to USB converter to monitor the frames.
When STM32 send the frame it is received on CAN to USB converter software without error but Orin NX showing error frame. When I send frame from Orin NX then it is received at CAN to USB converter correctly but not at STM32.
So I am not able to understand where is the problem. I change the frame bitrate by adjusting the Tseg1-85 and Tseg2-13. at CAN bit rate of 125000. But it is not working. Then I try at Tseg1-573, Tseg2-62 then this work with Orin but if 10 frame are send from STM32 then only 2 or 3 received other show error. So please help me on this.
The Tseg1 and Tseg2 value are calculated from following link.
https://kvaser.com/support/calculators/can-fd-bit-timing-calculator/
2024-08-20 04:19 AM - edited 2024-08-20 04:20 AM
Ok thank you.
I don't see a HW issue according to this sketch.
You said:
"When STM32 send the frame it is received on CAN to USB converter software without error but Orin NX showing error frame. When I send frame from Orin NX then it is received at CAN to USB converter correctly but not at STM32."
Can you send frames from "CAN to USB converter" to STM32? do you receive message on the MCU?
2024-08-20 04:22 AM
When you remove "Linux board" and keep just the Converter are you able to send receive frames without issues?
2024-08-20 04:30 AM - edited 2024-08-20 05:21 AM
Yes, When I remove the Linux board and connect only NUCLEO-H753ZI board and USB to CAN converter, it work without any issue. Even I keep linux board then frames from STM to converter are received. The frame transmitted by STM is received on converter but not on linux board. Please note - No filter are used on any device to make sure all frame are received on all devices.
The CAN to USB converter also uses STM32F103 microcontroller. So if you can tell what CAN config used in this type of device then I can try it also
This is screenshot of can to usb converter in which I am able to recive data..
2024-08-20 05:52 AM
The CAN to USB converter also uses STM32F103 microcontroller. So if you can tell what CAN config used in this type of device then I can try it also
Just send a simple frame from the converter to your H7 MCU. If it is well received, the issue is from Linux board side which I cannot provide clues.
2024-08-20 09:50 PM - edited 2024-08-20 09:56 PM
The converter to STM32 communication is already working. And as I say the when I send frame from converter to Linux board then it is also working fine and converter is also have a STM32F103. That's why I am focusing on STM32 not on Linux board.
It is helpful if you can check my code which I already share. Ig can point out some parameter by which we can get some result. For example frame bit rate setting.
2024-08-21 01:39 AM
Please be cooperative in order to help you efficiently.
For the moment, I don't see issue in the code snippet you shared (except I missed something).
The test I requested consist to enclose the problem, is it something related to STM32H7 or to the Linux board.
Is that possible to swap the transceivers between STM32H7 and Linux board?
Are you sure FDCAN is clocked by the external Crystal clock? Please provide your project to have a look.