2025-02-14 10:32 AM
Hello,
I am using a STM32H733VGT on a custom design board. On a fresh project in CubeMX, I tried to activate data cache but the autogenerated code crashes at SCB_EnableDCache(); . (nothing has been activated on the CubeMX, just the external crystal and debugging port)
i tried enabling or disabling MPU as well, same results.
I need data cache for activating ethernet.
Any help would be highly appreciated.
2025-02-14 10:35 AM - edited 2025-02-14 10:39 AM
Hello,
Are you sure you've generated a project for STM32H733 and not another MCU device?
Is that possible to share your ioc file?
2025-02-14 10:39 AM
2025-02-14 10:50 AM
Could you please replace the MPU config like the following?:
void MPU_Config(void)
{
MPU_Region_InitTypeDef MPU_InitStruct = {0};
/* Disables the MPU */
HAL_MPU_Disable();
/** Initializes and configures the Region and the memory to be protected
*/
MPU_InitStruct.Enable = MPU_REGION_ENABLE;
MPU_InitStruct.Number = MPU_REGION_NUMBER0;
MPU_InitStruct.BaseAddress = 0x0;
MPU_InitStruct.Size = MPU_REGION_SIZE_4GB;
MPU_InitStruct.SubRegionDisable = 0x87;
MPU_InitStruct.TypeExtField = MPU_TEX_LEVEL0;
MPU_InitStruct.AccessPermission = MPU_REGION_NO_ACCESS;
MPU_InitStruct.DisableExec = MPU_INSTRUCTION_ACCESS_DISABLE;
MPU_InitStruct.IsShareable = MPU_ACCESS_SHAREABLE;
MPU_InitStruct.IsCacheable = MPU_ACCESS_NOT_CACHEABLE;
MPU_InitStruct.IsBufferable = MPU_ACCESS_NOT_BUFFERABLE;
HAL_MPU_ConfigRegion(&MPU_InitStruct);
/* Enables the MPU */
HAL_MPU_Enable(MPU_PRIVILEGED_DEFAULT);
}
2025-02-14 11:00 AM
Hi,
tried that, no difference, it stuck in the activation function of data cache.
Would you explain me what are suspicious about?
Thanks a lot for you help
2025-02-14 11:12 AM
I don't see an issue for the moment and I don't have that device for the moment to test.. I'll get back to you when I test it.
2025-02-14 11:23 AM
Thanks a lot for that.
BTW, is it necessary to enable Dcache to activate ethernet for this MCU?
2025-02-14 11:30 AM
The cache is enabled to enhance the performance of all the application, not only for ethernet.