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

UUID not populating correctly from Winbond Flash #44

Open
Poofjunior opened this issue Feb 11, 2025 · 2 comments
Open

UUID not populating correctly from Winbond Flash #44

Poofjunior opened this issue Feb 11, 2025 · 2 comments

Comments

@Poofjunior
Copy link
Collaborator

We might have the wrong library function call. The right call may be:

    uint8_t arr[8];
    flash_get_unique_id(arr);
    // pico_unique_board_id_t unique_id;
    // pico_get_unique_board_id(&unique_id);
    memcpy((void*)(&regs.R_UUID[8]), (void*)&arr, sizeof(arr));
 
@Poofjunior
Copy link
Collaborator Author

It looks like there is a sub-issue here related to the pico-sdk:
raspberrypi/pico-sdk#2291

It appears that the unique id, as printed to the usb device descriptors, is printed as big-endian. If we read the data and output the data as little-endian (which is consistent with how the board reads the device from the Winbond flash), we would get a little-endian result that disagrees with the iSerial usb descriptor field.

@Poofjunior Poofjunior changed the title UUID not populating from Winbond Flash UUID not populating correctly from Winbond Flash Feb 18, 2025
@Poofjunior
Copy link
Collaborator Author

It appears that this works in some devices (harp.device.white-rabbit) but not others (harp.device.environment-sensor), even when both are using the same version of the pico sdk and Harp core. Here's a screenshot of the register dump across a working device (top) and not-working device (bottom)

Image

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

No branches or pull requests

1 participant