PRINTF("before sleep1000: slow clock is: %d\n", ullTime) PRINTF("boot finished: slow clock is: %d\n", ullTime) If I subtract the first from the second value I get 62016, which divided by the slow clock rate gives 1.89 seconds, which is different from the system ticks got by Clock_getTicks, which is approx 2340 ticks (2.3s).Īnother totally weird thing: the slow clock does not change if I do some sleep (either by osi_Sleep or UtilsDelay): What I understand from this is that the clock decreases. Then I call for hibernation and after a few line I get: Immediately after main starts the value is:Īfter boot (which takes approx 2 seconds with some variation) the value is always: This is what I get if I run the application: PRCMHIBRegWrite(HIB3P3_BASE HIB3P3_O_MEM_HIB_RTC_TIMER_LSW, (unsigned long) 0) Īll this has no effect on the slow clock counter. PRCMHIBRegWrite(HIB3P3_BASE HIB3P3_O_MEM_HIB_RTC_TIMER_MSW, (unsigned long) 0) Or by writing 0 to the same register I read to get the slow clock (but probably this is not the proper way): PRCMHIBRegWrite(HIB3P3_BASE HIB3P3_O_MEM_HIB_RTC_TIMER_RESET, (unsigned long) 0xFFFFFFFF) I tried either by writing a 1, or 0xFFFFFFFF to the RESET register: I also tried resetting the slow clock counter, but I cannot do that. Unsigned long long ullSlowClockGet = PRCMSlowClkCtrGet() Get slow clock (for UNIX time recovery after hibernation) MAP_PRCMHibernateWakeUpGPIOSelect(source
0 Comments
Leave a Reply. |