Arjan van Vught

Members
  • Content Count

    10
  • Joined

  • Last visited

About Arjan van Vught

  • Rank
    Member

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. That's a shame as I am using the Orange Pi Zero LTS 256MB and the Orange Pi One boards only. I will try to contact Steven and ask if it is doable getting the external 32768 crystal on the(se) H2+/H3 boards.
  2. See the remarkable output below. Many observations and some questions: The internal RTC seems to be useless with the internal OSC. The internal RTC gets updated; once every ? seconds. From which source? What is the source for the date command? Specific which ARM Counter or with SoC Timer? This test is with an Internet connection; hence the system clock gets updated with the NTP Client. Interesting to know what happens with no Internet connection. pi@orangepizero:~$ cat ./rtc_test.sh while true do ./devmem2 0x01f00014 | tail -n 1 |rev|cut -f1 -d' '|rev | ./convert echo `date +"%H:%M:%S"` echo ============== sleep 120 done /* * convert.c */ #include <stdio.h> #include <stdlib.h> #define TIME_GET_SEC_VALUE(x) ((x) & 0x0000003f) #define TIME_GET_MIN_VALUE(x) (((x) & 0x00003f00) >> 8 ) #define TIME_GET_HOUR_VALUE(x) (((x) & 0x001f0000) >> 16) int main(void) { unsigned num; fscanf(stdin, "%x", &num); printf("%.2d:%.2d:%.2d\n", TIME_GET_HOUR_VALUE(num), TIME_GET_MIN_VALUE(num), TIME_GET_SEC_VALUE(num)); return EXIT_SUCCESS; }
  3. Therefore I am also showing the seconds from the date command. I will do another test. However, the apt update/upgrade I just did, it broke the startup.
  4. Simple test pi@orangepizero:~$ cat ./rtc_test.sh while true do ./dev2mem 0x01f00014 | tail -n 1 echo `date +"%S"` sleep 1 done pi@orangepizero:~$ sudo ./rtc_test.sh Value at address 0x1F00014 (0xb6ff7014): 0xF162D 22 Value at address 0x1F00014 (0xb6f63014): 0xF162E 23 Value at address 0x1F00014 (0xb6f09014): 0xF162F 24 Value at address 0x1F00014 (0xb6f4a014): 0xF1630 25 Value at address 0x1F00014 (0xb6f9f014): 0xF1632 26 Value at address 0x1F00014 (0xb6f0a014): 0xF1633 27 Value at address 0x1F00014 (0xb6ffb014): 0xF1634 28 Value at address 0x1F00014 (0xb6f8b014): 0xF1635 29 ^C Skipping a second here.
  5. So the check here https://github.com/armbian/linux/blob/sun8i/drivers/rtc/rtc-sunxi.c#L512 is basically wrong. The CTRL tells what has been set, and then AUTO_STA really tells the status. And the RTC goes into default internal with prescaler 0xF -> 16 MHz / 32 / 15 that is about 33KHz. Which is slightly faster than the desired 32768 Hz.
  6. This https://github.com/armbian/linux/blob/sun8i/drivers/rtc/rtc-sunxi.c#L499 is referencing to an external OSC.
  7. The internal clock (which is about 16MHz) does not give an accurate reference. So I did not try to use that option. I will check your source code for the configuration. Just reading the register directly and printing the value when the seconds have changed.
  8. Dear forum, When looking at the Orange Pi Zero schematic V1.1, the OSC-RTC box is empty. Does this mean that there is no crystal for the internal RTC? The internal RTC cannot be used at all? When just checking the time register, the RTC is running too fast. Thanks, Arjan
  9. Hi Rafa, I have low-level (no Linux) sample code here -> https://github.com/vanvught/rpidmx512/blob/master/lib-dmx/src/h3/dmx.c - Arjan
  10. See -> http://u-boot.10912.n7.nabble.com/SUNXI-CONFIG-VIDEO-SUNXI-is-never-set-td360711.html and -> http://u-boot.10912.n7.nabble.com/SUNXI-DE2-H3-Add-support-for-setenv-video-mode-td395068.html