We have purchased the NXP's MPC5775B EVB kit for Testing the CAN interface, We are currently facing challenges utilizing the Demo code available within SDK RTM 3.0.0. Please let us know if we miss anything while utilizing the "flexcan_mpc5777c_group FlexCAN MPC5777C" example. This example is supposed to work as mentioned in the example note that it should wait for frames to be received on the configured message buffer, once available it will receive the frames.
We have tried the example with the following setup:
1. J58 and J60 are connected in default configurations. (1-2)
2. 12V power plug is connected with EVB on 12V input.
3. OpenSDA debug cable is attached with EVB j116 and PC via USB cable
4. BUS MASTER Tool connected with PEAK_USB_CAN is transmitting 8-byte long messages every 500ms with Message ID 0x190.
#define TX_MAILBOX (1UL)
#define TX_MSG_ID (1UL)
#define RX_MAILBOX (0UL)
#define RX_MSG_ID (0x190UL) // From default we have used required msg id to recieve
The following configuration is auto-generated with the default configuration of the example.
const flexcan_user_config_t canCom1_InitConfig0 = {
.pe_clock = FLEXCAN_CLK_SOURCE_OSC,
.max_num_mb = 16,
.num_id_filters = FLEXCAN_RX_FIFO_ID_FILTERS_8,
.is_rx_fifo_needed = false,
.flexcanMode = FLEXCAN_NORMAL_MODE,
.bitrate = {
.propSeg = 7,
.phaseSeg1 = 4,
.phaseSeg2 = 1,
.preDivider = 4,
.rJumpwidth = 1
},
.transfer_type = FLEXCAN_RXFIFO_USING_INTERRUPTS
};
// Following is dataInfo used to configure RX mailbox and we have updated the required data_length with 8 to receive a message with message id 0x190 rather than 1 in the default example.
flexcan_data_info_t dataInfo =
{
.data_length = 8U,
.msg_id_type = FLEXCAN_MSG_ID_STD
};
In debugging, we observed that "FLEXCAN_DRV_GetTransferStatus()" function always returns STATUS_BUSY. That means we have not received any message.
Please help me with the S32DS PA IDE-based project to get started with the CAN FlexCAN example.