S32K314 Not sending CAN frame

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

S32K314 Not sending CAN frame

2,696件の閲覧回数
Shapan
Contributor I

Hello There,

I am trying to send CAN/FD frame from S32K314 based on FlexCAN_example, but no frames are visible on the CAN trace, below is my code, I have also attached the CAN configurations:

extern void CAN0_ORED_0_31_MB_IRQHandler(void);
 
int main(void)
{
    /* Write your code here */
 
Clock_Ip_Init(&Clock_Ip_aClockConfig[0]);
 
 
Siul2_Port_Ip_Init(NUM_OF_CONFIGURED_PINS_PortContainer_0_BOARD_InitPeripherals,g_pin_mux_InitConfigArr_PortContainer_0_BOARD_InitPeripherals);
 
IntCtrl_Ip_EnableIrq(FlexCAN0_1_IRQn);
IntCtrl_Ip_InstallHandler(FlexCAN0_1_IRQn, CAN0_ORED_0_31_MB_IRQHandler, NULL_PTR);
 
Flexcan_Ip_DataInfoType rx_info = {
.msg_id_type = FLEXCAN_MSG_ID_STD,
.data_length = 8u,
.is_polling = TRUE,
.is_remote = FALSE
};
Flexcan_Ip_MsgBuffType rxData;
FlexCAN_Ip_Init(INST_FLEXCAN_0, &FlexCAN_State0, &FlexCAN_Config0);
FlexCAN_Ip_SetStartMode(INST_FLEXCAN_0);
FlexCAN_Ip_ConfigRxMb(INST_FLEXCAN_0, RX_MB_IDX, &rx_info, MSG_ID);
while(1)
{
    rx_info.is_polling = TRUE;
FlexCAN_Ip_Send(INST_FLEXCAN_0, TX_MB_IDX, &rx_info, MSG_ID, (uint8 *)&dummyData);
}
    return exit_code;
}

 

Please let me know am I missing anything here ?

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

2,672件の閲覧回数
Julián_AragónM
NXP TechSupport
NXP TechSupport

Hi @Shapan,

Are you utilizing two nodes (two S32K314) or are you measuring the CAN Line with an analyzer? 

If using a CAN analyzer tool, make sure the CAN bit setting is configured to have the same sample point as configuration. It is recommended to have same prescaler and TDC is not needed for these rates. 

Best regards,
Julián

0 件の賞賛
返信

2,663件の閲覧回数
Shapan
Contributor I

Hi @Julián_AragónM ,
Thanks for the reply, Yes I am using the CANalyzer for this, I have tried the bit rate according to the tool but still no solution., tried with different baudrates (500k, 1MB etc,.)

I have attached the ESR1 register information, kindly look into this

0 件の賞賛
返信