-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
[stm32] use desig_get_unique_id from libopencm3 #1018
Conversation
flixr
commented
Dec 7, 2014
- update libopencm3 so we have desig in F4 lib
- use desig_get_unique_id_as_string from libopencm3 instead of our own function
@podhrmic this seems to work fine for me, would be great if you could cross check. |
@podhrmic would be great if you could test this as well before we merge it... |
Any chance that anyone else can test this? It works fine here, so I guess it is good to merge.. |
I ll look at it later today. |
How does one test it? On 16 December 2014 at 07:31, Michal Podhradsky notifications@github.com
|
@podhrmic Ok, great |
Tested, and I don't think it works: Using this commit:
Using master:
The implementation in libopencm3 looks correct, and you can see that first four bytes (7363433) in desig ID are identical to last four bytes from Or our implementation was always wrong? |
It isn't gabage, just different odering, if you split the string into 3x8 chars (32bit each), reverse the order of the 3 blocks, then swap every char pair again, you get the same number. Actually it seems that our implementation so far doesn't make that much sense... Also since in some STM series the memory location for the id is not contiguous and the function already handles these correcty I would vote for changing it to the loc3 version. |
4b6786e
to
c3f92ed
Compare
Updated to use the latest libopencm3 version that converts the high nibble of the id to hex char first: |
c3f92ed
to
65c5c07
Compare
65c5c07
to
705a7df
Compare
Ah, yeah.. and also updated luftboot to use the libopencm3 function... |