AnsweredAssumed Answered

Message ram location in CAN controller(s) on LPC54608

Question asked by Norbert ten Hove on Nov 27, 2017
Latest reply on Jul 10, 2018 by Michael Rauch

Does someone have experience with setting up the CAN controller on the LPC54608?

I have troubles initializing the message ram. When I declare the variable (Keil MDK):


uint8_t can_msg_ram_base[128] __attribute__((at (0x20010000)));


...and provide the message ram to the CAN controller like this:

MCAN_SetMsgRAMBase(CAN0, (uint32_t)can_msg_ram_base);


...messages are sent on the CAN bus (see the screenshot, message ID 111h).


However, if I declare the can_msg_ram_base variable on any other address, messages are sent with all zeroes (see first line in screenshot).


Are there any restrictions on the message ram location? The user manual does not specify such restrictions, other than it must be located in internal SRAM. I don't see why I can't put the message ram on an arbitrary location. I also tried  to align this arbitrary location on a 4/8/16-byte boundary, but that does not help. Can someone provide me with more information on the the restrictions for the message ram of the CAN controller(s)?


CAN logging, showing empty message(s) and correct messages