MPC5775B EVB FlexCAN Example Not working

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

MPC5775B EVB FlexCAN Example Not working

269 Views
VishalB
Contributor I
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.
0 Kudos
Reply
1 Reply

255 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

there are two CAN transceivers on the board, standalone TJA1145 and second as part of SBC chip. The SBC chip is put by jumper J45 in Debug mode so the CAN transceiver is set to normal operation mode by default allowing CAN communication without SPI configuration. By default FlexCAN_D module is connected to it (jumpers J48, J50).

The TJA1145 starts in Standby mode so you need to configure it through SPI to put device to Normal mode and enable CAN transceiver. By default FlexCAN_A module is connected to it (jumpers J58, J60).

There is no SDK based example directly for this board, although using SBC's transceiver it could run.

The TJA1145 generic driver can be found e.g. here https://community.nxp.com/message/936919?commentID=936919#comment-936919 

BR, Petr

0 Kudos
Reply