LPC546x SDK2.7.0 CAN drivers bug report

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

LPC546x SDK2.7.0 CAN drivers bug report

476 Views
geweilin
Contributor II

SDK2.7.0 CAN drivers still has bug which can cause interrupt process missing, I debug and share the fixed code here.

The code of function MCAN_ClearStatusFlag should be changed from the following:

static inline void MCAN_ClearStatusFlag(CAN_Type *base, uint32_t mask)
{
    /* Write 1 to clear status flag. */
    base->IR |= mask;
}

to the following:

static inline void MCAN_ClearStatusFlag(CAN_Type *base, uint32_t mask)
{
    /* Write 1 to clear status flag. */
    base->IR = mask;
}

the problem is operator ‘|=’ will clear all pending flags, correct method is use operator '='

So, NXP and community administrator please fixed it in the next SDK version.

May be some other SDKs also exists this bug.

Labels (2)
0 Kudos
1 Reply

389 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

HI weilin ge 

Did you or anyone ever report this issue? if yes, do you have the link or case number?

I will check them together. Thanks for your cooperation!

Have a nice day,

Jun Zhang

0 Kudos