cancel
Showing results for 
Search instead for 
Did you mean: 

STM32H733 data cache initialization issue

amirshn
Associate III

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.

7 REPLIES 7
SofLit
ST Employee

Hello,

Are you sure you've generated a project for STM32H733 and not another MCU device?

Is that possible to share your ioc file?

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.
PS:
1 - This is NOT an online support (https://ols.st.com) but a collaborative space.
2 - Please be polite in your reply. Otherwise, it will be reported as inappropriate and you will be permanently blacklisted from my help.

Hi 
I think so , here is my ioc file:

Thanks

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);

}

 

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.
PS:
1 - This is NOT an online support (https://ols.st.com) but a collaborative space.
2 - Please be polite in your reply. Otherwise, it will be reported as inappropriate and you will be permanently blacklisted from my help.

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

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.

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.
PS:
1 - This is NOT an online support (https://ols.st.com) but a collaborative space.
2 - Please be polite in your reply. Otherwise, it will be reported as inappropriate and you will be permanently blacklisted from my help.

Thanks a lot for that.

BTW, is it necessary to enable Dcache to activate ethernet for this MCU?

The cache is enabled to enhance the performance of all the application, not only for ethernet.

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.
PS:
1 - This is NOT an online support (https://ols.st.com) but a collaborative space.
2 - Please be polite in your reply. Otherwise, it will be reported as inappropriate and you will be permanently blacklisted from my help.