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
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