2023-12-12 10:51 AM
I'm using a Nucleo-H563ZI in non-secure mode.
When I access the FLASHSIZE_BASE address:
#define FLASHSIZE_BASE (0x08FFF80CUL) /*!< Flash size data register base address */
I get a hard fault (16 or 32 bit access).
In the debugger the memory dump at address 0x08FFF80C only shows question marks.
Is there anything special to access the flash size data register for the H5 family?
Solved! Go to Solution.
2023-12-12 10:58 AM - edited 2023-12-12 11:10 AM
mmhmm..
void MPU_Config(void)
{
HAL_MPU_Disable();
// configure the MPU to prohibit access to after the .bss
// this will trigger an exception if the stack grows to large
MPU_Region_InitTypeDef MPU_InitStruct;
MPU_InitStruct.Enable = MPU_REGION_ENABLE;
MPU_InitStruct.Number = MPU_REGION_NUMBER0;
MPU_InitStruct.BaseAddress = 0x08fff800;
MPU_InitStruct.LimitAddress = 0x08fff900;
MPU_InitStruct.AttributesIndex = MPU_ATTRIBUTES_NUMBER0;
MPU_InitStruct.AccessPermission = MPU_REGION_ALL_RO;
MPU_InitStruct.DisableExec = MPU_INSTRUCTION_ACCESS_DISABLE;
MPU_InitStruct.IsShareable = MPU_ACCESS_OUTER_SHAREABLE;
HAL_MPU_ConfigRegion(&MPU_InitStruct);
HAL_MPU_Enable(MPU_PRIVILEGED_DEFAULT);
}
* USER CODE END 0 *
from a post today...
https://community.st.com/t5/stm32-mcus-products/stm32h573-read-otp/m-p/618689#M229775
+
now you can connect to your H563 ?
2023-12-12 10:58 AM - edited 2023-12-12 11:10 AM
mmhmm..
void MPU_Config(void)
{
HAL_MPU_Disable();
// configure the MPU to prohibit access to after the .bss
// this will trigger an exception if the stack grows to large
MPU_Region_InitTypeDef MPU_InitStruct;
MPU_InitStruct.Enable = MPU_REGION_ENABLE;
MPU_InitStruct.Number = MPU_REGION_NUMBER0;
MPU_InitStruct.BaseAddress = 0x08fff800;
MPU_InitStruct.LimitAddress = 0x08fff900;
MPU_InitStruct.AttributesIndex = MPU_ATTRIBUTES_NUMBER0;
MPU_InitStruct.AccessPermission = MPU_REGION_ALL_RO;
MPU_InitStruct.DisableExec = MPU_INSTRUCTION_ACCESS_DISABLE;
MPU_InitStruct.IsShareable = MPU_ACCESS_OUTER_SHAREABLE;
HAL_MPU_ConfigRegion(&MPU_InitStruct);
HAL_MPU_Enable(MPU_PRIVILEGED_DEFAULT);
}
* USER CODE END 0 *
from a post today...
https://community.st.com/t5/stm32-mcus-products/stm32h573-read-otp/m-p/618689#M229775
+
now you can connect to your H563 ?
2023-12-20 03:11 AM
Thank you, this does the trick.
However it's strange, so I asked for clarification, to no avail so far...