xil-se / xildebug_sw

XilDebug is a CMSIS-DAP compliant debugger, UART bridge and power profiler all in one package.
5 stars 1 forks source link

Add some good stuff #82

Closed kbeckmann closed 6 years ago

kbeckmann commented 6 years ago

Closes #81

kbeckmann commented 6 years ago

Is the stuff good enough?

kbeckmann commented 6 years ago

Added platform.c/h in order to have a portable platform_delay_us() that we can implement on any platform.

I had to implement it because when we've hit a hardfault, our systick doesn't fire anymore, and I needed a delay.

kbeckmann commented 6 years ago

Umm.. My device's serial is 001b005c5246500c. That's a lot of 0s, what could be wrong? Maybe I should use the LSB of the UID instead of the MSB (maybe it's more unique?). Or hash it somehow (perhaps just XOR it all or something)

Seems it's common to add 0 and 2 together, i.e. int_to_hex(HAL_GetDEVID + HAL_GetUIDw1, 8) + int_to_hex(HAL_GetUIDw0, 4)

arturo182 commented 6 years ago

Only parts of the UID are actually unique per device, many others are family and manuf. time based. The whole UID is unique but parts might be not. So yeah, we could xor the words together or something.

kbeckmann commented 6 years ago

Updated the branch, ready to merge (using cherrypick this time please)