embassy-rp

Crates

git

Versions

rp235xb

Flavors

Skip to main content

Module uid

Module uid 

Source
Expand description

Unique ID (UID)

The ID is read once, on first use, and cached.

The source differs per chip:

  • RP2350: just reads the chip ID from OTP. Same as bootrom USB serial number.

  • RP2040: no chip ID, so use the flash chip’s unique ID, as per pico_get_unique_board_id in pico-sdk. Some flash chips don’t even support this.

Infallible, so if the ID cannot be read, return a fixed value (0xEE), also as per pico-sdk.

Functions§

uid
Get this device’s unique 64-bit ID.
uid_hex
Get this device’s unique 64-bit ID as a string of 16 hexadecimal ASCII digits.
uid_hex_bytes
Get this device’s unique 64-bit ID, encoded into 16 hexadecimal ASCII bytes.