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.

TCAN1145-Q1: Interface forum

Part Number: TCAN1145-Q1

Tool/software:

Hello TI Team,

I'm working on developing the PN wake-up feature for the TCAN1145, but I can't get it to wake up from sleep mode. Can you help me figure out what's going wrong?

My test flow:

(1) When the MCU powers up, it initializes the TCAN1145 and sets it to Normal mode.

(2) The MCU starts sending CAN packets. After sending 500 packets, the TCAN1145 is set to Sleep mode.

(3) When a specific packet is received, the MCU can detect the wake-up signal by checking the TCAN1145's INH pin.

For the initialization of the TCAN1145, I followed TI's official documentation: "How Selective Wake Enables Partial Networking."

I referred to Table 5-4 (Valid Data Programming) and according to the test instructions, when the TCAN1145 receives 0x01 0x80, the TCAN1145's INH pin should go from low to high. However, I'm not seeing this happen.

Here is my initialization process:

(1) Reg=0x17, Data=0x02                     //TCAN1145 software reset

(2) Reg=0x47, Data=0x00

(3) Reg=0x30, Data=0x00

(4) Reg=0x31, Data=0x00

(5) Reg=0x32, Data=0x04

(6) Reg=0x33, Data=0x8C

(7) Reg=0x34, Data=0x00

(8) Reg=0x35, Data=0x00

(9) Reg=0x36, Data=0x00

(10) Reg=0x37, Data=0x00

(11) Reg=0x38, Data=0x25

(12) Reg=0x39, Data=0x01

(13) Reg=0x40, Data=0x80                      //I suspect there's a typo in the official documentation. I changed the address to 0x3A (the document states 0x40).

(14) Reg=0x44, Data=0xD0

(15) Reg=0x46, Data=0xFE

(16) Reg=0x47, Data=0x80

(17) Reg=0x10, Data=0x87                      //TCAN1145 entry NormalMode

(18) MCU sending 500 CAN packets

(19) Reg=0x10, Data=0x81                      //TCAN1145 entry SleepMode

(20) I used another CAN transceiver to send 0x01 0x80 on the bus, but the TCAN1145's INH pin didn't react at all.

Is there anything wrong with my software settings? Or do I need to confirm something on the hardware?

