lpcware

CAN config_calb ends up in HardFault_Handler

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 15, 2016 by lpcware
Content originally posted in LPCWare by CasperH on Tue Nov 01 00:26:52 MST 2011
Hi

I'm using a LPC11C24/301 controller trying to get the CAN sample running. After init_can using the following settings for CAN, the controller ends up in HardFault_Handler when running the config_calb.

// Initialize CAN Controller
uint32_t ClkInitTable[2] = {
    0x00000000UL, // CANCLKDIV
    0x00001C57UL  // CAN_BTR
};

I'm using an external 12MHz crystal, but have not used the PLL yet. Can someone help me setting the ClkInitTable if the controller is to be running on 48MHz with CAN baudrate of 500 kbit/s?

Outcomes