Assistance Required for CAN 1 Configuration on LPC54606J512 MCU

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

Assistance Required for CAN 1 Configuration on LPC54606J512 MCU

467 Views
amit_sutrave77
Contributor I

 

Hello team,

I am working with the LPC54606J512 MCU and am trying to use CAN 1. I have configured the CAN_TD and CAN_RD pins, but I am encountering the error "kStatus_MCAN_ErrorStatus" when transmitting data. Below are the configurations I have changed for CAN 1:

#define USE_IMPROVED_TIMING_CONFIG (1U)
#define EXAMPLE_MCAN_IRQHandler CAN1_IRQ0_IRQHandler
#define EXAMPLE_MCAN_IRQn CAN1_IRQ0_IRQn
#define EXAMPLE_MCAN CAN1
#define MCAN_CLK_FREQ CLOCK_GetMCanClkFreq(1U)


The clock frequency is set to 12 MHz, with the following configuration:

config->baudRateA = 500000U;
config->baudRateD = 2000000U;
config->enableCanfdNormal = false;
config->enableCanfdSwitch = false;
config->enableLoopBackInt = false;
config->enableLoopBackExt = false;
config->enableBusMon = false;
/* Default protocol timing configuration, time quantum is 16. */
config->timingConfig.seg1 = 0xAU;
config->timingConfig.seg2 = 0x3U;
config->timingConfig.rJumpwidth = 0x3U;

Could you kindly guide me in resolving this issue.

Thanks & regards,
Amit Sutrave 

@a_s 

 

Labels (1)
0 Kudos
Reply
1 Reply

436 Views
Harry_Zhang
NXP Employee
NXP Employee

Hi @amit_sutrave77 

First, you should check the Hardware Connections and  Verify Clock and Baud Rate Configuration.

And then I think you can try a simple internal loopback test to confirm that CAN transmission and reception work without a transceiver.

Use an oscilloscope or logic analyzer to check if CAN_TD is sending data.

Capture error codes from the CAN error status registers.

BR

Harry

0 Kudos
Reply