External memory Manager: Introduction to External memory Manager

Revision as of 15:09, 25 June 2024 by Registered User (typo)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

1. External Memory Manager

1.1. Introduction

The External Memory Manager module has been implemented to assist in the development of ROMLess applications, but of course it can also be used on other platforms. It is an STM32 middleware providing two services:

  • A unique API to access all types of memory.
  • A BOOT system to launch an application stored on an external memory.

1.2. External Memory Manager Driver

The External Memory Manager provides a unique interface for all supported memories. It is the driver part that is responsible for adapting the request to the context of the physical memory as well as the hardware used. Depending on the type of memory, it is possible that certain services may not make sense or may not be of interest. In this case, the APIs will return an error code EXTMEM_ERROR_NOTSUPPORTED.

API name Description Parameters
EXTMEM_Init This function manages the memory uninitialization uint32_t MemId : Memory ID

uint32_t ClockInput : clock value apply on the HW link used by the memory

EXTMEM_DeInit This function manages the memory uninitialization uint32_t MemId : Memory ID.
EXTMEM_Read This function manages the memory reading uint32_t MemId : Memory ID

uint32_t Address uint8_t* Data uint32_t Size

EXTMEM_Write This function manages the memory writing uint32_t MemId : Memory ID

uint32_t Address const uint8_t* Data uint32_t Size

EXTMEM_WriteInMappedMode This function manage the memory writting in mapped mode uint32_t MemId : Memory ID

uint32_t Address : const uint8_t* Data : uint32_t Size :

EXTMEM_EraseSector This function manage the memory sector erase uint32_t MemId : Memory ID

uint32_t Address uint32_t Size

EXTMEM_EraseAll This function perform the complete erase of the memory uint32_t MemId : Memory ID
EXTMEM_GetInfo This function manage the memory uninitialization uint32_t MemId : Memory ID

void *Info :

EXTMEM_MemoryMappedMode This function enables/disable the map mode uint32_t MemId : Memory ID

EXTMEM_StateTypeDef State :

EXTMEM_GetMapAddress This function returns the map address of the memory uint32_t MemId : Memory ID

uint32_t *BaseAddress : returned value containing the map address

1.3. Supported memories

External memory manager is designed to support a variety of memory types, including:

  • NOR_SFDP (Serial Flash Discovery Protocol)
  • PSRAM
  • SDCARD

1.4. Boot Manager

The role of the BOOT is to start the execution of the application and it supports two modes :

  • XIP  : eXecute In Place the application is executed from the external memory.
  • LRUN : Load and RUN the application is loaded from an external memory into internal or external memory and runs from that memory.

The service is available through a single BOOT_Application API. The service can be called only after initializing the memories.


1.4.1. XIP Process

  • The XiP process is based on code execution directly from the external non-volatile memory that is used for code storage. This execution model requires memory-mapped support to grant the CPU with direct access to the executed-code user application.

XIP.png

1.4.2. LRUN Process

  • Load and run is a process where an application is loaded into internal memory and then executed. In this process, the application code is first loaded into RAM. Once the code is loaded into RAM, the processor can execute it.

LRUN.png


No categories assignedEdit