
Memory Types and Attributes for Efficient Code Execution
Explore the different memory types such as normal, strongly ordered, and device memory, and their attributes like shareability, cacheability, bufferability, and more. Learn how these memory types impact code execution efficiency on microcontrollers.
Download Presentation

Please find below an Image/Link to download the presentation.
The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author. If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.
You are allowed to download the files provided on this website for personal or commercial use, subject to the condition that they are used lawfully. All files are the property of their respective owners.
The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author.
E N D
Presentation Transcript
MEMORY TYPES MEMORY TYPES and and ATTRIBUTES ATTRIBUTES
MEMORY TYPES in CORTEX M7 NORMAL MEMORY DEVICE MEMORY STRONGLY ORDERED MEMORY
Normal memory is good for code execution It allows the speculative access No speculative access in strongly ordered and device memories CPU waits for the end of instruction before performing another one Each write needs to be visible for device, eg- external NAND Device memory is used for microcontroller Registers
ATTRIBUTES SHAREABILITY CACHEABILITY BUFFERABLILITY EXECUTABLE NEVER (XN)
SHAREABLE REGION Shareable Region means multiple masters can access the memory For example, CPU and DMA accessing some region Strongly ordered memory is always shareable If some area Is cacheable and shareable, Data cache can t be used Instruction cache can be used though
EXAMPLE for SHAREABLE REGION Ethernet DMA Descriptors for Tx and Rx 256 Bytes of shareable region
CACHEABLE REGION Where the cache can be used, i.e. instruction and data cache Should be disabled for synchronisation between 2 masters Will see more during the Cache policies
Example for Disabling Cache Rx Buffer is at 0x20010000 DMA tries to copy data to RX Buffer Disable Cacheability for data synchronisation
BUFFERABLE REGION Instruction execution may continue before memory write is done Memory write is then finished from a buffer
EXECUTABLE NEVER (XN) Should be set where the instructions are not supposed to be executed from If the instruction is executed from XN region, it causes hardfault Speculative instruction fetch can be blocked
Prevent Speculative access QSPI memory range QSPI set as flash Disabled instruction access