Hi, I think that rtc should be one! If you have two rtcs which one is correct? And from which one OS will sync time? >From my point of view if you select both internal rtc and external rtc there >should be an error (in this case as a side effect) or the config options for them must be mutually exclusive. How many rtcs does have the pc? Or the smartphone? If you select only internal or only external rtc there is no problem.
Best regards -----Original Message----- From: Petro Karashchenko <petro.karashche...@gmail.com> Sent: Wednesday, April 26, 2023 6:15 PM To: dev@nuttx.apache.org Subject: Re: external rtc small fix Hello Krasimir, One of the contributors brought https://lists.apache.org/thread/y7zrsbf2k86n1qbjlt67hlcj10smjdfw into the discussion. Could you please take a look and reply if you agree? Best regards, Petro On Wed, Apr 26, 2023, 10:26 AM Petro Karashchenko < petro.karashche...@gmail.com> wrote: > Please take a look if this https://github.com/apache/nuttx/pull/9104 > fixes the reported issue. > > Best regards, > Petro > > ср, 26 квіт. 2023 р. о 10:10 Krasimir Cheshmedzhiev < > cheshmedzh...@gmail.com> пише: > >> Hi, >> >> 12.1, but this exists in earlier versions - 7.27 for example >> >> >>> So you propose not to call up_rtc_initialize(); as well? >> >> No, only when using external rtc. >> >> Should be: >> >> #if defined(CONFIG_RTC) && !defined(CONFIG_RTC_EXTERNAL) >> /* Initialize the internal RTC hardware. Initialization of external RTC >> * must be deferred until the system has booted. >> */ >> >> up_rtc_initialize(); >> ..... >> >> Best regards >> >> -----Original Message----- >> From: Petro Karashchenko <petro.karashche...@gmail.com> >> Sent: Wednesday, April 26, 2023 10:02 AM >> To: dev@nuttx.apache.org >> Subject: Re: external rtc small fix >> >> Hi, >> >> Which version are you using? In the latest master I see: >> #if defined(CONFIG_RTC) >> /* Initialize the internal RTC hardware. Initialization of external RTC >> * must be deferred until the system has booted. >> */ >> >> up_rtc_initialize(); >> >> #if !defined(CONFIG_RTC_EXTERNAL) >> /* Initialize the time value to match the RTC */ >> >> clock_inittime(NULL); >> #endif >> #endif >> >> So you propose not to call up_rtc_initialize(); as well? >> >> Best regards, >> Petro >> >> ср, 26 квіт. 2023 р. о 09:33 Krasimir Cheshmedzhiev < >> cheshmedzh...@gmail.com> >> пише: >> >> > Hi all, >> > >> > >> > >> > When using external rtc the function up_rtc_initialize() in file >> > nuttx/sched/clock_initialize.c should not be called. >> > >> > A small fix is attached. >> > >> > >> > >> > Best regards >> > >> >>