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: TCAN4550 CAN Error

Part Number: TCAN4550

Hi Peter,

Good day.

I managed to communicate with it over SPI reliably, and the init is working fine, but in the status register, I constantly get a CAN error. If I read the h0820 register I get that I have a can silent error.
I have connected a CAN device to the can bus and I am actively trying to communicate but still no improvement.
I measured the CAN bus with a scope and I can see that as soon as I connect the transceiver the CAN bus goes to idle mode(both CANH and CANL to 2,45V).

My problem is the following: I managed to get the TCAN to Normal mode(I can verify this using the 0x0800 register). After initialization for half a second, the first byte on the SDO line is 0x00 indicating there are no errors. After that this byte changes to 0xA0, indicating a global error and CAN error. Once reading the 0x0820 register I can determine the CAN error is the CANSLNT error indicating there is nothing on the CAN bus. I tried multiple solutions with no success.

On the evaluation board, we tried to connect multiple CAN case devices from vector, all of them running multiple different CANoe setups (Not at the same time of course. If you turn on KL15 in the CANoe simulation, there should be data on the CAN bus. This was confirmed by watching the CAN-H and CAN-L pins on the CAN cases. Once I connected the TCAN devices to the already active CAN bus both CAN-H and CAN-L went to 2,46V (usually this means CAN Idle). Throughout this, we are constantly getting the same CANSLNT error for the IC. Even if I try to do a power-on reset still, we get the same error. The device never goes into sleeping mode.

I also experimented with sending out data to the CAN bus, but we still get the same CAN silent error and there is nothing on the bus. Here is the SPI bus data according to the digital discovery device:
Data: 61 | A0, 88 | 00, 34 | 00, 04 | 00, 01 | 00, A4 | 00, 00 | 00, 00 | 00, 00 | 00, 28 | 00, 00 | 00, 00 | 00, 00 | 00, 00 | 00, 0B | 00, CA | 00, 00 | 00, 00 | 00, 00 | 00, 00 | 00,
Throughout this, there is still no data on the CAN bus.
Unfortunately, I could not get any further, we seem to get the same CANSLNT error. Do you have any ideas on how to solve this problem?

I thought there might be a problem with the 120-ohm resistor between CAN H and CAN L. This resistor is placed on the Eval board (R50 and R51 in series). I tried removing J11 and J14 to disconnect these resistors and manually placed a resistor there, but nothing changed.


I tried a lot of things, that were said in this thread TCAN4550EVM: Problem sending CAN-messages. I tried reverting to the demo code, but still, I go the CAN Silent error and nothing on the CAN bus. I tried a solution that was suggested there to include this code to disable the possibility of the CAN silent error:

AHB_WRITE_32(0x000C, 0xFFFFFF); //delete all interrupt flags
AHB_WRITE_32(0x0830, 0xFFFFFBFF); //disable CANSLNT interrupt
AHB_WRITE_32(0x0820, 0x00100400); //delete CANSLNT interrupt flag

This did remove the CAN Silent flag but I still could not send out anything to the CAN bus. On the thread, Erik said it got better once he fix the AHB_READ_32() function, but I tested that and it is working for me.

Do you have any ideas, on how we can go forward?

(I still have a Vector CAN case on the can bus and the 120-ohm resistor between CANH and CANL)

Keep safe.


Regards,

Josel

  • Hi Josel,

    I can help you get this up and running.  Can you provide me with a bit more information about your test setup?

    Are you using a TCAN4550EVM or a BOOSTXL-CANFD-LIN board?

    I am familiar with the Digilent Digital Discovery, are you using it to configure the TCAN4550 through the SPI pins, or are you only using it as a logic analyzer to monitor the SPI data?  As a follow up, if you are using the DD just as a logic analyzer, what are you using to configure the TCAN4550?  Is it an MCU running a version of the demo code provided by TI, or something else?

    Have you read through the TCAN45xx Software User's Guide?  This document explains and gives examples on how to configure the Memory RAM (MRAM) and send and receive messages.

    The TCAN4550 uses the CAN-FD Controller IP developed by Bosch called M-CAN.  Bosch has published a M-CAN User's Manual that contains more information about the CAN-FD controller than could be included in the TCAN4550 datasheet.  I would recommend using this document as a supplement to the TCAN4550 datasheet. The M-CAN registers are the same as in the TCAN4550 with the only difference of an offset of 0x1000 has been added to each address.  For example, the register address 0x18 in the M-CAN User's Manual would be register 0x1018 in the TCAN4550.  With this in mind, you can easily transfer register information read in the M-CAN User's Manual to the TCAN4550 device.

    I will also note that the TCAN4550 has three register address regions. I find it helpful to explain the different types of registers in the device because it makes it easier to understand how the device operates and where whether status bits are M-CAN related, or TCAN4550 device related.

    - 0x0000-0x002F is device identification and status information implemented in silicon logic and only requires the SPI clock for read/write.

    - 0x0800-0x08FF is the TCAN4550 device specific registers designed by TI into the digital core that requires the 20MHz or 40MHz clock to be functional for read/write.

    - 0x1000-0x10FF is the M-CAN register block designed by Bosch and implemented into the TCAN4550 with an address offset of 0x1000.

    For a device configuration debug, I will need the register values for your configuration.  Can you read back all the configuration and status registers that are getting set so that I can review them?

    Generally speaking, your procedure should contain the following general steps:

    - Read and clear power up interrupts

    - Configure the device hardware settings in the 0x08xx registers

    - Configure the M-CAN settings (Nominal and Data bit timing, MRAM allocation of RX/TX Buffer/FIFO elements, RX message Filter elements, TX Event FIFO elements, etc.)

    - Change the mode to Normal Mode to begin participating in activity on the CAN Bus

    - Write a CAN Message element to a TX Buffer element in MRAM and then set the corresponding Buffer Element Bit in the TXBAR register to initiate a transmit.  The device should try to send the message at the next available time per the CAN arbitration protocol.

    Data: 61 | A0, 88 | 00, 34 | 00, 04 | 00, 01 | 00, A4 | 00, 00 | 00, 00 | 00, 00 | 00, 28 | 00, 00 | 00, 00 | 00, 00 | 00, 00 | 00, 0B | 00, CA | 00, 00 | 00, 00 | 00, 00 | 00, 00 | 00,

    I think I understand the SPI data you provided to be the CAN message you are trying to transmit, is that correct?  The SPI protocol works the same for writing and reading from an MRAM memory location as it does for a register.  So looking at the first 4 bytes you have the write Op Code of 0x61, memory address of 0xA088, and a data length of 0x00 words.  If the first byte of 0x61 is not the write Op Code, then I am misinterpreting your data and this is a coincidence.  But otherwise, I would not expect the 4th byte to be set to 0x00 because this would indicate no data is to be sent and it would generate a SPI error.

    Could you verify what data you are trying to send to a TX buffer and that it is going to a valid TX buffer element per your M-CAN configuration? The TCAN4550 doesn't do any error checking on memory allocation and it is possible to overlap or overwrite, or place data in the wrong memory location.  The first TX Buffer element is located at the address you have written into the TX Buffer Start Address (TBSA) field of the TX Buffer Configuration (TXBC) register 0x10C0[15:2].

    Once this buffer is filled with the message data and header information, you should set bit 0 in the TX Buffer Add Request (TXBAR) register 0x10D0[0] so transmit the message from this first TX buffer element location.

    Hopefully something in this response will highlight the error, but if not, I can help debug the configuration if you provide the additional register information.

    Regards,

    Jonathan

  • Hi Josel,

    Were you able to resolve your issue?

    Regards,

    Jonathan

  • Hi Jonathan,

    The case was automatically closed.
    The customer didn't get back. We assumed that the customer resolved the issue.

    Thank you for your support.

    Keep safe.

    Regards,

    Josel

  • Hi Josel,

    Thanks for letting me know.  I will close this thread.  If the customer does come back, feel free to open it up or re-post again and we can continue to support them at that time.

    Keep safe as well.

    Regards,

    Jonathan