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: Selective wake up configuration from sleep mode to standby mode

Part Number: TCAN1145-Q1

Hi Experts,

I referenced the website https://www.ti.com/lit/an/slla521/slla521.pdf?ts=1614879189274&ref_url=https%253A%252F%252Fwww.ti.com%252Fproduct%252FTCAN1145-Q1

and followed the example configuration (page 8, Table 5-1). The device could successfully enter into standby mode when the tcan1145 received specific CAN ID and data mask.

However, Once I sent an unspecific ID and data mask, It never entered into standby mode whenever I sent specific CAN ID and data mask. It seemed that tcan1145 was still in sleep mode

because the INH pin was low. My question was How could I ensure that tcan1145 could enter into standby mode upon it received specific CAN ID and data mask, which would not be influenced

by unspecific one. 

Sincerely,

EricHuang

  • Hi Eric,

    Could you please elaborate on what you mean by "unspecific ID and data mask"? What data was sent specifically that caused the device to apparently become unresponsive to the correct wake up frame (WUF)? Also, please confirm that the correct WUF is consistent with how the device is configured. Keep in mind that the correct WUF may need to be sent multiple times to ensure that the transceiver is in listening properly and has biased the bus to Vcc/2 (see datasheet Figure 10-11). 

    If the problem persists, please capture scope shots of the correct WUF being applied to the transceiver, including CANH, CANL, and INH so we may verify that the WUF is recognizable to the device. Also, please share any configuration values that deviate from the example in the application note. If you are able to share code publicly, you may post it here for review. Otherwise, you may send it to me through email (listed in my profile info). 

    Regards,
    Eric Schott

  • Hi Schott,

    First of all, I have to clarify that "unspecific ID and data mask" means "wrong WUF" and "specific ID and data mask"means "correct WUF". The following code is my configuration for selective wake up:

    ===================================================

    uint8_t data_rx[2] = {0};
    uint8_t data_tx[2] = {0};

    data_tx[0] = 0x32; /*Address*/
    data_tx[1] = 0x00; /*Value*/
    SPI_write_read(&data_tx[0], &data_rx[0], (uint16_t) 2, SPI_WRITE); /*SPI communication*/

    data_tx[0] = 0x33;
    data_tx[1] = 0x0C;
    SPI_write_read(&data_tx[0], &data_rx[0], (uint16_t) 2, SPI_WRITE);

    data_tx[0] = 0x38;
    data_tx[1] = 0x05;
    SPI_write_read(&data_tx[0], &data_rx[0], (uint16_t) 2, SPI_WRITE);

    data_tx[0] = 0x39;
    data_tx[1] = 0x2C;
    SPI_write_read(&data_tx[0], &data_rx[0], (uint16_t) 2, SPI_WRITE);

    data_tx[0] = 0x3A;
    data_tx[1] = 0xD0;
    SPI_write_read(&data_tx[0], &data_rx[0], (uint16_t) 2, SPI_WRITE);

    data_tx[0] = 0x44;
    data_tx[1] = 0xF4;
    SPI_write_read(&data_tx[0], &data_rx[0], (uint16_t) 2, SPI_WRITE); /*CAN bus data rate is set to 1 Mbps*/

                                                                                                                 /*CAN FD >= 5x CAN data rate*/

    data_tx[0] = 0x45;
    data_tx[1] = 0x00;
    SPI_write_read(&data_tx[0], &data_rx[0], (uint16_t) 2, SPI_WRITE);

    data_tx[0] = 0x46;
    data_tx[1] = 0x1F;
    SPI_write_read(&data_tx[0], &data_rx[0], (uint16_t) 2, SPI_WRITE);

    data_tx[0] = 0x47;
    data_tx[1] = 0x80;
    SPI_write_read(&data_tx[0], &data_rx[0], (uint16_t) 2, SPI_WRITE);

    =====================================================

    After configuration, I makes it enter into sleep mode:

    =====================================================

    data_tx[0] = 0x10;
    data_tx[1] = 0x81;
    SPI_write_read(&data_tx[0], &data_rx[0], (uint16_t) 2, SPI_WRITE);

    =====================================================

    The correct WUF now is supposed to be ID: 0x03, data mask[0] = 0xD0, data mask[1] = 0x2C.

    When I send correct WUF in the beginning as data package [0x03,0xD0,0x2C], the INH turns HIGH.

    However, when I send wrong WUF(ex: [0x02,0xD0,0x2C)]) in the beginning, then I send correct WUF

    consistently, the INH is still LOW. 

    Does I misunderstand anything else?

    Sincerely,

    EricHuang

     

  • Hi Eric,

    You concern is valid here, sending an incorrect WUF should not prevent the device from waking from the correct one later on. I'm reviewing your configuration and will get back to you with confirmation later today. However, since it sounds like you are able to successfully wake on the first attempt, the configuration is good. 

    Is the second attempt to wake the device done during the same test (device not reconfigured from last wake) or from a fresh test (device configured, sleep, wrong WUF, good WUF)? Is there a possibility to capture scope shots of the second attempted good WUF?

    In the meantime I would encourage you to check out the demo code for this device I've linked in a previous post. The tcan114x folder in this demo has device drivers that simplify configuration by giving variable names to all functions and structures to feature sets and registers. The actual configuration step with SPI reads/writes is done in preset functions so all the user needs to do is define the configuration settings. Let me know if you have any questions about this demo.

    Regards,
    Eric Schott