2024-10-09 11:09 PM
Hi.
Is there any consideration that I need to take care of when I use HAL_GetUIDw0~2 while ICACHE is enabled?
even the simplest project with STM32H573IIK3Q that the ICACHE is enabled will get a hardfault when trying to get UID bytes.
This is the whole code that I have:
/* USER CODE BEGIN WHILE */
while (1)
{
uint32_t x,y,z;
x=HAL_GetUIDw0();
//y=HAL_GetUIDw1();
//z=HAL_GetUIDw2();
HAL_Delay(1000);
/* USER CODE END WHILE */
/* USER CODE BEGIN 3 */
}
/* USER CODE END 3 */
Solved! Go to Solution.
2024-10-10 01:02 AM
see How to obtain and use the STM32 96-bit UID - STMicroelectronics Community , paragraph "2.1 STM32H5 specific issue" : you have to configure an MPU region to remove cache on the UID registers addresses.
2024-10-10 01:02 AM
see How to obtain and use the STM32 96-bit UID - STMicroelectronics Community , paragraph "2.1 STM32H5 specific issue" : you have to configure an MPU region to remove cache on the UID registers addresses.
2024-10-10 02:40 PM
Thanks @guillaume , looks like that solves the problem.