FLEXCAN module not working in LS1021A

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

FLEXCAN module not working in LS1021A

438 Views
sukruthrameshba
Contributor III

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 Employee 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.

MCR_CTRL.png

RXERRCNT is 80 , read from ECR register, when I try to transmit a CAN message from the CANoe. As shown below

ECR.png

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

stuff_error.png

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

0 Kudos
2 Replies

325 Views
Pavel
NXP Employee
NXP Employee

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!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

325 Views
sukruthrameshba
Contributor III

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

0 Kudos