Hello,
I have OM13092 Dev. Board and using mcan_loopback example. I changed it little bit and receiving some datas on canbus. I know what datas should seen on canbus. There is a problem or I miss something. When I use semihost console datas have expected values. In second byte(column) I must see all zeros.But if I use UART console I see there some non-zero values. What does cause this ?
/*
for(int a=0;a<8;a++) {rcv_data[a] = *(rxFrame.data + a);}
Can_get_ID = rxFrame.id>>18U;
PRINTF("GET_ID: %x", Can_get_ID);
PRINTF(" DATA: ");
{PRINTF(" %d %d",rcv_data[0],rcv_data[1]);}
*/
Hi fatih ozen,
Do you mean the lpc54608 sdk code in folder: SDK_2.3.0_LPCXpresso54608\boards\lpcxpresso54608\driver_examples\mcan\loopback\iar?
Which line do you modify the code?
I use the official code, it works OK, but I don't where you modify the code, you said : I changed it little bit and receiving some datas on canbus. I know what datas should seen on canbus.
Do you also disable the loopback mode, and receive the data from the CAN bus directly? As you know the OM13092 don't have the CAN transceiver, do you connect the external CAN transceiver? If you still use the official code:
while(!rxComplete)
{
}
PRINTF("Received Frame ID: 0x%x\r\n", rxFrame.id >> STDID_OFFSET);
PRINTF("Received Frame DATA: ");
while(rxFrame.dlc--)
{
PRINTF("0x%x ", *(rxFrame.data++));
}
Can you receive the correct data?
Have a great day,
Kerry
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi kerryzhou,
I am using mcu xpresso ide and folder is SDK_2.3.0_LPCXpresso54608\boards\lpcxpresso54608\driver_examples\mcan\loopback.
I am not using loopback mode and I have Can Transceiver.
Here you can see the code :
Hi Ozen,
About the classic CAN driver for LPC54608, please refer to this code, you need to modify your Can operation code:
CAN/CAN-FD drivers and examples for use with LPC5461x parts
Then refer to project classical_msgobjs.
This is the MCUXpresso project, this project is just configured for LPC54608, you can run it directly.
Have a great day,
Kerry
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------