In function LL_MPU_ConfigRegion() from stm32l0xx_ll_cortex.h the following line:
WRITE_REG(MPU->RASR, (MPU_RASR_ENABLE_Msk | Attributes | SubRegionDisable << MPU_RASR_SRD_Pos));
should be fixed with:
WRITE_REG(MPU->RASR, (MPU_RASR_ENABLE_Msk | Attributes | (SubRegionDisable << MPU_RASR_SRD_Pos)));
which is the correct implementation already present in other STM32 MCU HAL drivers.
In function
LL_MPU_ConfigRegion()
fromstm32l0xx_ll_cortex.h
the following line:WRITE_REG(MPU->RASR, (MPU_RASR_ENABLE_Msk | Attributes | SubRegionDisable << MPU_RASR_SRD_Pos));
should be fixed with:
WRITE_REG(MPU->RASR, (MPU_RASR_ENABLE_Msk | Attributes | (SubRegionDisable << MPU_RASR_SRD_Pos)));
which is the correct implementation already present in other STM32 MCU HAL drivers.