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.

TCAN4550: driver, CANopen and SAE J1939 question

Part Number: TCAN4550

Hello expert,

My customer would like to know below question from TCAN4550 and TCAN4550-Q1. May we know if you can help to answer it? Thanks!

  1. Will this two parts support ARM and x86 system? If yes, do we have driver for it?
  2. Will this two parts support Windows and Linux systemIf yes, do we have driver for it?
  3. Will we provide API and test program?
  4. Will this two parts support CANopen and SAE J1939?

Best regards,

Ann Lien

  • Ann,

    I can quickly answer your first question about the difference between the two GPNs. The TCAN4550 is the industrial part, while the TCAN4550-Q1 is the automotive (AEC Q100) part.

    For the rest of your questions, please allow us some time during the holiday while our team is out of office.

    Best,

    Danny

  • Hello Ann,

    Thank you for your patience during this holiday season.

    We have some ANSI-C (bare metal) driver code available for download on the TCAN4550 and TCAN4550-Q1 product folders under the "Software Development" section.  This driver was developed with the MSP430FR989, but is abstracted in a way that it should be compatible with any MCU after the SPI drivers are modified to meet the hardware requirements of your particular MCU.

    We have a Software Developer's User Guide available as well to help explain how to develop and integrate the TCAN4550 into the application.

    A Linux driver has been developed and incorporated into the Linux Kernel starting with version 5.10.  It is called "tcan4x5x".

    The TCAN4550 will work with any system that can communicate through the SPI interface of the device.  Therefore if your OS can support the required SPI interface, the TCAN4550 will work.  This is usually more of a hardware consideration than a OS consideration.

    We don't provide a test program, but outside of the demo starter code API, an AutoSAR abstraction layer is available upon request.

    CANopen and SAE J1939 are higher level protocol layers that operate on the CAN physical layer hardware.  The TCAN4550 is compliant to the CAN FD physical layer and therefore can be used for any CANopen and SAE J1939 applications.

    Regards,

    Jonathan

  • Hello Jonathan

    Thanks for your answer!

    I have another driver question about TCAN4550 and TCAN4550-Q1

    Is linux driver of these two products supported in Linux Kernel mainstream?

    Best regards,

    Edmond

  • Hi Edmond,

    Yes, this driver was upstreamed into the Linux Kernel starting with 5.10.  We are also working on some performance enhancements updates to the driver and once those are complete, they will be upstreamed into the Linux Kernel as well. 

    Best Regards,

    Jonathan

  • Hello Jonathan

    Thanks for your answer!

    Can "demo starter code API" and "AutoSAR abstraction layer" provided by TI support both Windows and Linux? 

    Best regards,

    Edmond

  • Hello Edmond,

    The CAN "demo starter code API" is low-level ANSI-C typically used in microprocessor firmware and is typically at the lowest  level calling the SPI driver communicating with the TCAN4550 device on a physical layer.  This level of code abstracts the lowest level SPI register read/write transactions into higher level functions that can be called by an even higher application layer of code.  Porting this code to different microprocessors would generally only require changes to the SPI Abstraction Layer to become compatible with the processor's low level SPI driver and unique hardware requirements.

    The "AutoSAR abstraction layer" is an abstracted layer of code that has specific functions defined by AutoSAR.  This code is not built on any specific hardware platform or processor which allows it to be ported to different platforms. 

    The Microcontroller Abstraction Layouer (MCAL) provides standardized function calls to peripherals of a microcontroller such as the IOs, bus ports (SPI or I2C), or even memory.  By abstracting these peripherals to common function calls, it makes it possible to simply swap MCAL drives for a different processor when migrating, but all the code above should behave the same with very little to no modifications.  These MCAL drives are processsor/vendor specific since they deal with the specific code required to perform a function.

    The ECU Abstraction Layer provides a common set of functions that an electronic control unit (ECU) would use such as CAN communication or GPIOs for sensing buttons or controlling lights.  These modules are designed to be processor independent and call on the MCAL layer to handle whatever functions are required.  In the case of the TCAN45xx, the MCAL driver for SPI is used to communicate to the TCAN45xx.

    The Services Layer provides background services to the application such as network services and bus communication services.  An example for the TCAN45xx is that a beacon bus communication may be desired (a periodic bus ping to check the status of devices on the bus) and this service communicates to the TCAN45xx ECU abstraction driver in order to actually send and receive the CAN messages.

    Texas Instruments provides the necessary ECU abstraction layer driver source code necessary to integrate the TCAN45xx into an AutoSAR environment.  However, the MCAL driver layer is vendor specific and should come from the processor vendor, or other software developer.

    If you notice that both the demo starter code API and AutoSAR ECU abstraction layer code sit at a lower level than the Run Time Environment (RTE/OS) and Application Layers, they should be able to be used by a developer to support either a Windows or Linux OS.  The code provided by TI is however at much lower level than the Application Layer, therefore, it will not be incorporated into a application designed for the type of OS used and also modified to work with the specific processor communicating with the TCAN4550 through SPI at the hardware level.

    Regards,

    Jonathan

  • Hi Jonathan, 

    Since Linux (after kernel version 5.10) can provide the native SocketCAN API: https://docs.kernel.org/networking/can.html, do TCAN4550 has the similar software stack on Windows platform? 

    Best regards, 

    Kunyang 

  • Hi Kunyang,

    This is a device support forum and not a software development forum.  I support the TCAN4550 at the device level and basic SPI configuration through a SPI bus and Texas Instruments provides sample code to enable device configuration and basic operation at this lower level.  Higher level Windows and Linux APIs and utilities such as SocketCAN are beyond my expertise, or this forum.

    I did a quick web search and I saw a few results turn up, so I think it is possible.  But I'm not qualified to make any form of recommendations for a Windows alternative to SocketCAN.

    The TCAN4550 only communicates through low level SPI drivers which are on the Hardware level of the stack. Therefore the TCAN4550 will work on any platform as long as the higher layer APIs can correctly call the lower level SPI drivers needed to communicate with the TCAN4550.

    Best Regards,

    Jonathan

  • Hello Jonathan,

    Customer still have two problems, 

    1. Does Windows has SW Stack like SocketCAN could share to customer to help them developing Test tool, API and protocol?

    2. If there is no SW Stack like that, could we provide DLL or API of OS layer? Or other resource could share with customer?

    Best regards,

    Ann Lien

  • Hello Ann,

    The only software resources we have to share have already been pointed out in this thread.  We can provide device level support for the TCAN4550 for hardware and low level SPI register configuration questions, but this is not a software support forum and higher level OS specific API questions are beyond the scope of our expertise. 

    Because Windows is an OS, it would still need some lower level processor that would communicate with the TCAN4550 through the SPI bus.  This processor would have to have some firmware driver to control the SPI bus.  If there are questions on the SPI timing and protocol required to read/write the TCAN4550 registers, we are happy to help.  Also, if there are questions about what register settings are required to configure the TCAN4550 for specific operating modes, then we are also happy to help.

    However, the Windows OS and API layer is above this lower level MCU-to-TCAN4550 SPI layer and we don't have the expertise to know how to support this request. 

    I think they would first need to identify the lower level hardware (processor) that will communicate with the TCAN4550 through SPI.  The bare metal example demo code can be used as a reference for the processor firmware.  How the OS calls this firmware is up to the customer.  Solutions similar to SocketCAN in Linux may exist for Windows, but again this is outside our expertise and these solutions may or may not be compatible with their system hardware.

    Regards,

    Jonathan