Hi everyone,
I am using the flexcan example "S32K144_Project_FlexCan" on S32k144EVB. If I only do the initialisation (see the code further down) the execution ends up in DefaultISR some code later.
(I can change the code to what I want, its always the same ending)
This only happens when using 80MHz ozillation.
At 56Mhz I do not have such problems.
Disassembly
DefaultISR:
b DefaultISR
.size DefaultISR, . - DefaultISR
Console Window prints the follwoing:
Initializing.
Target has been RESET and is active.
BusFault: A precise (synchronous) data access error has occurred.
Possible BusFault location: 0x40049000.
HardFault: A fault has been escalated to a hard fault.
My code:
int main(void)
{
uint32_t rx_msg_count = 0; /*< Receive message counter */
/*!
* Initialization:
* =======================
*/
WDOG_disable(); /* Disable WDOG */
SOSC_init_8MHz(); /* Initialize system oscillator for 8 MHz xtal */
SPLL_init_160MHz(); /* Initialize SPLL to 160 MHz with 8 MHz SOSC */
NormalRUNmode_80MHz(); /* Init clocks: 80 MHz sysclk & core, 40 MHz bus, 20 MHz flash */
//FLEXCAN0_init(); /* Init FlexCAN0 */
//PORT_init(); /* Configure ports */
...some more code