Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add UID register to protocol #39

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

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 backward 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

@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

This is now implemented on the RP2040 Harp Core:
AllenNeuralDynamics/harp.core.rp2040#30

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
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
2 participants