LPC546x SDK2.7.0 CAN drivers bug report

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

LPC546x SDK2.7.0 CAN drivers bug report

655 次查看
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.

标签 (2)
0 项奖励
回复
1 回复

568 次查看
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 项奖励
回复