STM32H563 hard fault when trying to read UID
When I'm trying to read Unique device ID register on Nucleo-H563ZI, either by using HAL_GetUIDw0() or by doing
uint32_t uid1 = *((uint32_t*)0x08FFF800);
hard fault occurs.
When I'm trying to read Unique device ID register on Nucleo-H563ZI, either by using HAL_GetUIDw0() or by doing
uint32_t uid1 = *((uint32_t*)0x08FFF800);
hard fault occurs.
Dear @continuum ,
You can refer to this similar case and also same solution. https://community.st.com/t5/stm32-mcu-products/using-dac-of-nucleo-h503rb/m-p/572203/highlight/true#M217994
Therefore, as mentioned by TDK you need to disable cacheability of this region of Read-Only (RO) for unique ID.
“By default, all the AHB memory range is cacheable. For regions where caching is not practical (OTP, RO), MPU has to be used to disable local cacheability.
STM32H563/H573 and STM32H562 Arm<Sup>®</Sup>-based 32-bit MCUs - Reference manual Page 236
Hope it helps,
STOne-32
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.