Hi Anders, As I said the RP2040 doesn't have a unique id like others MCUs, then the solution they found was read from its SPI Flash, more info:
https://github.com/raspberrypi/pico-sdk/pull/12 You need to look how they did it and use it in NuttX. BR, Alan On Thu, Mar 14, 2024 at 4:09 AM Anders <andyl...@proton.me.invalid> wrote: > Hello Alan and thanks for the warm welcome. > > Yes, the id is in the flash part of the board and the code for extracting > the unique id is in the Pico bootrom. But how to acces and run bootrom code > from a Nuttx application? > The code for other boards seem to access an id in a processor register. > And while access to flash fs on the Pico supposedly could give some hints, > a solution still eludes me. > > Anders > > -------- Originalmeddelande -------- > Den 25 feb. 2024 20:17, Alan C. Assis skrev: > > > Hi Anders, Welcome to NuttX !!! Yes, you are right, the rp2040 port > doesn't yet have support for uniqueid. If you want to add it, please enter > inside nuttx/arch/arm/src/ and "git grep uniqueid" for a reference how it > is done in other chips. Example in cxd56xx arch: > arch/arm/src/cxd56xx/cxd56_uid.c And cxd56xx common boards: > boards/arm/cxd56xx/common/src/cxd56_uid.c Notice that rp2040 doesn't have > unique id like other chips, but you have use the flash serial number as > unique id, more info: > https://forums.raspberrypi.com/viewtopic.php?t=331910 BR, Alan On Sun, > Feb 25, 2024 at 9:58 AM Anders wrote: > Having just started to play with > nuttx running on Raspberry Pi Pico, I > discovered that configuring support > for the unique id functions results in > a build of nuttx that fails. My > understanding is that support for this is > not currently added. One can > find code for this for other boards in the > corresponding directory tree > of nuttx. > > Reading in the archives of this list, it is not recommended > to use > functions from the Pico-sdk. So new driver code should be added. > > > What is the recommended way of adding this functionality? Adding the > > interface in a separate file of boards/arm/rp2040/raspberry-pi-pico/src/ > > and Make.defs seems easy. But where would the code for actually interfacing > > with the flash best go? > > Anders