S32K144 FLEXCAN OVERRUN

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

S32K144 FLEXCAN OVERRUN

2,018 Views
yashwanth411
Contributor II

Hello,

I am working S32K144 FLEXCAN driver. I configured message buffer  as receiver. Every 100ms I am receiving CAN frames. When I received first CAN frame CODE field in RAM register is written with 0x02 (FULL). After first frame, the CODE filled is written with 0x06 (OVERRUN). I am reading timestamp in RAM register and TIMER register to lock the buffer.

How to solve this overrun issue. Please help me. Waiting for your response.

Thanks & Regards,

Yashwanth 

3 Replies

1,635 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi Yashwanth,

You must read the MB C/S word to lock the MB. Otherwise new frame can be moved into this MB and CODE will be updated to OVERRUN.

The MB is unlocked when the CPU reads the Free Running Timer Register or the C/S word of another MB.

BR, Petr

1,635 Views
yashwanth411
Contributor II

Hi Stancik,

Thanks for replay. I am reading C/S word also.  Below one is my logic.

u32_RxCode = ((p_stgFlexCANRegsAccess[u8_lFlexCANCh]->RAM[u8_fMbNo * FCAN_MB_SIZE + 0]  & \
                                            FLEXCAN_MB_CODE_MASK) >> 24);

FLEXCAN_MB_CODE_MASK = 0x0F000000

After reading also I am getting overrun. 

Any changes I need to do. Please help me.

Thanks & Regards,

Yashwanth

0 Kudos
Reply

1,635 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi Yashwanth,

OVERRUN means the new coming message moved into MB before CPU serviced it (MB C/S word was read and unlocked by reading TIMER or other MB C/S word).

So do you really read the MB each time the message was moved into that MB?

BR, Petr