I have been using UART almost a year. I did not know it is taking the sample as you described. appreciate the explanation. which is a good inspiration for CAN baud rate. For ST, their SJW seems to be defined in another way? As opposed to every edge from recessive to dominant, stm32h743zi FDCAN perfroms hard synchronization from dominant to recessive, and the phase segment 1 can only be lengthened, while the phase segment 2 can only be shortened. I am not sure if I am correct. Still trying to understand the definition of SJW.
Great lesson on CAN baud rate. I am currently trying to interface with a vehicle CAN bus, the vehicle CANbus is running at 500kbps and I have calculated the BRGCON values for my program but whenever I inject a latching signal into the vehicle CANbus it just freezes the CAN on the vehicle. Any ideas as to what could be causing this?
Offhand I have no idea what is going on. Perhaps your calculations are wrong or there is something wrong with your setup. Does the transceiver match your setup? First configure your setup to receive silently. Then see if you can receive legible data.
When measuring a CAN Hight and Low signals using an oscilloscope i can't tell if the CAN signals are 2.0A, 2.0B or CAN FD, how can you tell so I can set the correct CAN Baud rate?
To determine the baudrate capture a message on the scope. Look for a transition zero one zero or vice versa. Using cursors measure the transition time. CAN has several predefined baud rates. (1M, 500k, 250k, 125k) Look to see what matches. For instance, at a 1Mbit baudrate the shortest bit is 1u second. The catch is that CAN FD will get much faster after the message ID. Actually, that is one way to tell apart CAN FD. Telling the difference between 2.0A and B involve measuring the length of the message. CAN 2.0B has a longer ID section.
SJW needs a transition from a recessive state to a dominant state to work. Bit stuffing guarantees that such a transition occurs at least once every 10 bits. If the data in the message has a whole bunch of 1s. Bit stuffing will throw in a 0 as every fifth bit to give the needed transition.
I love the depth of the explanation!
excellent lecture ! thank you
Perfect explanation, thank you!
Thank you for great explanation! By the way, nanoseconds are in small letters : )
I have been using UART almost a year. I did not know it is taking the sample as you described. appreciate the explanation. which is a good inspiration for CAN baud rate.
For ST, their SJW seems to be defined in another way? As opposed to every edge from recessive to dominant, stm32h743zi FDCAN perfroms hard synchronization from dominant to recessive, and the phase segment 1 can only be lengthened, while the phase segment 2 can only be shortened. I am not sure if I am correct. Still trying to understand the definition of SJW.
great explanation
Thank you sir!!
Great lesson on CAN baud rate. I am currently trying to interface with a vehicle CAN bus, the vehicle CANbus is running at 500kbps and I have calculated the BRGCON values for my program but whenever I inject a latching signal into the vehicle CANbus it just freezes the CAN on the vehicle. Any ideas as to what could be causing this?
Offhand I have no idea what is going on. Perhaps your calculations are wrong or there is something wrong with your setup. Does the transceiver match your setup? First configure your setup to receive silently. Then see if you can receive legible data.
When measuring a CAN Hight and Low signals using an oscilloscope i can't tell if the CAN signals are 2.0A, 2.0B or CAN FD, how can you tell so I can set the correct CAN Baud rate?
To determine the baudrate capture a message on the scope. Look for a transition zero one zero or vice versa. Using cursors measure the transition time. CAN has several predefined baud rates. (1M, 500k, 250k, 125k) Look to see what matches. For instance, at a 1Mbit baudrate the shortest bit is 1u second. The catch is that CAN FD will get much faster after the message ID. Actually, that is one way to tell apart CAN FD. Telling the difference between 2.0A and B involve measuring the length of the message. CAN 2.0B has a longer ID section.
I didn't get the part how bit stuffing can be explained using SJW. Can anyone clarify?
SJW needs a transition from a recessive state to a dominant state to work. Bit stuffing guarantees that such a transition occurs at least once every 10 bits. If the data in the message has a whole bunch of 1s. Bit stuffing will throw in a 0 as every fifth bit to give the needed transition.