Hi, I have a CAN network with an MPC5634 and an MCF51JM128 assembled and now I want to add an LPC54608 to that network and I cannot find the correct configuration.
The MPC5634 has the following configuration:
/*-----------------------------------------------------------*/
/* CAN_A.MCR Module Control Register */
/*-----------------------------------------------------------*/
CAN_A.MCR.R = 0x5980000F;
/* Enabling the CAN module : Enabled */
/* Freeze Enable :Enabled*/
/* FIFO Enable :Disabled */
/* Halt : Enabled*/
/* Wake Up Interrupt Mask : Disabled */
/* Soft Reset : Disabled */
/* Supervisor Mode : Enabled */
/* Self Wake Up : Disabled */
/* Warning Interrupt : Disabled */
/* Wake Up Source : Disabled */
/* Doze Mode : Disabled */
/* Self Reception : Disabled */
/* Backwards Compatibility Configuration : Disabled */
/* Local Priority Enable : Disabled */
/* Abort Enable : Disabled */
/* ID Acceptance Mode : A*/
/* Maximum Number of Message Buffers : 15*/
/*------------------------------------------------------------*/
/* CAN_A.CRControl Register */
/*------------------------------------------------------------*/
CAN_A.CR.R = 0x09DB2006;
/* Bus -Off Interrupt Mask: Disabled */
/* CAN bit Sampling Mode: 1 Sample */
/* CAN Error Interrupt Mask: Disabled */
/* Clock Source: System */
/* Listen Only Mode: Disabled */
/* Loop Back Mode: Disabled */
/* Bus off Recovery: Enabled */
/* Lowest Buffer Transfer First: Disabled*/
/* Phase Segment1: 4 */
/* Phase Segment2: 4 */
/* Prescalar Division Factor: 10 */
/* Propagation Segment: 7 */
/* Resynchronization Jump Width: 4 */
/* Timer Synch Mode: Disabled */
And the Coldfire has the following configuration:

For the LPC54608 I am using the MCUXpresso IDE SDK with the following configuration:
MCAN_GetDefaultConfig(&mcanConfig);
MCAN_Init(EXAMPLE_MCAN, &mcanConfig, MCAN_CLK_FREQ);
/* Create MCAN handle structure and set call back function. */
MCAN_TransferCreateHandle(EXAMPLE_MCAN, &mcanHandle, mcan_callback, NULL);
/* Set Message RAM base address and clear to avoid BEU/BEC error. */
MCAN_SetMsgRAMBase(EXAMPLE_MCAN, MSG_RAM_BASE);
uint32_t *p=(uint32_t *)(MSG_RAM_BASE);
memset(p, 0, TX_BUFFER_OFS + 0x10U);
/* TX buffer config. */
txBuffer.address = TX_BUFFER_OFS;
txBuffer.dedicatedSize = 1U;
txBuffer.fqSize = 0;
txBuffer.datafieldSize = kMCAN_8ByteDatafield;
MCAN_SetTxBufferConfig(EXAMPLE_MCAN, &txBuffer);
/* Finish software initialization and enter normal mode, synchronizes to
CAN bus, ready for communication */
MCAN_EnterNormalMode(EXAMPLE_MCAN);
txIdentifier = 0x321U;
uint8_t tx_data[8]={0x0,0x1U,0x2U,0x3U,0x4U,0x5U,0x6U,0x7U};
tx_data[0] += count++;
txFrame.xtd = kMCAN_FrameIDStandard;
txFrame.rtr = kMCAN_FrameTypeData;
txFrame.fdf = 0;
txFrame.brs = 0;
txFrame.dlc = 8U;
txFrame.id = txIdentifier << STDID_OFFSET;
txFrame.data = tx_data;
txFrame.size = 8U;
txXfer.frame = &txFrame;
txXfer.bufferIdx = 0;
MCAN_TransferSendNonBlocking(EXAMPLE_MCAN, &mcanHandle, &txXfer);
After this the signal is seen on the oscilloscope but none of the devices on the network detect it.
I tried several options that the SDK allows me without results.
I need help.
Best Regards
Diego Perea