[old bug] Please take care with the spi_xx25xx eeprom driver

2023-03-20 Thread Sebastien Lorquet
Hi, If you use the spi_xx25xx EEPROM driver I submitted in 2014, please see this pull request: https://github.com/apache/nuttx/pull/8852 It contains a SPI bus lock bug that was silent and could have resulted in bus conflicts if several devices interleaved accesses. New libc code now has mo

Re: Questions about ble/wifi

2023-03-20 Thread Alexandru Motoi
Hi Alan, Thank you for your answer! I will look into nimBLE and try to adapt it to ESP32 and start from there. BR, Alex În sâm., 18 mar. 2023 la 13:41, Alan C. Assis a scris: > Hi Alexandru, > > I tested here and the BLE for ESP32/C3 is indeed broken in the mainline! > > So I will investigat

RTC synchronization with system time

2023-03-20 Thread Michal Lenc
Hello all, NuttX offers a function clock_synchronize() that synchronizes system clock with clock from RTC (internal or external). The synchronization is done during board initialization and I suppose this can also be called from an application level if required. However I was not able to find

Re: RTC synchronization with system time

2023-03-20 Thread Gregory Nutt
You wouldn't really do this from application level, right? There is currently no POSIX-compatible application interface to do that.  But you could implement a kernel thread that is started in your board initialization logic that can call clock_synchronize() according to whatever criteria you ne

Re: RTC synchronization with system time

2023-03-20 Thread David S. Alessio
Hello, Michal, You might want to take a look at PTP (Precision Time Protocol) https://en.wikipedia.org/wiki/PTPd and PTPd, a BSD-licensed implementation: https://github.com/ptpd/ptpd PTP is designed to sync the

Re: RTC synchronization with system time

2023-03-20 Thread Gregory Nutt
On 3/20/2023 5:15 PM, Gregory Nutt wrote: You wouldn't really do this from application level, right? There is currently no POSIX-compatible application interface to do that. There is no /POSIX /interface to do this, but the Linux interface adjtime() -- see https://man7.org/linux/man-pages/man

Re: RTC synchronization with system time

2023-03-20 Thread Gregory Nutt
  adjtime() is not properly configured as an OS interface; it would need system call hooks in syscall/ and include/sys in order to be usable in all build configurations. I see a few other issues with adjtime() that I documented here: https://github.com/apache/nuttx/issues/8858

Re: RTC synchronization with system time

2023-03-20 Thread Gregory Nutt
NuttX offers a function clock_synchronize() that synchronizes system clock with clock from RTC (internal or external). The synchronization is done during board initialization and I suppose this can also be called from an application level if required. I think clock_synchronize() is okay for sta

Re: RTC synchronization with system time

2023-03-20 Thread Nathan Hartman
On Mon, Mar 20, 2023 at 10:36 PM Gregory Nutt wrote: > > > NuttX offers a function clock_synchronize() that synchronizes system > clock > > with clock from RTC (internal or external). The synchronization is done > > during board initialization and I suppose this can also be called from an > > app

Re: RTC synchronization with system time

2023-03-20 Thread Gregory Nutt
NuttX offers a function clock_synchronize() that synchronizes system clock with clock from RTC (internal or external). The synchronization is done during board initialization and I suppose this can also be called from an application level if required. I think clock_synchronize() is okay for st