RT1052 FLEXCAN for some (for example,five) IDs communication

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

RT1052 FLEXCAN for some (for example,five) IDs communication

ソリューションへジャンプ
1,283件の閲覧回数
FromCH0
Contributor II

In https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/RT1052-FLEXCAN-for-any-ID-communication/t... ,you tell us how to use RT1052 FLEXCAN for any IDs communication.However, I need to know how to use RT1052 FLEXCAN for five or so different IDs (for example,0x18554400,0x18557800,0x18214400,0x13557800,0x10554400)communication and thus the other IDs communication will not performed.

0 件の賞賛
1 解決策
1,270件の閲覧回数
kerryzhou
NXP TechSupport
NXP TechSupport

Hi  @FromCH0 ,

   Thank you for your interest in the NXP MIMXRT product, I would like to provide service for you.

    If you need more ID filter, then you can use more MB, then set the individual MASK for the related MB,

   You can check the SDK API: 

void FLEXCAN_SetRxIndividualMask(CAN_Type *base, uint8_t maskIdx, uint32_t mask)

  Define the different MB, then configure the related mask, then it will just receive your defined IDs.

 

Wish it helps you!

Best Regards,

Kerry

 

Wish it helps you!

元の投稿で解決策を見る

0 件の賞賛
4 返答(返信)
1,271件の閲覧回数
kerryzhou
NXP TechSupport
NXP TechSupport

Hi  @FromCH0 ,

   Thank you for your interest in the NXP MIMXRT product, I would like to provide service for you.

    If you need more ID filter, then you can use more MB, then set the individual MASK for the related MB,

   You can check the SDK API: 

void FLEXCAN_SetRxIndividualMask(CAN_Type *base, uint8_t maskIdx, uint32_t mask)

  Define the different MB, then configure the related mask, then it will just receive your defined IDs.

 

Wish it helps you!

Best Regards,

Kerry

 

Wish it helps you!

0 件の賞賛
1,266件の閲覧回数
FromCH0
Contributor II

Than you very much!I'll try.

0 件の賞賛
1,264件の閲覧回数
kerryzhou
NXP TechSupport
NXP TechSupport

Hi @FromCH0 ,

  You are welcome!
   If you have issues, just let me know.

  If your question is solved, please tell me to mark the correct answer, just close this case, thanks.

 

Best Regards,

Kerry

0 件の賞賛
1,241件の閲覧回数
FromCH0
Contributor II

mb_config_0.format=kFLEXCAN_FrameFormatExtend; //扩展帧
mb_config_0.type=kFLEXCAN_FrameTypeData; //数据帧
mb_config_0.id=FLEXCAN_ID_EXT(can2_rxid_0); //接收的帧ID
FLEXCAN_SetRxMbConfig(CAN2,8,&mb_config_0,true);


mb_config_1.format=kFLEXCAN_FrameFormatExtend; //扩展帧
mb_config_1.type=kFLEXCAN_FrameTypeData; //数据帧
mb_config_1.id=FLEXCAN_ID_EXT(can2_rxid_1); //接收的帧ID
FLEXCAN_SetRxMbConfig(CAN2,10,&mb_config_1,true);

 

FLEXCAN_SetRxIndividualMask(CAN2,8,FLEXCAN_RX_MB_EXT_MASK(can2_rxid_0,0,0));
FLEXCAN_SetRxIndividualMask(CAN2,10,FLEXCAN_RX_MB_EXT_MASK(can2_rxid_1,0,0));

以上是我的测试程序的部分内容,测试程序接收到了指定的多个ID号的数据。

感谢!