s32k344 CAN Reception code

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

s32k344 CAN Reception code

2,493件の閲覧回数
ash123456789
Contributor III

I am Sending Can msg after receiving Can msg but its sending Can msg without receiving what went wrong 

0 件の賞賛
返信
5 返答(返信)

2,467件の閲覧回数
PetrS
NXP TechSupport
NXP TechSupport

Hi,

change a code little bit...

FlexCAN_Ip_SetStartMode(INST_FLEXCAN_0);
FlexCAN_Ip_ConfigRxMb(INST_FLEXCAN_0, RX_MB_IDX, &rx_info, MSG_ID);

FlexCAN_Ip_Receive(INST_FLEXCAN_0, RX_MB_IDX, &RxData, false);

while(1)
{

      if(FlexCAN_Ip_GetTransferStatus(INST_FLEXCAN_0, RX_MB_IDX) == FLEXCAN_STATUS_SUCCESS)
        {

               FlexCAN_Ip_Send(INST_FLEXCAN_0, TX_MB_IDX, &tx_info, MSG_ID, &RxData);
              FlexCAN_Ip_Receive(INST_FLEXCAN_0, RX_MB_IDX, &RxData, false);
        }

}

This is if receive does not use a polling option. If you want to have pooling one you need to call FlexCAN_Ip_MainFunctionRead to process received frame and update driver status. 
Do not clear MB flag, it is done by driver.

BR, Petr

0 件の賞賛
返信

2,435件の閲覧回数
ash123456789
Contributor III

please help me to find out mistake why its not working

0 件の賞賛
返信

2,442件の閲覧回数
ash123456789
Contributor III
its not working is there any document where it shown step by step how do configure and transmit or receive in both method like polling and intruppt
0 件の賞賛
返信

2,416件の閲覧回数
PetrS
NXP TechSupport
NXP TechSupport
0 件の賞賛
返信

2,369件の閲覧回数
ash123456789
Contributor III
but i am using setup RTD version 5.0.0
and design studio 3.5
this refernce example code is not working in my code
0 件の賞賛
返信