We have 2 custom developed boards containing the same K26 processor. Both boards share many of the same components, while the 2nd board lacks some. The XTAL0 is a 16 MHz component, the same for both boards, connected via 0 ohm resistors on one board and lacking these resistors on the other.
The XTAL32 is fed with a 32.768 oscillator, the same component and circuitry for both devices.
Now the weird this is that the production test code successfully initializes the internal RTC on board 1 and gets into a hard fault on board 2 with the call to RTC_GetStatusFlags() in the RTC_Init() function.
The same thing can be reproduced (consistantly) with the rtc_func_twr65f180m example in SDK 2.2.
I attached a Kinetis debugger output of the production test, where I have a hard-fault hardler installed.
What could be causing this ?