Hello,
I am trying to develop CAN driver for LS1021A. (I cant use the SDK from NXP I am using a custom made board)
Used this "Example MPC5744P FlexCAN simpleTXRX " uploaded by Petr Stancik as reference for developing CAN driver using FLEXCAN module.
Did these modifications
1. Endianess is taken care.
2. RCW configuration enabling CAN4_TX , CAN4_RX is loaded.
MCR , CTRL , message buffers are configured properly which could be seen in the debugger. Attached is the snapshot for reference.
RXERRCNT is 80 , read from ECR register, when I try to transmit a CAN message from the CANoe. As shown below
I don't see any CAN message on the bus.
When I try to transmit a CAN message from the transceiver (TJA1042T-/3), I see this message in the CANoe
Can you please help me out with the checkpoints ? Let me know if you need more information.
It would of great help if you can tell me , what could be the possible mistake.
Regards,
Sukruth
Test your board if the MCR[SRXDIS] bit is cleared and Loopback mode is enabled.
Have a great day,
Pavel Chubakov
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Dear Pavel,
Yes, MCR[SRXDIS] bit is cleared and LPB bit is enabled.
Here is the register settings loaded to MCR nad CTRL registers in FLEXCAN module.
CAN3.MCR.R = swapEndian(0x5921303F);
CAN3.CTRL.R = swapEndian(0xEED3016);
Regards,
Sukruth