cancel
Showing results for 
Search instead for 
Did you mean: 

STM32H750 CubeIde MPU setting ignored

RRoma.4
Associate II

0693W00000GYIi3QAH.pngHello, I am trying to get Ethernet working, I don't like HAL, switched all is possible to LL library. @Piranha​ Hi, if this is a bug please add to your report if someone try use LL configuring Ethernet.

Platform Linux

CUBEIDE Version: 1.7.0

STM32Cube_FW_H7_V1.9.0

After a lot of odd hard fault I focused again on MPU configuration and I discovered LL CUBEIDE MPU TEX setting got ignored. Is this a bug or am I wrong in some way?

generated code snippet here

/* MPU Configuration */
 
void MPU_Config(void)
{
 
  /* Disables the MPU */
  LL_MPU_Disable();
  /** Initializes and configures the Region and the memory to be protected
  */
  LL_MPU_ConfigRegion(LL_MPU_REGION_NUMBER0, 0x0, 0x030040000, LL_MPU_REGION_SIZE_16KB|LL_MPU_REGION_FULL_ACCESS|LL_MPU_INSTRUCTION_ACCESS_ENABLE|LL_MPU_ACCESS_NOT_SHAREABLE|LL_MPU_ACCESS_NOT_CACHEABLE|LL_MPU_ACCESS_NOT_BUFFERABLE);
  LL_MPU_EnableRegion(LL_MPU_REGION_NUMBER0);
  /** Initializes and configures the Region and the memory to be protected
  */
  LL_MPU_ConfigRegion(LL_MPU_REGION_NUMBER1, 0x0, 0x030044000, LL_MPU_REGION_SIZE_16KB|LL_MPU_REGION_FULL_ACCESS|LL_MPU_INSTRUCTION_ACCESS_ENABLE|LL_MPU_ACCESS_NOT_SHAREABLE|LL_MPU_ACCESS_CACHEABLE|LL_MPU_ACCESS_NOT_BUFFERABLE);
  LL_MPU_EnableRegion(LL_MPU_REGION_NUMBER1);
  /** Initializes and configures the Region and the memory to be protected
  */
  LL_MPU_ConfigRegion(LL_MPU_REGION_NUMBER2, 0x0, 0x030040000, LL_MPU_REGION_SIZE_256B|LL_MPU_REGION_FULL_ACCESS|LL_MPU_INSTRUCTION_ACCESS_ENABLE|LL_MPU_ACCESS_NOT_SHAREABLE|LL_MPU_ACCESS_NOT_CACHEABLE|LL_MPU_ACCESS_BUFFERABLE);
  LL_MPU_EnableRegion(LL_MPU_REGION_NUMBER2);
  /* Enables the MPU */
  LL_MPU_Enable(LL_MPU_CTRL_PRIVILEGED_DEFAULT);
 
}

Must be IMHO

/* MPU Configuration */
 
void MPU_Config(void)
{
 
  /* Disables the MPU */
  LL_MPU_Disable();
  /** Initializes and configures the Region and the memory to be protected
  */
  LL_MPU_ConfigRegion(LL_MPU_REGION_NUMBER0, 0x0, 0x030040000, LL_MPU_TEX_LEVEL1|LL_MPU_REGION_SIZE_16KB|LL_MPU_REGION_FULL_ACCESS|LL_MPU_INSTRUCTION_ACCESS_ENABLE|LL_MPU_ACCESS_NOT_SHAREABLE|LL_MPU_ACCESS_NOT_CACHEABLE|LL_MPU_ACCESS_NOT_BUFFERABLE);
  LL_MPU_EnableRegion(LL_MPU_REGION_NUMBER0);
  /** Initializes and configures the Region and the memory to be protected
  */
  LL_MPU_ConfigRegion(LL_MPU_REGION_NUMBER1, 0x0, 0x030044000, LL_MPU_TEX_LEVEL0|LL_MPU_REGION_SIZE_16KB|LL_MPU_REGION_FULL_ACCESS|LL_MPU_INSTRUCTION_ACCESS_ENABLE|LL_MPU_ACCESS_NOT_SHAREABLE|LL_MPU_ACCESS_CACHEABLE|LL_MPU_ACCESS_NOT_BUFFERABLE);
  LL_MPU_EnableRegion(LL_MPU_REGION_NUMBER1);
  /** Initializes and configures the Region and the memory to be protected
  */
  LL_MPU_ConfigRegion(LL_MPU_REGION_NUMBER2, 0x0, 0x030040000, LL_MPU_TEX_LEVEL0|LL_MPU_REGION_SIZE_256B|LL_MPU_REGION_FULL_ACCESS|LL_MPU_INSTRUCTION_ACCESS_ENABLE|LL_MPU_ACCESS_NOT_SHAREABLE|LL_MPU_ACCESS_NOT_CACHEABLE|LL_MPU_ACCESS_BUFFERABLE);
  LL_MPU_EnableRegion(LL_MPU_REGION_NUMBER2);
  /* Enables the MPU */
  LL_MPU_Enable(LL_MPU_CTRL_PRIVILEGED_DEFAULT);
 
}

Thank anyone try address this issue.

1 REPLY 1
garry lai
Associate II

Why is the MPU setting abnormal when D-Chahe is enabled?err02.jpg