Index: trunk/firmware/App/CubeMX/Appli/Core/Src/main.c
===================================================================
--- trunk/firmware/App/CubeMX/Appli/Core/Src/main.c	(revision 22)
+++ trunk/firmware/App/CubeMX/Appli/Core/Src/main.c	(revision 23)
@@ -48,4 +48,5 @@
 
 /* Private function prototypes -----------------------------------------------*/
+static void MPU_Config(void);
 /* USER CODE BEGIN PFP */
 
@@ -66,5 +67,19 @@
   /* USER CODE BEGIN 1 */
 
+  /* System clock already configured, simply SystemCoreClock init */
+  SystemCoreClockUpdate();
+
   /* USER CODE END 1 */
+
+  /* MPU Configuration--------------------------------------------------------*/
+  MPU_Config();
+
+  /* Enable the CPU Cache */
+
+  /* Enable I-Cache---------------------------------------------------------*/
+  SCB_EnableICache();
+
+  /* Enable D-Cache---------------------------------------------------------*/
+  SCB_EnableDCache();
 
   /* MCU Configuration--------------------------------------------------------*/
@@ -100,4 +115,44 @@
 /* USER CODE END 4 */
 
+ /* MPU Configuration */
+
+void MPU_Config(void)
+{
+  MPU_Region_InitTypeDef MPU_InitStruct = {0};
+  MPU_Attributes_InitTypeDef MPU_AttributesInit = {0};
+  uint32_t primask_bit = __get_PRIMASK();
+  __disable_irq();
+
+  /* Disables the MPU */
+  HAL_MPU_Disable();
+
+  /** Initializes and configures the Region 0 and the memory to be protected
+  */
+  MPU_InitStruct.Enable = MPU_REGION_ENABLE;
+  MPU_InitStruct.Number = MPU_REGION_NUMBER0;
+  MPU_InitStruct.BaseAddress = 0x38000000;
+  MPU_InitStruct.LimitAddress = 0x38000040;
+  MPU_InitStruct.AttributesIndex = MPU_ATTRIBUTES_NUMBER0;
+  MPU_InitStruct.AccessPermission = MPU_REGION_ALL_RW;
+  MPU_InitStruct.DisableExec = MPU_INSTRUCTION_ACCESS_ENABLE;
+  MPU_InitStruct.DisablePrivExec = MPU_PRIV_INSTRUCTION_ACCESS_ENABLE;
+  MPU_InitStruct.IsShareable = MPU_ACCESS_NOT_SHAREABLE;
+
+  HAL_MPU_ConfigRegion(&MPU_InitStruct);
+
+  /** Initializes and configures the Attribute 0 and the memory to be protected
+  */
+  MPU_AttributesInit.Number = MPU_ATTRIBUTES_NUMBER0;
+  MPU_AttributesInit.Attributes = INNER_OUTER(MPU_NOT_CACHEABLE);
+
+  HAL_MPU_ConfigMemoryAttributes(&MPU_AttributesInit);
+  /* Enables the MPU */
+  HAL_MPU_Enable(MPU_HFNMI_PRIVDEF);
+
+  /* Exit critical section to lock the system and avoid any issue around MPU mechanism */
+  __set_PRIMASK(primask_bit);
+
+}
+
 /**
   * @brief  This function is executed in case of error occurrence.
Index: trunk/firmware/App/CubeMX/blto2_App.ioc
===================================================================
--- trunk/firmware/App/CubeMX/blto2_App.ioc	(revision 22)
+++ trunk/firmware/App/CubeMX/blto2_App.ioc	(revision 23)
@@ -7,9 +7,60 @@
 CORTEX_M55_FSBL.CPU_ICache=Enabled
 CORTEX_M55_FSBL.IPParameters=CPU_ICache,CPU_DCache
+CORTEX_M55_S.AccessPermission-Cortex_Memory_Protection_Unit_Region0_Settings=MPU_REGION_ALL_RW
+CORTEX_M55_S.Attributes0=MPU_ATTRIBUTES_NUMBER0
+CORTEX_M55_S.AttributesIndex-Cortex_Memory_Protection_Unit_Region0_Settings=MPU_ATTRIBUTES_NUMBER0
+CORTEX_M55_S.BaseAddress-Cortex_Memory_Protection_Unit_Region0_Settings=0x38000000
+CORTEX_M55_S.CPU_DCache=Enabled
+CORTEX_M55_S.CPU_ICache=Enabled
+CORTEX_M55_S.Enable-Cortex_Memory_Protection_Unit_Region0_Settings=MPU_REGION_ENABLE
+CORTEX_M55_S.IPParameters=CPU_ICache,CPU_DCache,MPU_Control,Enable-Cortex_Memory_Protection_Unit_Region0_Settings,AttributesIndex-Cortex_Memory_Protection_Unit_Region0_Settings,Attributes0,BaseAddress-Cortex_Memory_Protection_Unit_Region0_Settings,LimitAddress-Cortex_Memory_Protection_Unit_Region0_Settings,AccessPermission-Cortex_Memory_Protection_Unit_Region0_Settings
+CORTEX_M55_S.LimitAddress-Cortex_Memory_Protection_Unit_Region0_Settings=0x38000040
+CORTEX_M55_S.MPU_Control=MPU_HFNMI_PRIVDEF
 ExtMemLoader.IPs=EXTMEM_LOADER,EXTMEM_MANAGER,RCC\:I,GPIO
-FSBL.IPs=CORTEX_M55_FSBL,GPDMA1\:I,HDP,HPDMA1\:I,LINKEDLIST,RCC,GPIO\:I,NVIC\:I
+FSBL.IPs=CORTEX_M55_FSBL,GPDMA1\:I,HDP,HPDMA1\:I,LINKEDLIST,RCC,GPIO\:I,NVIC\:I,MEMORYMAP
 File.Version=6
 GPIO.groupedBy=
 KeepUserPlacement=false
+MMTAppReg1.MEMORYMAP.AppRegionName=RAM
+MMTAppReg1.MEMORYMAP.ContextName=FSBL
+MMTAppReg1.MEMORYMAP.CoreName=ARM Cortex-M55
+MMTAppReg1.MEMORYMAP.DefaultDataRegion=true
+MMTAppReg1.MEMORYMAP.IPParameters=StartAddress,Size,CoreName,DefaultDataRegion,ContextName,Name
+MMTAppReg1.MEMORYMAP.Name=RAM
+MMTAppReg1.MEMORYMAP.Size=262144
+MMTAppReg1.MEMORYMAP.StartAddress=0x341C0000
+MMTAppReg2.MEMORYMAP.AppRegionName=FLASH
+MMTAppReg2.MEMORYMAP.ContextName=FSBL
+MMTAppReg2.MEMORYMAP.CoreName=ARM Cortex-M55
+MMTAppReg2.MEMORYMAP.DefaultCodeRegion=true
+MMTAppReg2.MEMORYMAP.DefaultDataRegion=false
+MMTAppReg2.MEMORYMAP.IPParameters=StartAddress,Size,CoreName,DefaultDataRegion,ContextName,Name,DefaultCodeRegion,ISRRegion,RootBootRegion
+MMTAppReg2.MEMORYMAP.ISRRegion=true
+MMTAppReg2.MEMORYMAP.Name=FLASH
+MMTAppReg2.MEMORYMAP.RootBootRegion=true
+MMTAppReg2.MEMORYMAP.Size=261120
+MMTAppReg2.MEMORYMAP.StartAddress=0x34180400
+MMTAppReg3.MEMORYMAP.AppRegionName=RAM
+MMTAppReg3.MEMORYMAP.ContextName=Appli
+MMTAppReg3.MEMORYMAP.CoreName=ARM Cortex-M55
+MMTAppReg3.MEMORYMAP.DefaultDataRegion=true
+MMTAppReg3.MEMORYMAP.IPParameters=StartAddress,Size,CoreName,DefaultDataRegion,ContextName,Name
+MMTAppReg3.MEMORYMAP.Name=RAM
+MMTAppReg3.MEMORYMAP.Size=1572864
+MMTAppReg3.MEMORYMAP.StartAddress=0x34080000
+MMTAppReg4.MEMORYMAP.AppRegionName=FLASH
+MMTAppReg4.MEMORYMAP.ContextName=Appli
+MMTAppReg4.MEMORYMAP.CoreName=ARM Cortex-M55
+MMTAppReg4.MEMORYMAP.DefaultCodeRegion=true
+MMTAppReg4.MEMORYMAP.DefaultDataRegion=false
+MMTAppReg4.MEMORYMAP.IPParameters=StartAddress,Size,CoreName,DefaultDataRegion,ContextName,Name,DefaultCodeRegion,ISRRegion,RootBootRegion
+MMTAppReg4.MEMORYMAP.ISRRegion=true
+MMTAppReg4.MEMORYMAP.Name=FLASH
+MMTAppReg4.MEMORYMAP.RootBootRegion=true
+MMTAppReg4.MEMORYMAP.Size=523264
+MMTAppReg4.MEMORYMAP.StartAddress=0x34000400
+MMTAppRegionsCount=4
+MMTConfigApplied=false
+MMTSectionSuffix=
 Mcu.CPN=STM32N657X0H3Q
 Mcu.Context0=FSBL
@@ -21,13 +72,15 @@
 Mcu.IP0=CORTEX_M55_FSBL
 Mcu.IP1=CORTEX_M55_S
-Mcu.IP2=NVIC1
-Mcu.IP3=NVIC
-Mcu.IP4=RCC
-Mcu.IP5=RIF
-Mcu.IPNb=6
+Mcu.IP2=MEMORYMAP
+Mcu.IP3=NVIC1
+Mcu.IP4=NVIC
+Mcu.IP5=RCC
+Mcu.IP6=RIF
+Mcu.IPNb=7
 Mcu.Name=STM32N657X0HxQ
 Mcu.Package=VFBGA264
 Mcu.Pin0=VP_RIF_VS_RIF1
-Mcu.PinsNb=1
+Mcu.Pin1=VP_MEMORYMAP_VS_MEMORYMAP
+Mcu.PinsNb=2
 Mcu.ThirdPartyNb=0
 Mcu.UserConstants=
@@ -108,5 +161,5 @@
 ProjectManager.UAScriptBeforePath=
 ProjectManager.UnderRoot=false
-ProjectManager.functionlistsort=1-SystemClock_Config-RCC-false-HAL-false-FSBL,1-SystemIsolation_Config-RIF-false-HAL-true-Appli,0-MX_CORTEX_M55_FSBL_Init-CORTEX_M55_FSBL-false-HAL-true-FSBL,0-MX_CORTEX_M55_S_Init-CORTEX_M55_S-false-HAL-true-Appli
+ProjectManager.functionlistsort=1-SystemClock_Config-RCC-true-HAL-false-FSBL,2-MX_GPIO_Init-GPIO-false-HAL-true-FSBL,1-MX_GPIO_Init-GPIO-false-HAL-true-Appli,2-SystemIsolation_Config-RIF-false-HAL-true-Appli,0-MX_CORTEX_M55_FSBL_Init-CORTEX_M55_FSBL-false-HAL-true-FSBL,0-MX_CORTEX_M55_S_Init-CORTEX_M55_S-false-HAL-true-Appli,1-MX_GPIO_Init-GPIO-false-HAL-true-ExtMemLoader
 RCC.ADC12Freq_Value=200000000
 RCC.ADFFreq_Value=200000000
@@ -774,4 +827,6 @@
 RIF.VENC_CID_RIMU=0
 RIF.default_config=false
+VP_MEMORYMAP_VS_MEMORYMAP.Mode=CurAppReg
+VP_MEMORYMAP_VS_MEMORYMAP.Signal=MEMORYMAP_VS_MEMORYMAP
 VP_RIF_VS_RIF1.Mode=RISUP
 VP_RIF_VS_RIF1.Signal=RIF_VS_RIF1
Index: trunk/firmware/App/SES/blto2_App.emProject
===================================================================
--- trunk/firmware/App/SES/blto2_App.emProject	(revision 23)
+++ trunk/firmware/App/SES/blto2_App.emProject	(revision 23)
@@ -0,0 +1,91 @@
+<!DOCTYPE CrossStudio_Project_File>
+<solution Name="blto2_App" target="8" version="2">
+  <configuration
+    Name="Debug"
+    c_preprocessor_definitions="DEBUG"
+    gcc_debugging_level="Level 3"
+    gcc_omit_frame_pointer="Yes"
+    gcc_optimization_level="None" />
+  <configuration Name="Production" />
+  <configuration
+    Name="Release"
+    c_preprocessor_definitions="NDEBUG"
+    gcc_debugging_level="Level 2"
+    gcc_omit_frame_pointer="Yes"
+    gcc_optimization_level="Level 2 balanced"
+    link_dedupe_code="Yes" />
+  <project Name="blto2_App">
+    <configuration
+      LIBRARY_IO_TYPE="RTT"
+      Name="Common"
+      Target="STM32N657X0HxQ"
+      arm_architecture="v8.1M_Mainline"
+      arm_compiler_variant="SEGGER"
+      arm_core_type="Cortex-M55"
+      arm_endian="Little"
+      arm_fp_abi="Hard"
+      arm_fpu_type="FPv5-D16"
+      arm_library_optimization="Fast"
+      arm_linker_heap_size="64"
+      arm_linker_process_stack_size="0"
+      arm_linker_stack_size="8192"
+      arm_linker_variant="SEGGER"
+      arm_simulator_memory_simulation_parameter="RAM;0x10000000;0x00040000;RAM;0x30000000;0x00040000;RAM;0x34000000;0x00064000;RAM;0x34200000;0x00070000;RAM;0x34270000;0x00070000;RAM;0x342E0000;0x00070000;RAM;0x34350000;0x00070000;RAM;0x38000000;0x00004000;RAM;0x38004000;0x00004000;RAM;0x3C000000;0x00002000"
+      arm_target_device_name="STM32N657X0"
+      arm_target_interface_type="SWD"
+      arm_v8M_has_cmse="Yes"
+      batch_build_configurations="Debug;Production;Release"
+      build_intermediate_directory="Output/$(Configuration)/Obj"
+      c_preprocessor_definitions="STM32N657xx;__SET_STACK_LIMITS=1;__STM32N657_SUBFAMILY;__STM32N6XX_FAMILY;USE_HAL_DRIVER"
+      c_user_include_directories="./../CubeMX/Appli/Core/Inc;./../CubeMX/Secure_nsclib;./../CubeMX/Drivers/STM32N6xx_HAL_Driver/Inc;./../CubeMX/Drivers/CMSIS/Device/ST/STM32N6xx/Include;./../CubeMX/Drivers/STM32N6xx_HAL_Driver/Inc/Legacy;./../CubeMX/Drivers/CMSIS/Include"
+      compiler_color_diagnostics="Yes"
+      debug_register_definition_file="$(ProjectDir)/STM32N657_Registers.xml"
+      debug_stack_pointer_start="__stack_end__"
+      debug_start_from_entry_point_symbol="Yes"
+      debug_target_connection="J-Link"
+      gcc_all_warnings="Enable"
+      gcc_c_language_standard="c23"
+      gcc_entry_point="Reset_Handler"
+      gcc_wchar_size="32-Bit"
+      link_linker_script_file="$(ProjectDir)/STM32N6xx_RAM.icf"
+      link_map_file="Full"
+      link_map_file_format="HTML"
+      link_time_optimization="Yes"
+      linker_memory_map_file="$(ProjectDir)/STM32N657X0HxQ_MemoryMap.xml"
+      linker_output_format="bin"
+      linker_printf_fmt_level="long long"
+      linker_printf_fp_enabled="Float"
+      linker_printf_width_precision_supported="Yes"
+      macros="DeviceVectorsFile=$(PackagesDir)/STM32N6xx/Source/stm32n657xx_Vectors.s;DeviceFamily=STM32N6xx;DeviceSubFamily=STM32N657;Target=STM32N657X0HxQ"
+      project_directory=""
+      project_type="Executable"
+      target_reset_script="Reset();" />
+    <folder Name="Script Files">
+      <file file_name="STM32N6xx/Scripts/STM32N6xx_Target.js">
+        <configuration Name="Common" file_type="Reset Script" />
+      </file>
+    </folder>
+    <folder Name="Source Files">
+      <configuration Name="Common" filter="c;cpp;cxx;cc;h;s;asm;inc" />
+      <folder
+        Name="Core"
+        exclude="syscalls.c;sysmem.c"
+        filter="*.c;*.h"
+        path="../CubeMX/Appli/Core"
+        recurse="Yes" />
+      <folder
+        Name="HAL"
+        exclude=""
+        filter="*.c;*.h"
+        path="../CubeMX/Drivers/STM32N6xx_HAL_Driver"
+        recurse="Yes" />
+    </folder>
+    <folder Name="System Files">
+      <file file_name="SEGGER_THUMB_Startup.s" />
+      <file file_name="STM32N6xx/Source/stm32n657xx_Vectors.s">
+        <configuration Name="Common" file_type="Assembly" />
+      </file>
+      <file file_name="STM32N6xx/Source/STM32N6xx_Startup.s" />
+    </folder>
+  </project>
+</solution>
Index: trunk/firmware/App/SES/blto_App.emProject
===================================================================
--- trunk/firmware/App/SES/blto_App.emProject	(revision 22)
+++ 	(revision )
@@ -1,91 +1,0 @@
-<!DOCTYPE CrossStudio_Project_File>
-<solution Name="blto_App" target="8" version="2">
-  <configuration
-    Name="Debug"
-    c_preprocessor_definitions="DEBUG"
-    gcc_debugging_level="Level 3"
-    gcc_omit_frame_pointer="Yes"
-    gcc_optimization_level="None" />
-  <configuration Name="Production" />
-  <configuration
-    Name="Release"
-    c_preprocessor_definitions="NDEBUG"
-    gcc_debugging_level="Level 2"
-    gcc_omit_frame_pointer="Yes"
-    gcc_optimization_level="Level 2 balanced"
-    link_dedupe_code="Yes" />
-  <project Name="blto_App">
-    <configuration
-      LIBRARY_IO_TYPE="RTT"
-      Name="Common"
-      Target="STM32N657X0HxQ"
-      arm_architecture="v8.1M_Mainline"
-      arm_compiler_variant="SEGGER"
-      arm_core_type="Cortex-M55"
-      arm_endian="Little"
-      arm_fp_abi="Hard"
-      arm_fpu_type="FPv5-D16"
-      arm_library_optimization="Fast"
-      arm_linker_heap_size="64"
-      arm_linker_process_stack_size="0"
-      arm_linker_stack_size="8192"
-      arm_linker_variant="SEGGER"
-      arm_simulator_memory_simulation_parameter="RAM;0x10000000;0x00040000;RAM;0x30000000;0x00040000;RAM;0x34000000;0x00064000;RAM;0x34200000;0x00070000;RAM;0x34270000;0x00070000;RAM;0x342E0000;0x00070000;RAM;0x34350000;0x00070000;RAM;0x38000000;0x00004000;RAM;0x38004000;0x00004000;RAM;0x3C000000;0x00002000"
-      arm_target_device_name="STM32N657X0"
-      arm_target_interface_type="SWD"
-      arm_v8M_has_cmse="Yes"
-      batch_build_configurations="Debug;Production;Release"
-      build_intermediate_directory="Output/$(Configuration)/Obj"
-      c_preprocessor_definitions="STM32N657xx;__SET_STACK_LIMITS=1;__STM32N657_SUBFAMILY;__STM32N6XX_FAMILY;USE_HAL_DRIVER"
-      c_user_include_directories="./../CubeMX/Appli/Core/Inc;./../CubeMX/Secure_nsclib;./../CubeMX/Drivers/STM32N6xx_HAL_Driver/Inc;./../CubeMX/Drivers/CMSIS/Device/ST/STM32N6xx/Include;./../CubeMX/Drivers/STM32N6xx_HAL_Driver/Inc/Legacy;./../CubeMX/Drivers/CMSIS/Include"
-      compiler_color_diagnostics="Yes"
-      debug_register_definition_file="$(ProjectDir)/STM32N657_Registers.xml"
-      debug_stack_pointer_start="__stack_end__"
-      debug_start_from_entry_point_symbol="Yes"
-      debug_target_connection="J-Link"
-      gcc_all_warnings="Enable"
-      gcc_c_language_standard="c23"
-      gcc_entry_point="Reset_Handler"
-      gcc_wchar_size="32-Bit"
-      link_linker_script_file="$(ProjectDir)/STM32N6xx_RAM.icf"
-      link_map_file="Full"
-      link_map_file_format="HTML"
-      link_time_optimization="Yes"
-      linker_memory_map_file="$(ProjectDir)/STM32N657X0HxQ_MemoryMap.xml"
-      linker_output_format="bin"
-      linker_printf_fmt_level="long long"
-      linker_printf_fp_enabled="Float"
-      linker_printf_width_precision_supported="Yes"
-      macros="DeviceVectorsFile=$(PackagesDir)/STM32N6xx/Source/stm32n657xx_Vectors.s;DeviceFamily=STM32N6xx;DeviceSubFamily=STM32N657;Target=STM32N657X0HxQ"
-      project_directory=""
-      project_type="Executable"
-      target_reset_script="Reset();" />
-    <folder Name="Script Files">
-      <file file_name="STM32N6xx/Scripts/STM32N6xx_Target.js">
-        <configuration Name="Common" file_type="Reset Script" />
-      </file>
-    </folder>
-    <folder Name="Source Files">
-      <configuration Name="Common" filter="c;cpp;cxx;cc;h;s;asm;inc" />
-      <folder
-        Name="Core"
-        exclude="syscalls.c;sysmem.c"
-        filter="*.c;*.h"
-        path="../CubeMX/Appli/Core"
-        recurse="Yes" />
-      <folder
-        Name="HAL"
-        exclude=""
-        filter="*.c;*.h"
-        path="../CubeMX/Drivers/STM32N6xx_HAL_Driver"
-        recurse="Yes" />
-    </folder>
-    <folder Name="System Files">
-      <file file_name="SEGGER_THUMB_Startup.s" />
-      <file file_name="STM32N6xx/Source/stm32n657xx_Vectors.s">
-        <configuration Name="Common" file_type="Assembly" />
-      </file>
-      <file file_name="STM32N6xx/Source/STM32N6xx_Startup.s" />
-    </folder>
-  </project>
-</solution>
