Hi,
I have a question about TCAN4550.
I only use the standard ID.
Example code configures SIDFC and XIDFC register.
Is it necessary to configure XIDFC?
Could I select a ID mode? or Could I turn on/off ID mode?
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, Eric,
Thank you for your answer.
I want to use the TCAN4550 as the classic CAN transceiver.
I don't need the CAN FD function.
Could I get a sample code for the classic CAN using TCAN4550?
The demo code is test code for the CAN FD.
If there is no classic code, could you explain how to modify the demo code?
Remony,
There is no separate classic code for the TCAN4550, but changing the current code to work for classic CAN is fairly simple.
The changes you'll need to perform are in the main.c project file, within the Init_CAN functon. First, you will need to change the bit rate of the data phase since classic CAN will only work up to 1Mbps:
The second grouping of code is the data phase bit rate, this will need to be changed to 1Mbps or lower. Refer to the commented formulas to calculate the bit rate using the different parameters.
Next you'll need to disable the FD enable and bit rate switching:
Both of these bits should be set to 0.
The last part you'll need to change is the CAN frame structure in the TCAN4550.c project file:
This generates the header portion of the CAN frame, and you can see both the FDF and BRS bits are set to enable. Both of these need to be set to 0 so that the frame isn't structured as a CAN FD frame with bit-rate switching.
The SPIdata that is configured will also need to be adjusted to only be 8 bytes maximum if it is set to anything higher in your code. Classic CAN will only allow up to 8 bytes in the data phase.
Please let me know if you have any other questions.
Regards,