Hi Champs,
My customer asked about remote frame. i checked his code setting and i think setting is OK. I found a related link discussed about remote frame. I checked customer code which it did set DLC
Customer test environment :PC<-->USB to CAN Converter <--> CAN Transceiver <--> F280049
PC sent remote frame but F280049 didn't response. When customer sent standard frame, F280049 response data frame.
I checked TRM which mentioned when if RmtEn=1, TxRqst will be set automatically and remote frame will autonomously be answered by a data frame. Could you please tell me which data frame will be sent automatically?
I checked our can.c which enable RmtEn when we set obj type to 'CAN_MSG_OBJ_TYPE_RXTX_REMOTE'. But Fig27-8 showed RmtEn=0 when we configure single RX obj for remote frame. Customer disable RmtEn but still can't receive remote frame. Customer setup can message obj code is shown below. Is there any other configuration we missed in here ? thanks!
CAN_setupMessageObject(CANB_BASE, (TX_OBJ_ID_3 + RX_OBJ_OFFSET), 0x310, CAN_MSG_FRAME_STD, CAN_MSG_OBJ_TYPE_RXTX_REMOTE, 0, CAN_MSG_OBJ_RX_INT_ENABLE, 0);
CAN ISR setting
#pragma CODE_SECTION(canISR,".TI.ramfunc") interrupt void canISR(void) { uint32_t status; // Read the CAN interrupt status to find the cause of the interrupt status = CAN_getInterruptCause(CANB_BASE); // If the cause is a controller status interrupt, then get the status if(status == CAN_INT_INT0ID_STATUS) { status = CAN_getStatus(CANB_BASE); // Check to see if an error occurred. if(((status & ~(CAN_STATUS_TXOK | CAN_STATUS_RXOK)) != 7) && ((status & ~(CAN_STATUS_TXOK | CAN_STATUS_RXOK)) != 0)) { // Clear Error Flag EX_COUNT++; if (EX_COUNT > 500) { EX_COUNT = 0; } } } else if(status <= RX_OBJ_OFFSET) { TX_COUNT++; if (TX_COUNT > 500) { TX_COUNT = 0; } CAN_clearInterruptStatus(CANB_BASE, status); } else if(status > RX_OBJ_OFFSET) { RX_COUNT++; if (RX_COUNT > 500) { RX_COUNT = 0; } // CAN_readMessage(CANB_BASE, status, rxMsgData); // C1RX.RX_Data[0] = rxMsgData[0]; // C1RX.RX_Data[1] = rxMsgData[1]; // C1RX.RX_Data[2] = rxMsgData[2]; // C1RX.RX_Data[3] = rxMsgData[3]; // C1RX.RX_Data[4] = rxMsgData[4]; // C1RX.RX_Data[5] = rxMsgData[5]; // C1RX.RX_Data[6] = rxMsgData[6]; // C1RX.RX_Data[7] = rxMsgData[7]; C1RX.DLC = MSG_DATA_LENGTH; CAN_readMessage(CANB_BASE, status, C1RX.RX_Data);