Part Number: AWR1642BOOST
Other Parts Discussed in Thread: AWR1642
HI,
we are using AWR1642boost with label XA1642ABSABL ES2.0 label . we downloaded relevant sdk i.e 02_00_00_04.we are using short range radar code with CANFD driver to transmit radar in CLASSIC FRAME format.I have attached pcan tool settings below.
what we observe that if the detected objects are around 40(>31) ,pcan view trace gets stopped logging.I have attached can_send() function we are using below.we have fdmode ,brs registers set to 0, dar register set to 0 in mcan initialization and all hardware changes are taken care.Our observation is from multiple logs which we did not see with old awr1642 boards. please look into below queries.
1) we are following Task_sleep(1); in below code even though it is classic frame(as I see in other threads ,it is necessary if we are using only CANFD format) But in our case if we remove Task_sleep(1); for classic frame format then we are seeing only magic 8 bytes only in pcan view tool(no other bytes,only maigc no 8 bytes continuously).It looks strange.
2)From our calculation 1Mbps CAN speed means roughly it needs 10micro seconds for 1 byte transmission, In our case 40 detected objects means a frame of 376 bytes .It needs 3760 micro seconds for completing CAN transmission. Does it mean, Before it completes the transmission, next frame send request arrived? we are using standard SRR code only .
3) If really scenario 2 is true,there is no issue with UART transmission.is it because we are using uart_writepolling()? Any next frame request will overwrite previous request?
4) If the problem is really with can_send() ,if we implement printf() statements ,is it possible to see it in running mode i.e after flashing binary also?
void can_send(uint8_t *buffer,uint32_t size)
{
int32_t errCode = 0;
uint8_t i;
uint32_t remdatsize=0;
if(buffer != NULL)
{
if((size>0))
{
remdatsize = size;
while((remdatsize >0))
{
memset(&appDcanRadarData, 0xff, sizeof (appDcanRadarData));
if(remdatsize >7)
{
appDcanRadarData[0]= *(uint8_t*)buffer; buffer = (uint8_t*)buffer+1;
appDcanRadarData[1]= *(uint8_t*)buffer; buffer = (uint8_t*)buffer+1;
appDcanRadarData[2]= *(uint8_t*)buffer; buffer = (uint8_t*)buffer+1;
appDcanRadarData[3]= *(uint8_t*)buffer; buffer = (uint8_t*)buffer+1;
appDcanRadarData[4]= *(uint8_t*)buffer; buffer = (uint8_t*)buffer+1;
appDcanRadarData[5]= *(uint8_t*)buffer; buffer = (uint8_t*)buffer+1;
appDcanRadarData[6]= *(uint8_t*)buffer; buffer = (uint8_t*)buffer+1;
appDcanRadarData[7]= *(uint8_t*)buffer; buffer = (uint8_t*)buffer+1;
CANFD_transmitData (txMsgObjHandle, txMsgObjectParams.msgIdentifier, CANFD_MCANFrameType_CLASSIC, 8U, &appDcanRadarData[0], &errCode);
remdatsize = remdatsize-8;
}
else if(remdatsize>0)
{
for(i=0;i<remdatsize;i++)
{
appDcanRadarData[i]= *(uint8_t*)buffer;
buffer = (uint8_t*)buffer+1;
}
CANFD_transmitData (txMsgObjHandle, txMsgObjectParams.msgIdentifier, CANFD_MCANFrameType_CLASSIC, 8U, &appDcanRadarData[0], &errCode);
remdatsize=0;
}
else
{
}
Task_sleep(1);
}
}
}
}
