Skip to content

Conversation

@bruno-f-cruz
Copy link
Member

@bruno-f-cruz bruno-f-cruz commented Feb 29, 2024

Summary

This PR adds a new register to the protocol called UID.

Motivation

We currently use a single U16 value to keep track of the serial numbers of devices. This is a rather small number and hardly future proof. Adhering on a pre-existing standard would make the implementation much more generic. For instance, it would allow one to co-opt pico's chip serial number (64bit) into this register.

Detailed Design

For the sake of backwards compatibility, we will add a new register instead of modifying the current R_SERIAL_NUMBER.
A new register will be added with the following specs:

Name: UID
Address: 16
Format: U8[16]
Access: Read-only

A deprecation warning was also added to the protocol regarding register R_SERIAL_NUMBER. For now, this register will duplicate the first two bytes of R_UID. On the next major release, the R_SERIAL_NUMBER will likely be removed and only R_UID supported.

Design Meetings

See further discussion in the following issues:

Copy link
Contributor

@Poofjunior Poofjunior left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good assuming it can be done without affecting R_DEVICE_NAME.

@bruno-f-cruz
Copy link
Member Author

bruno-f-cruz commented Apr 18, 2024

Use the address name UID instead of UUID
Suggest that the unique-ness of the ID should be unique within device type (i.e. whoami) but not necessarily across device types. This way people don't have to worry about clashes across devicetypes

@Poofjunior
Copy link
Contributor

This is now implemented on the RP2040 Harp Core:
harp-tech/core.pico#30

@bruno-f-cruz bruno-f-cruz changed the title Add UUID register to protocol Add UID register to protocol Jul 23, 2024
@bruno-f-cruz
Copy link
Member Author

bruno-f-cruz commented Dec 19, 2024

@glopesdev glopesdev mentioned this pull request Jan 2, 2025
@bruno-f-cruz bruno-f-cruz requested a review from glopesdev January 6, 2025 04:53
@bruno-f-cruz bruno-f-cruz force-pushed the 31-increase-the-size-of-the-r_serial_number-to-match-128bit-uuid branch from 2dfe54a to 538e55d Compare January 9, 2025 20:22
@bruno-f-cruz bruno-f-cruz reopened this Jan 9, 2025
@bruno-f-cruz bruno-f-cruz force-pushed the 31-increase-the-size-of-the-r_serial_number-to-match-128bit-uuid branch from 2dfe54a to 292aa85 Compare January 9, 2025 20:31
@glopesdev glopesdev force-pushed the 31-increase-the-size-of-the-r_serial_number-to-match-128bit-uuid branch from 7dca69a to 4d34194 Compare January 9, 2025 20:49
@bruno-f-cruz bruno-f-cruz force-pushed the 31-increase-the-size-of-the-r_serial_number-to-match-128bit-uuid branch from 4d34194 to 7dca69a Compare January 9, 2025 20:50
@glopesdev glopesdev force-pushed the 31-increase-the-size-of-the-r_serial_number-to-match-128bit-uuid branch from 7dca69a to edcc857 Compare January 9, 2025 20:53
@glopesdev glopesdev force-pushed the 31-increase-the-size-of-the-r_serial_number-to-match-128bit-uuid branch from edcc857 to ad81e22 Compare January 9, 2025 20:58
@glopesdev glopesdev added the feature New planned feature label Jan 9, 2025
@glopesdev glopesdev self-requested a review January 9, 2025 21:01
@glopesdev glopesdev merged commit 5b0a25a into main Jan 9, 2025
@glopesdev glopesdev deleted the 31-increase-the-size-of-the-r_serial_number-to-match-128bit-uuid branch January 9, 2025 21:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New planned feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Increase the size of the R_SERIAL_NUMBER to match 128bit UUID

4 participants