LPC546x SDK2.7.0 CAN drivers bug report

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

LPC546x SDK2.7.0 CAN drivers bug report

1,276件の閲覧回数
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 返信

1,189件の閲覧回数
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 件の賞賛
返信