This problem is related to https://e2e.ti.com/support/processors/f/791/p/946975/3507545#3507545
The RTC does not always start when using the internal clock. This is becoming a quite serous issue for us.
In u-boot SPL I configure the RTC_OSC_REG to be 0x40 (internal clock)
Later, in the u-boot-prompt, I am then starting the RTC by setting RTC_CTRL_REG = 0x01, then reading the status of RTC_STATUS_REG bit 1 to see if the RTC is running or not. I am always booting from power off when doing this test. Sometimes the RTC is started and sometimes it isn't.
Press SPACE to abort autoboot in 0 seconds => md 44e3e040 1 ; md 44e3e044 1 ; md 44e3e054 1 44e3e040: 00000000 .... 44e3e044: 00000000 .... 44e3e054: 00000040 @... => mw 44e3e040 1 ; md 44e3e040 1 ; md 44e3e044 1 ; md 44e3e054 1 44e3e040: 00000001 .... 44e3e044: 00000002 .... // As you can see, the status here is running, so everything is fine 44e3e054: 00000040 @... =>
Press SPACE to abort autoboot in 0 seconds => md 44e3e040 1 ; md 44e3e044 1 ; md 44e3e054 1 44e3e040: 00000000 .... 44e3e044: 00000000 .... 44e3e054: 00000040 @... => mw 44e3e040 1 ; md 44e3e040 1 ; md 44e3e044 1 ; md 44e3e054 1 44e3e040: 00000001 .... 44e3e044: 00000000 .... // As you can se here, the status is NOT running. 44e3e054: 00000040 @... =>
In the second case I am not able get the RTC running at all. starting/stopping the RTC have no effect.