Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
lock attach
Attachments are accessible only for community members.
yyleow_
Level 1
Level 1
First reply posted First question asked Welcome!

Hi there,

I am trying to get a readback from the IC but I am not getting a readback. UART is configured in loopback mode and I can see from terminal that transmitData is being sent out.

below is a snippet of my code:

void send_msg() {

/* Transmit configuration */

uint8 transmitData[6] = {0x1e, 0x80, 0x36, 0x00, 0x01, 0xed};

/* Size of the message */

Ifx_SizeT tcount = sizeof(transmitData);

/* Transmit data via TX */

IfxAsclin_Asc_write(&g_ascHandle, transmitData, &tcount, TIME_INFINITE);

 

/* check transmit with loopback mode */

uint8 readTransmitData[6];

Ifx_SizeT rtcount = sizeof(readTransmitData);

IfxAsclin_Asc_read(&g_ascHandle, readTransmitData, &rtcount, TIME_INFINITE); /* Receive data via RX */

printf("receive: 0x%x, 0x%x, 0x%x, 0x%x, 0x%x, 0x%x\n", readTransmitData[0], readTransmitData[1], readTransmitData[2], readTransmitData[3], readTransmitData[4], readTransmitData[5]);

 

/* Check for readback */

uint8 readData[4];

Ifx_SizeT rcount = sizeof(readData);

IfxAsclin_Asc_read(&g_ascHandle, readData, &rcount, TIME_INFINITE); /* Receive data via RX */

printf("receive: 0x%x, 0x%x, 0x%x, 0x%x\n", readData[0], readData[1], readData[2], readData[3]);

}

 

here is the output of the function:

Start program
receive: 0x1e, 0x80, 0x36, 0x0, 0x1, 0xed

The IC is not responding to the configuration frame, may i know what is wrong?

 

set up: Aurix TC265 TFT with TLE9015 shield, connected to a TLE9012 development board. powered with 12V.

Thank you!

0 Likes
1 Solution
ChandraKachana
Moderator
Moderator
Moderator
First question asked 25 replies posted 50 sign-ins

@yyleow_ 

Wake up sequence is missing in your steps and it might be the reason why you are not receiving reply frame from the device as the device is not received wake signal so these devices are in sleep mode

Follow below steps to configure the TLE9012DQU node which includes wakeup signal, configuration command and watchdog command

After powering U12P and GND, a wake-up signal via UART (directly to the TLE9012DQU) or iso UART (using the transceiver TLE9015DQU) is required. The wake-up signal is an alternating signal (2 bytes of 0xAA - for details see TLE9012DQU datasheet Chapter 6: Watchdog and wake-up function). Afterward, the device needs to be enumerated (see Chapter 3.1 of the User Manual) and the watchdog counter must be written cyclically otherwise the device goes back to sleep mode.

View solution in original post

0 Likes
2 Replies
ChandraKachana
Moderator
Moderator
Moderator
First question asked 25 replies posted 50 sign-ins

@yyleow_ 

Wake up sequence is missing in your steps and it might be the reason why you are not receiving reply frame from the device as the device is not received wake signal so these devices are in sleep mode

Follow below steps to configure the TLE9012DQU node which includes wakeup signal, configuration command and watchdog command

After powering U12P and GND, a wake-up signal via UART (directly to the TLE9012DQU) or iso UART (using the transceiver TLE9015DQU) is required. The wake-up signal is an alternating signal (2 bytes of 0xAA - for details see TLE9012DQU datasheet Chapter 6: Watchdog and wake-up function). Afterward, the device needs to be enumerated (see Chapter 3.1 of the User Manual) and the watchdog counter must be written cyclically otherwise the device goes back to sleep mode.

0 Likes
lock attach
Attachments are accessible only for community members.

@ChandraKachana 

Thank you for the response.

I have edited the code as such, but I am still not getting any readback.

wakeUpSignal();

setInitialization();

while(1)

{

setWatchDogTimer();

checkReadBack();

}

 

void setInitialization(void) {

/* Transmit configuration */

uint8 transmitData[6] = {0x1e, 0x80, 0x36, 0x00, 0x01, 0xed};

/* Size of the message */

Ifx_SizeT tcount = sizeof(transmitData);

/* Transmit data via TX */

IfxAsclin_Asc_write(&g_ascHandle, transmitData, &tcount, TIME_INFINITE);

 

/* check transmit with loopback mode */

uint8 readTransmitData[6];

Ifx_SizeT rtcount = sizeof(readTransmitData);

IfxAsclin_Asc_read(&g_ascHandle, readTransmitData, &rtcount, TIME_INFINITE); /* Receive data via RX */

printf("loopback: 0x%x, 0x%x, 0x%x, 0x%x, 0x%x, 0x%x\n", readTransmitData[0], readTransmitData[1], readTransmitData[2], readTransmitData[3], readTransmitData[4], readTransmitData[5]);

}

 

void setWatchDogTimer(void) {

/* Transmit configuration */

uint8 transmitData[6] = {0x1e, 0x80, 0x3d, 0x00, 0x7f, 0x92};

/* Size of the message */

Ifx_SizeT tcount = sizeof(transmitData);

/* Transmit data via TX */

IfxAsclin_Asc_write(&g_ascHandle, transmitData, &tcount, TIME_INFINITE);

 

/* check transmit with loopback mode */

uint8 readTransmitData[6];

Ifx_SizeT rtcount = sizeof(readTransmitData);

IfxAsclin_Asc_read(&g_ascHandle, readTransmitData, &rtcount, TIME_INFINITE); /* Receive data via RX */

printf("loopback: 0x%x, 0x%x, 0x%x, 0x%x, 0x%x, 0x%x\n", readTransmitData[0], readTransmitData[1], readTransmitData[2], readTransmitData[3], readTransmitData[4], readTransmitData[5]);

}

 

void wakeUpSignal(void) {

/* Transmit configuration */

uint8 transmitData1[2] = {0xaa, 0xaa};

/* Size of the message */

Ifx_SizeT tcount1 = sizeof(transmitData1);

/* Transmit data via TX */

IfxAsclin_Asc_write(&g_ascHandle, transmitData1, &tcount1, TIME_INFINITE);

 

/* check transmit with loopback mode */

uint8 readTransmitData1[2];

Ifx_SizeT rtcount1 = sizeof(readTransmitData1);

IfxAsclin_Asc_read(&g_ascHandle, readTransmitData1, &rtcount1, TIME_INFINITE); /* Receive data via RX */

printf("loopback: 0x%x, 0x%x\n", readTransmitData1[0], readTransmitData1[1]);

 

}

 

void checkReadBack(void) {

uint8 readData[4];

Ifx_SizeT rcount = sizeof(readData);

IfxAsclin_Asc_read(&g_ascHandle, readData, &rcount, TIME_INFINITE); /* Receive data via RX */

printf("receive: 0x%x, 0x%x, 0x%x, 0x%x\n", readData[0], readData[1], readData[2], readData[3]);

}

 

Same as previously, I can only read the loopback frames that i transmitted.

Start program
loopback: 0xaa, 0xaa
loopback: 0x1e, 0x80, 0x36, 0x0, 0x1, 0xed
loopback: 0x1e, 0x80, 0x3d, 0x0, 0x7f, 0x92
0 Likes