MPC5775K FlexCan CANFD Configuration

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

MPC5775K FlexCan CANFD Configuration

1,375 Views
shreyasbelgave
Contributor II

hello,

I am new to programming of multicore microcontroller and  i am working on MPC5775K.

I configured CAN2 as CAN FD and DLC for msg Buffer configured as 64. I am using same msg Buffer for Tx and Rx.

when I receive 64 bytes DLC data on CAN it works properly, But when I receive 8bytes DLC data on CAN it doesnt work. it waits for msg buffer to be available. And when i receive first CAN msg of 64bytes DLC and if i receive all next CAN msgs as 8byte DLC, it works.

Am I missing configuring any register?

3 Replies

855 Views
shreyasbelgave
Contributor II

Hello PetrS,

I was doing with ECC enable, but I did not do 0x0080-0xADF memory initialization. 

After initialization It worked. 

Thanks :smileyhappy:

0 Kudos

855 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

The MPC5775K FlexCAN supports detection and correction of errors in memory read accesses.

Most probably the issue you have is due to this feature that is enabled by default.  The ECC error may have occurred due to module not being initialized properly. 

 

The ECC feature can be disabled by setting bit ECCDIS in CAN_MECR.  Note that bit ECRWRDIS in the same register prevents writes to the register unless it is cleared first.  Disabling ECC does not impact the normal operation of the FlexCAN. 

You can refer to this code which disables the ECC feature;  https://community.nxp.com/docs/DOC-329943

 

If the ECC reporting feature is enabled then all the memory positions from 0x0080to 0xADF must be initialized. See more in chapter 49.4.13 Detection and Correction of Memory Errors of the RM.

You can refer to the below code how the init could be done, it is for the MPC5777C but you can simply reuse it.

https://community.nxp.com/docs/DOC-334350

BR, Petr

855 Views
shreyasbelgave
Contributor II

Hello PetrS‌,

For the another project With the same Conditions I mentioned in question,

I configured CAN2 as CAN FD and DLC for msg Buffer configured as 64 core. I am using same msg Buffer for Tx and Rx.

This time I am facing different problem

when I receive 64 bytes DLC data on CAN it works properly, But when I receive 8bytes DLC data on CAN Controller is getting Reset.

I am doing it with  ECC reporting feature enable. and i followed steps u mentioned in link.

Regards,

Shreyas

0 Kudos