This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hi,
We use T1CAN development board for simple communication with PCAN, encountered the following problems:
1. The register configuration of the board is completed. After sending CAN frames successfully for several times, the subsequent sending fails, and the register 0x1018 INIT[0] is 1. If INT[0] is reset to 0, the message can be sent successfully. This happens when the hardware is just starting to initialize. Then restart and reconfigure other baud rate, and CAN send and receive normally. We have tested CAN baud rate 500k,1M, and CAN FD baud rate up to 4M, and the situation is similar. There will be problems in the first few times of CAN sending and receiving.
2.When the baud rate of CANFD reaches 5M, the initial situation of sending data is similar to that mentioned in question 1. After some CAN data is successfully sent, ESI is displayed as 1. You CAN continue sending CAN data until it fails. Reset INIT to continue sending data successfully. No data is sent,TCAN is successful in receiving data.
As shown in the figure above,INIT[0] is1.Reset register 0x1018 INIT[0] is 0,Send data successfully.
As shown in the figure above,register 0x1018 data0x4300,register 0x1044 data0xA006F.
During this period,TCAN received data successfully.
The register configuration process is as follows.
Register 0x800 data【0xC8000462】Standby
Register 0x1018 data【0x4303】
Clock Feq 40MHz Sample point 75%
Register 0x101C data【0xE001E07】 1M Prescaier=0 tesg1=28 tesg2=9 SJW=9
Register 0x100C data【0x800411】 5M Prescaier=0 tesg1=4 tesg2=1 SJW=1
Register 0x1048 data【0x0505】 TDC
Register 0x1018 data【0x4303】
According to TCAN4550 Software User Guide.pdf ,confgure TXFIFI RX FIFO etc.
Register 0x830 data【0xFFFFFAFF】
Register 0x800 data【0xC80004A2】Normal Mode
We are looking forward to hearing back from you.
Best Regards!
Hello,
You are obviously receiving errors on your transmitted messages which is leading to an Error Passive and eventually to a Bus Off state. Usually the cause of this type of error is some form of signal integrity error resulting from incorrect termination or a bad wiring harness, or a bit timing mismatch between the CAN nodes on the bus.
Register 0x101C data【0xE001E07】 1M Prescaier=0 tesg1=28 tesg2=9 SJW=9
I'm not sure you are entering the register values for your desired bit timing configuration correctly. For example, your tseg2=9, but you are entering a "7" which is interpreted as an "8" by the device. Based on my calculations for a 1M 75% configuration based on a 40MHz clock, you need 40 tq per bit period. The sync segment is always required so it is not included in the bit timing calculations and therefore your total "interpreted" number of time quanta is 39.
For a 75% sample point, you would need to enter 28 for NTSEG1 and 9 for NTSEG2. This gives you an interpreted value of 29 + 10 = 39 tq. I think this would make the final register value for 0x101C = 0x12001C09.
Can you verify the NBTP configuration is correct?
Regards,
Jonathan
Hi Jonathan,
Thank you for your reply earlier.I have verified the NBTP configuration is correct.
According to TCAN4550 Software User Guide.pdf page 8,It's not probem.
I have avoided problem 1 by reducing the TCAN TX Buffer length from 10 to 3. But the root cause of the problem has not been found.
TCAN successfully interacts with PCAN for more than 500 times, at NBTP 1M/s,DBTP 5M/s, and Sample point 75%.
About problem 2,when I set the NBTP and DBTP sampling points the same, for example 80% at NBTP 1M/s,DBTP 8M/s,the ESI never appear again.
It's never failed for conmmunication between them.Before NBTP 1M/s Sample point 75%,DBTP 8M/s Sample point 80%.
Regards,
Xuefeng Zhao
Hi Xuefeng,
It sounds like an adjustment and optimization of the sample point location has resolved your issues. Noise and other signal integrity issues are common on a CAN FD bus and an 80% sample point is very common to avoid switching noise during the beginning portion of the bit period.
Regards,
Jonathan