getting same unique ID for different controllers
Hi everyone, can anyone pls help me with the problem, i'm trying to read the unique ID of the stm32U585 controller, i'm able to read the ID with HAL functions, but im getting the same output for all the three different controller with different systems,
here is the code,
uid[0] = HAL_GetUIDw0();
uid[1] = HAL_GetUIDw1();
uid[2] = HAL_GetUIDw2();
// Convert unique ID to byte array
uid_buffer[0] = (uid[0] >> 24) & 0xFF;
uid_buffer[1] = (uid[0] >> 16) & 0xFF;
uid_buffer[2] = (uid[0] >> 8) & 0xFF;
uid_buffer[3] = uid[0] & 0xFF;
uid_buffer[4] = (uid[1] >> 24) & 0xFF;
uid_buffer[5] = (uid[1] >> 16) & 0xFF;
uid_buffer[6] = (uid[1] >> 8) & 0xFF;
uid_buffer[7] = uid[1] & 0xFF;
uid_buffer[8] = (uid[2] >> 24) & 0xFF;
uid_buffer[9] = (uid[2] >> 16) & 0xFF;
uid_buffer[10] = (uid[2] >> 8) & 0xFF;
uid_buffer[11] = uid[2] & 0xFF;
//snprintf((char*)uid_buffer, sizeof(uid_buffer), "\n\r %08X%08X%08X \n\r", uid[2], uid[1], uid[0]);
// Transmit the unique ID over UART
transmit_uart(uid_buffer, sizeof(uid_buffer));
output:
with extracting via three buffers 20353339575
extracting with individaul buffer from 0 to 11 $WRP 539