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.

CCS/TCAN4550: TCAN4550 Initialization, Send, and Receive

Part Number: TCAN4550


Tool/software: Code Composer Studio

Hi,

I am trying to communicate with CAN BUS by MSP432P via a TCAN4550. My problem is that the provided library is for MSP430. I did try to use the library to generate one for MSP430, but I am having many problems debugging it.

Can you please provide a working example for MSP432P or the initialization code to start with?

Thanks,

Hassan

  • Hello Hassan,

    Thank you for your interest in the TCAN4550!

    The example firmware is mostly ANSI-C and should be able to be ported to the MSP432P by changing the hardware configuration settings.  However, I'm not familiar with the MSP432P and I am not sure what differences or changes will need to be made to the example firmware.  I will need to look into this before I can respond to your request.

    Can you provide me with the specific part number for the exact version of the MSP432P device you are using?  Also, are you using a LaunchPad as part of your evaluation, or have you created your own hardware for your evaluation?  If you are using a LaunchPad, can you provide me with that part number as well?  This will me narrow the focus directly to your application.

    Regards,

    Jonathan

  • Hi Jonathan,

    Thanks for your quick response. We have developed our own board. We are using MSP432P401R. The schematics is given below. We have already tried to port the available library from MSP430 to the MSP432. The library is able to communicate (read and write correctly) over the SPI. The problem is that the TCAN4550 does not get initiated appropriately (I think). From the CAN sniffer that we have, I can tell that the TCAN receives and acknowledges the arriving messages, but it's RX buffer remains empty. On the other hand, we give it a message to transmit and it does do that (the associated function returns true), but the CAN sniffer cannot detect the message. 

    Best,

    Hassan

  • Hi Hassan,

    I wanted to ask a few more questions while Jonathan was looking into firmware.

    It's possible that there is a problem with the TCAN4550 code implementation. If SPI communication is happening successfully, it seems that the MSP432 drivers are working correctly. The TCAN4x5x code is built to work off of these abstracted functions.

    What modifications have been made to the initialization shown in the TCAN4550_DEMO code? How is the MRAM being set up?

    Double check that you are trying to read from the correct RX FIFO. I believe in the example code, RX FIFO 1 and RX Buffer are initiated to hold 0 elements. This would cause the Buffer address to appear empty or unreadable even when the device is receiving communications.

    The TCAN4x5x_MCAN_TransmitBufferContents method only returns false if the passed uint8_t bufIndex is out of bounds. The method does not recieve confirmation that the TCAN has started transmitting. It is possible the TCAN4450 has not recognized the command. Is the device being initialized with both TX buffers? Is the correct buffer index being sent when calling the above function?

    If you have any questions about the initialization or would like us to take a look at your implementation offline, let me know. We will continue looking into firmware differences between the MSPs.

    Regards,
    Eric