Question
Why am I getting a hardfault when attempting to read unique device ID?
When I try to read unique device ID register (96 bits) byte by byte I get a hardfault. I can however read it in word by word.
In the reference manual is specified :
"The 96-bit unique device identifier can also be read in single bytes/half-words/words in
different ways and then be concatenated using a custom algorithm."
Does anyone know the reason why it can't be read in single bytes?
I am using STM32H7A3 chip.
Sample code :
uint8_t first_byte = (*((uint8_t*) UID_BASE)); // UID_BASE is 0x08FFF800. This cause a hardfault
uint32_t first_word = (*((uint32_t*) UID_BASE)); // This works fineThanks