i.MX8QM CAN can not recv data

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

i.MX8QM CAN can not recv data

225 Views
shineSSZ
Contributor I

Hi,all

I init CAN device (TJA1403T) on core M4, and M4 can send data to PC, but the M4 can not recv data from PC?

init CAN device like this:

first int the pin:

  if (sc_pm_set_resource_power_mode(ipc, SC_R_CAN_0, SC_PM_PW_MODE_ON) != SC_ERR_NONE)
{
PRINTF("Error: Failed to power on FLEXCAN0\r\n");
}
/* Set Peripheral clock frequency. */
if (CLOCK_SetIpFreq(kCLOCK_DMA_Can0, SC_24MHZ) == 0)
{
PRINTF("Error: Failed to set FLEXCAN frequency\r\n");
}  

second add a task in automotive.c to init the TJA1403T like this:

FLEXCAN_GetDefaultConfig(&flexcanConfig);
/* Init FlexCAN module. */
flexcanConfig.enableSelfWakeup = true;
flexcanConfig.disableSelfReception = true;
//flexcanConfig.enableLoopBack = true;
flexcanConfig.baudRate = 500000U;
#if (defined(SET_CAN_QUANTUM) && SET_CAN_QUANTUM)
flexcanConfig.timingConfig.phaseSeg1 = PSEG1;
flexcanConfig.timingConfig.phaseSeg2 = PSEG2;
flexcanConfig.timingConfig.propSeg = PROPSEG;
#endif
FLEXCAN_Init(APP_CAN, &flexcanConfig, APP_CAN_CLK_FREQ);

...

MCU can only send data from CANPro, But can not recv data from CANPro, any body can help?

0 Kudos
Reply
0 Replies