[NTLK] Did I miss the memo?

Matthias Melcher m.melcher at robowerk.de
Sat Jan 4 12:29:52 PST 2025


OK, total geek stuff for whatever it's worth:


Stopping at "Throw", LR is 0x0013BAEC
0x0013BA80: TNewInternalFlash::ReadWrite(long (TFlashRange::)(unsigned long, #12, char *), unsigned char &, unsigned char &, char *)
bt:
0x0013BAEC = ReadWrite__17TNewInternalFlashFM11TFlashR
0x0013BC88 = Read__17TNewInternalFlashFUlT1Pc+72
0x0013BA90 = ReadWrite__17TNewInternalFlashFM11TFlashR
0x000C7EE4 = BasicRead__11TFlashStoreFUlPvT1+344
0x0013BC50 = Read__17TNewInternalFlashFUlT1Pc+16
0x0014836C = Set__7TObjRefFUlT1+84
0x000C7D9C = BasicRead__11TFlashStoreFUlPvT1+16

0x0013BAEC = ReadWrite__17TNewInternalFlashFM11TFlashR

I can see the scheduler spin like crazy. It does call GetGlobalTime, so there is a chance that it can't handle the returned time.

It seems (around 0x001CC2E8) that it compares gLastTaskEndTime to the current time, but a wrap-around happened, and the current time is 0 which is always less than gLastTaskEndTime. The function CompSub seems to be part of this.

Further parts to look at:

0x0013D024: RestartTimerOverflowDetect(void *)
0x0013D068: StartTimerOverflowDetect(void)
UpdateClock:    @ 0x003AD440
GetClock:   @ 0x003AD41C

Phew



More information about the NewtonTalk mailing list