Tool/software:
Hi team,
The customer is in Steadby mode when powered on. The customer wants to configure MODE SEL to Normal mode, but the return value is incorrect after writing. Please help analyze why there is a problem?

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.
Tool/software:
Hi team,
The customer is in Steadby mode when powered on. The customer wants to configure MODE SEL to Normal mode, but the return value is incorrect after writing. Please help analyze why there is a problem?

Hi Michael,
Customer has tuned SPI, but encountered a problem when debugging partial wakeup according to our application note. Please help analyze it.
The customer has now fixed a scenario where the device cannot be awakened. It wakes up normally after receiving 621. However, if the customer sends another ID first and then 621, it cannot be awakened.
Please help to find out the cause of the problem
The following is the configuration code implementation
TCAN114X_STATUS_ENUM
TCAN114x_Mode_Set(TCAN114X_MODE_ENUM modeRequest)
{
TCAN114x_Mode_Control modeRegister;
TCAN114x_Mode_Control_Read(&modeRegister);
printf("Read Can Mode before write: %d\n", modeRegister.MODE_SEL);
switch (modeRequest)
{
default: return TCAN114X_FAIL;
case TCAN114X_MODE_SLEEP :
{
modeRegister.MODE_SEL = REG_BITS_TCAN114X_MODE_CNTRL_MODE_SLEEP;
modeRegister.SW_EN = 1;
TCAN114x_Mode_Control_Write(&modeRegister);
return TCAN114X_SUCCESS;
}
case TCAN114X_MODE_STANDBY : modeRegister.MODE_SEL = REG_BITS_TCAN114X_MODE_CNTRL_MODE_STANDBY; break;
case TCAN114X_MODE_LISTEN : modeRegister.MODE_SEL = REG_BITS_TCAN114X_MODE_CNTRL_MODE_LISTEN; break;
case TCAN114X_MODE_NORMAL :
modeRegister.MODE_SEL = REG_BITS_TCAN114X_MODE_CNTRL_MODE_NORMAL;
//modeRegister.SW_EN = 1;
break;
}
TCAN114X_STATUS_ENUM ret = TCAN114x_Mode_Control_Write(&modeRegister);
TCAN114x_Mode_Control tmp_modeRegister;
TCAN114x_Mode_Control_Read(&tmp_modeRegister);
printf("Read Can Mode after write: %d\n", tmp_modeRegister.MODE_SEL);
if (ret!= TCAN114X_SUCCESS){
printf("[ERROR]TCAN114x_Mode_Set: %d fail\n", modeRegister.MODE_SEL);
return TCAN114X_FAIL;
}
return TCAN114X_SUCCESS;
}
uint8_t sw_config = 0;
can1145_write_reg_value(REG_TCAN114X_SW_CONFIG_4, &sw_config,1);
uDelay(500);
TCAN114x_PN_Config sleep_config;
sleep_config.ID = 0x621; // 0x621
sleep_config.IDE = 0; // standard frame
sleep_config.IDMask = 0x00;
sleep_config.DataMaskEN = 0; // no mask
sleep_config.DATA[6] = 0x00;
sleep_config.DLC = 0;
sleep_config.SWFDPassive = 1; //CAN with flexible data rate frame are ignored
sleep_config.CAN_DR = 5; // = 500Kbps
//sleep_config.FD_DR = 3; //Reserved
sleep_config.FrameErrorThreshold = 254;
ret0 = TCAN114x_PN_Config_Write(&sleep_config);
uDelay(5000);
ret1 = TCAN114x_Mode_Set(TCAN114X_MODE_SLEEP);
printf("standby trans ret0:%d, sleep trans ret1:%d\r\n",ret0,ret1);
Hi Alan,
The WUF receiver is activated by first receiving a valid WUP, if they are manually sending another ID, and the interval is about a few seconds, the WUF receiver will be deactivated and back to deep sleep mode within tSILENCE, in that case, they will need to initiate a selective wakeup again by sending a WUP first, followed by a match WUF to wake up the device.
Can they try to send the matched WUF within tSILENCE of sending the first ID?
Regards,
Sean
Hi Sean,
Thank you for your analysis.
The customer simulated and tested it by plugging and unplugging the can box to simulate sending WUP, and then sending WUF. It was indeed woken up normally.
But there is a question. I used the wake-up function based on the bit position and set the byte6 bit0 of canid 0x123 to 1 to wake up.
1. Send WUP
2. Set byte6 bit0 of canid 0x123 to 0 and send
3. Set byte6 bit0 of canid 0x123 to 1 and send
In this way, step 1, 2, and 3 cannot be woken up.
If only step 1 and 3 can be woken up.
But our actual car will have the situation of step 1, 2, and 3 in order, which cannot be woken up.
Are the steps designed by the customer correct? Or is this phenomenon in line with expectations?
Step 2 and 3 are as shown below:

The information I saw from DS and AN is that the wake-up of PN must first send WUP to make the WUF receiver active, and then send a CAN message containing WUF, so that the PN can be woken up.
Now the customer said that their gateway design does not send WUP, but only adds WUF to the CAN frame message. Is there a way to realize the PN wake-up function?
App note:


ds:

Hi Sean,
1. Customer feedback: They have not heard that they need to send WUP every time they use TJA1145-Q1. So if WUP is required for each PN wakeup, is this the difference between our CAN and NXP's?
2. WUP is described in AN as a dominant, a recessive, and a dominant pulse. Does it mean that the customer needs to send this once every time to wake up the specific frame design and then send WUF to wake up before tsilence times out? Once it times out, it needs to send a WUP pulse again, and then send WUF again within the tsilence time. Is my understanding correct?

3. Do you have a measured waveform of WUP? If customers need to add this design, they hope to see the actual waveform to let them understand better.
Thank you very much for your support!
Hi Alan,
1. This is the same requirement of TJA1145 or any other partial networking CAN transceiver, and I didn't say they need to send WUP every time for selective wakeup. They would only need to do it when the bus keeps idle for >tSILENCE, to keep the bus active and enable the WUF receiver. Here is an app note from NXP:


If they still doubt TI or NXP's app notes, here is a snapshot from ISO11898-2:

2. No, they don't need to send a WUP again beofre tSILENCE times out. If there's no communication on the bus for tSILENCE, they would need to send a WUP to "re-activate" the bus bias.
3. There is no strict requirement for WUP, in real application WUP can almost be any CAN frame, that means any activity on the bus can actually be a wakeup event. Here is an example.

Regards,
Sean