CAN PAL - Dev ASSERT Check

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

CAN PAL - Dev ASSERT Check

ソリューションへジャンプ
623件の閲覧回数
zubizeratta
Contributor II

Hello,

MCU: S32K118

SDK : S32SDK_S32K1XX_RTM_4.0.1

In the CAN Driver, can_pal.c , Can_AllocateState function there's a DEV_ASSERT check which fails: 

(NO_OF_FLEXCAN_INSTS_FOR_CAN =1)

for (i = 0; i < NO_OF_FLEXCAN_INSTS_FOR_CAN; i++)
{
if (isAllocated[i] == false)
{
instanceMapping[i] = instance;
isAllocated[i] = true;
break;
}
}

if (i >= NO_OF_FLEXCAN_INSTS_FOR_CAN)
{
/* Should Never Reach Here */
DEV_ASSERT(false);
i = (NO_OF_FLEXCAN_INSTS_FOR_CAN-1U);
}

 

Even though value of 1 is valid for NO_OF_FLEXCAN_INSTS_FOR_CAN I don't get it exactly why it's checked if it's equal or greated than one. Shouldn't it be just ">1) ? 

 

0 件の賞賛
返信
1 解決策
598件の閲覧回数
Julián_AragónM
NXP TechSupport
NXP TechSupport

Hi @zubizeratta,

I will be supporting your issue over at your other thread in order to prevent any misunderstandings or miscommunications: CAN PAL Dev Assert Issue - NXP Community.

Best regards,
Julián

元の投稿で解決策を見る

0 件の賞賛
返信
1 返信
599件の閲覧回数
Julián_AragónM
NXP TechSupport
NXP TechSupport

Hi @zubizeratta,

I will be supporting your issue over at your other thread in order to prevent any misunderstandings or miscommunications: CAN PAL Dev Assert Issue - NXP Community.

Best regards,
Julián

0 件の賞賛
返信