AnsweredAssumed Answered

SDK Real-time clock adaptation hanging after running cmd_get_datetime

Question asked by Piotr Cerba on Oct 1, 2015
Latest reply on Oct 5, 2015 by Jorge_Gonzalez

Hello, in this thread Unable to use an RTC example - source files missing in KDS 3.0 thanks to Jorge Gonzalez I managed to successfully build a project adopting majority of code from SDK example for RTC.

Now I have encountered another problem.

When I debug the SDK example after calling


it goes for the following calls:


RTC_DRV_GetDatetime(0, &date);



RTC_HAL_GetDatetimeInSecs(RTC_Type *rtcBase, uint32_t * seconds)


RTC_HAL_GetSecsReg(RTC_Type *rtcBase)

And from 3. it calls



Stepping into 4. returns the debugger up to point 2.

Everything works OK.


However, in my application putting same (with all preceeding initializations copied from SDK example):


After identical jumps to 1, 2, 3 and 4 it jumps to one more file startup_MKL43Z4.S

where it loops infinitely around the following fragment of assembly code (ldr and bx):

DefaultISR:     ldr r0, =DefaultISR     bx r0     .size DefaultISR, . - DefaultISR

So the behaviour differs from original SDK example, where after calling RTC_RD_TSR(rtcBase); it immediately returns to the calling function.


Do you have any idea what might be causing it?

Why does it enter a section concerning some DefaultISR, if I do not trigger any interrupt?