Hope to get your support as soon as possible, thank you!!

  • Hi WeiJie,

    Your configuration method here looks correct. All of the appropriate registers have been configured, the SW_CFG bit has been set, and the device has been put into sleep mode with SW_EN set. If all the configured values match the WUF on the bus including the ID, DLC, and data, then this should wake the device from sleep mode and the INH signal will drive high. 

    Have you been able to confirm that SPI communication is working well between the transceiver and your MCU? A good way to check this is to write to and read from the scratchpad register 0Fh. This will ensure that the system is able to read and write correctly between the two devices. 

    Are you sure that the MCU is formatting the register address correctly? The first 7 bits of the transaction should be the address field and the last bit is the read/write bit. This means that the actual byte value of a write to the mode control register (address = 10h) would be 0x21

    Are you sure that the ID of the wake up frame matches what is configured for the transceiver? Have you been able to test the device will the data mask enabled to see if wake via the CAN ID alone is working properly? 
    Please ensure that the wake up frame is being transmitted as a classic CAN frame (FD bit and BRS disabled) so that bit rate is constant throughout the frame. Note that partial networking does not support CAN FD frames. 
    If communication continues for while, do you observe the TCAN1145 wake up eventually due to a frame_overflow? This could indicate that the transceiver in unable to decode CAN communication possibly due to a misconfigured data rate or noise in the system. 

    Let me know if any of these tips help resolve this issue and if I can be of any more help. If none of these reveal the problem, I will probably ask you to share wakeforms of the CAN bus during the wake up frame to confirm that the message is being properly received by the transceiver. 

    Regards, 
    Eric Schott

  • Hi Eric,

    Thank you for your prompt response.

    (1) I've confirmed that the SPI communication is working correctly. I wrote 0x50 to register 0x0F and read it back, confirming that the value is also 0x50.

    (2) I'm currently testing if I can wake up the system using a CAN ID. I can successfully wake it up with just the CAN ID, but not with the CAN ID and DATA combination. For example, my wake-up settings are ID=0x123 and DATA=0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08. However, when I send ID=0x123 and DATA=0xAA, 0xBB, 0xCC, 0xDD, 0xEE, 0xFF, 0xAA, 0xBB on the CAN bus, it still wakes up the system.

    Here is my initialization process. I'm not sure where I might have gone wrong.

    Step Description Register Register(Hex) Data(Hex) MCU Send TCAN1145 Rsp
    0 TCAN11145 software reset DEVICE_RST 19 02 33 02 E0 00
    Delay 5ms
    1 Clear all INT INT_1 51 FF FF FF A3 FF FF FF E0 00 00 00
    2 Clear all INT INT_CANBUS 54 FF A9 FF 00 00
    3 Disable selective wake SW_CONFIG_4 47 00 8F 00 00 00
    4 Write desired WUF ID (0x123) SW_ID1 30 00 61 00 00 00
    5 Write desired WUF ID (0x123) SW_ID2 31 00 63 00 00 00
    6 Write desired WUF ID (0x123) SW_ID3 32 04 65 04 00 00
    7 Write desired WUF ID (0x123) SW_ID4 33 8C 67 8C 00 00
    8 Write ID mask to (0) SW_ID_MASK1 SW_ID_MASK1 34 00 69 00 00 00
    9 Write ID mask to (0) SW_ID_MASK2 SW_ID_MASK2 35 00 6B 00 00 00
    10 Write ID mask to (0) SW_ID_MASK3 SW_ID_MASK3 36 00 6D 00 00 00
    11 Write ID mask to (0) SW_ID_MASK4 SW_ID_MASK4 37 00 6F 00 00 00
    12 Read ID mask to (0) SW_ID_MASK4 SW_ID_MASK4 37 00 6E 00 00 00
    13 Write ID mask (0×001), DLC
    (8), and DATA_MASK_EN (1)
    SW_ID_MASK_DLC 38 31 71 31 00 00
    14 Set Data[0]=0x01 Data1 39 01 73 01 00 00
    15 Set Data[1]=0x02 Data2 3A 02 75 02 00 00
    16 Set Data[2]=0x03 Data3 3B 03 77 03 00 00
    17 Set Data[3]=0x04 Data4 3C 04 79 04 00 00
    18 Set Data[4]=0x05 Data5 3D 05 7B 05 00 00
    19 Set Data[5]=0x06 Data6 3E 06 7D 06 00 00
    20 Set Data[6]=0x07 Data7 3F 07 7F 07 00 00
    21 Set Data[7]=0x08 Data8 40 08 81 08 00 00
    22 Configure arbitration speed,
    FD:CAN ratio, and
    SW_FD_PASSIVE (1)
    SW_CONFIG_1 44 D0 89 D0 00 00
    23 Set frame overflow to 255
    (maximum number of errors
    before wake up)
    SW_CONFIG_3 46 FE 8D FE 00 00
    24 Set SWCFG bit (configuration
    is complete)
    SW_CONFIG_4 47 80 8F 80 00 00
    25   MODE_CNTRL 10 00 20 00 00 04
    26 TCAN1145 entry normal mode MODE_CNTRL 10 07 21 07 00 00
    27 TCAN1145 start working MODE_CNTRL 10 87 21 87 00 00
    MCU Tx CAN packet  
    29   MODE_CNTRL 10 00 20 00 00 87
    30 TCAN1145 entry sleep mode MODE_CNTRL 10 81 21 81 00 00

    I hope you can assist me. Thank you

  • WeiJie,

    US holiday starts tomorrow, with many people taking off today and Friday. Please expect a delay in responses until Monday (07/08/2024) next week. Thank you for your patience.

    Regards,

    Eric Hackett