The mcu is LPC11c24
I am connected on PCAN view
The library is lpcopen_v2_00a_lpcxpresso_nxp_lpcxpresso_11c24.zip
I'm running the example: nxp_lpcxpresso_11c24_periph_ccan_rom
It's running very well with the baudrates: 125kBit/s and lower. but as soon as I get to 250kBit/s and higher I get BUSHEAVY on PCAN View
I tried with the function baudrateCalculate() and filling the array CanApiClkInitTable[0] = 0; CanApiClkInitTable[1] = 0x000076CB; (for 250kBit/s)
Both methods behave the same way, ie they only work when the baudrate is less than 125kBits/s
The datasheet says " If C_CAN baudrates above 100 kbit/s are required, the system oscillator must
be selected as the clock source for the system clock "
I have my SYSPLLCLKSEL as 0x00000001; to select System oscillator
I have my MAINCLKSEL as 0x00000003; to select System PLL clock out
from XTALIN of 12MHz the clock at AHB is 48MHz
After getting the BUSHEAVY problem I realised both the IRC_PD and SYSOSC_PD in the PDRUNCFG register are powered, so I thought maybe I should power down the IRC_PD so I added this line LPC_SYSTCTL->PDRUNCFG |= 1 << 1;
With still no success, I cut my can-bus wires from about 15 cm and I reduced them to about 8 cm but still no luck
Has anyone ever ran the example I mentioned and seen it working with 250kbits/s baudrate without modifications?
Is there a fine print that I'm missing?