1. Introduction¶
1.1. Overview¶
The DA14585/586 product has a maximum 96 KB of SysRAM. The source of the SysRAM memory content is usually:
- An executable program that is copied by following the OTP-mirroring OR external Flash-content-copying process, This whole operation might take place after either a system power up or a system wake up procedure is finished.
- A set of BLE (Bluetooth Low Energy) global data such that the values are retained when the system goes to extended sleep.
Since the power consumption in extended sleep mode is dominated by the current drawn by the retained RAM cells the user can consider reducing the memory size for application that do not require the full 96KB of memory.
This tutorial show the concept and provides guidelines step by step How to squeeze down the RAM size to 32KB and 48KB.
Note
- Retention RAM is the part of the memory that retains its content during Extended sleep mode (without OTP copy)
- In Extended sleep mode the full memory which include code and retention data will be retained.
- In Deep sleep nothing is retained (all RAM blocks off).
Refer to Section 7 of UM-B-079 Software Platform Reference for further details.
See also
- For each supported product listed below DA14585 and DA14586, please refer to the following documents available from support web site DA14585 Datasheet and DA14586 Datasheet
1.2. RAM Mapping¶
The complete RAM mapping of the DA14585/586 is shown in Figure 1
- SysRAM1 (Block 1): 0x07FC0000 to 0x07FC7FFF
- SysRAM2 (Block 2): 0x07FC8000 to 0x07FCBFFF
- SysRAM3 (Block 3): 0x07FCC000 to 0x07FCFFFF
- SysRAM4 (Block 4): 0x07FD0000 to 0x07FD7FFF
Note
- The 4 banks are retained independently and configurable in the extended sleep mode. Each one can be selected to be retained or not.
- The 4th RAM block (32KB) is always retained since it contains the ROM data. The ROM data contains the Bluetooth Stack and Boot ROM code.
Warning
The memory map of the DA14585/586 is totally different from the DA14580. For more details please refer to the DA14585/586 SDK 6 Porting Guide
1.3. Memory Size¶
In KEIL MDK-ARM , the memory size of your application can be known after compiling the whole project.
Note
In this example we took the project: projects\target_apps\ble_examples\prox_reporter
Figure 2 KEIL Compilation using SDK6.0.8 for DA14585/586
- Total code size = 23090 Bytes
- Read Only memory size : 2830 Bytes
- Read Write memory size : 4 Bytes
- Zero-Initialization size : 8840 Bytes
- Total RAM size = Read Write memory size + Zero-Initialization size = 4 + 8840 = 8844 bytes
- Total ROM size = Code size + Read Only memory size + Read Write memory size = 23090 + 2830 + 4 = 25924 bytes
1.4. RAM layout¶
The figures below show the 64KB and 96KB RAM layout when main is executed:
Note
- 1KB = 1024 Bytes
- Code is loaded from Block 1 to Block 4 in a top-down approach and the booting address of the SysRAM is located 0x07C0000