2023-11-07 03:05 AM
hello I today trying can communication loopback mode working but normal mode bit LEC register showing timing error.
Solved! Go to Solution.
2023-11-07 05:12 AM - edited 2023-11-07 05:14 AM
Indeed.. CAN is not UART nor SPI to test it in standalone. In Normal mode you should have at least two nodes on the bus for acknowledgement mechanism and listening of the bus. Otherwise use loopback mode for standalone config.
2023-11-07 03:15 AM
2023-11-07 03:22 AM - edited 2023-11-07 03:23 AM
Hello,
- What kind of HW you are using?
- Are you using a CAN transceiver in Normal mode?
- Do you have another CAN node on the bus?
- Are you using HSE or HSI as system clock source?
Also, the values of BS1 and BS2 are not good to me. Please increase BS1 and BS2 as much as possible and decrease the prescaler as much as possible to match your 500kb/s knowing that BS1 must be between 70% and 80% of the bit time.
2023-11-07 03:41 AM - edited 2023-11-07 03:42 AM
@Tesla DeLorean : thank you for pointing this thread out.
@Sergen , please don't duplicate a thread on the community.
Now seeing the previous one. I don't have the visibility of all your environment but I have to add:
- Check RS pin of SN65HVD230 transceiver: connect it to GND.
- In normal mode you have to have at least two nodes on the bus.
- The two STM32 (nodes) have to be clocked with HSE with an external crystal not with HSI. The two nodes have to have the exact bitrate.
2023-11-07 04:13 AM
I checked the RS pin, there was no problem, then I solved the bit timing problem by editing the time segment quanta and prescaler values, but the only thing I'm curious about is that when my device is not connected to any node, something like this picture appears as a frame from my CAN TX output.
2023-11-07 05:12 AM - edited 2023-11-07 05:14 AM
Indeed.. CAN is not UART nor SPI to test it in standalone. In Normal mode you should have at least two nodes on the bus for acknowledgement mechanism and listening of the bus. Otherwise use loopback mode for standalone config.
2023-11-07 05:17 AM
Thanks your support
2023-12-27 01:38 AM
Hi @Sergen @SofLit @Tesla DeLorean after using two nodes also i am getting the same waveform.