Question about reducing retained memory during extended sleep?

Learn MoreFAQsTutorials

6 posts / 0 new
Last post
yingfen
Offline
Last seen:1 year 2 months ago
加入:2019-08-07 00:10
Question about reducing retained memory during extended sleep?

Hi,

The chip is 14683. We want to reduce the retained memory during extended sleep to reduce power consumption. I find a demo dk_apps\features\extended_sleep, in which the config file custom_config_qspi.h is like:
#定义dg_configQSPI_CACHED_RAM_SIZE_BB( 64 * 1024)
#define dg_configQSPI_CACHED_RETRAM_0_SIZE_BB ( 24 * 1024)

The total RAM+RETRAM_0<128k and compile successfully. But if we use the same config in our code, it will show an overflow error until we set RETRAM_0=128k-RAM.

And if we disable dg_configOPTIMAL_RETRAM(1), it can compile successfully. But if we enable dg_configOPTIMAL_RETRAM(1) in our code, there will be a new error:
#define dg_configOPTIMAL_RETRAM (1)
#if (dg_configOPTIMAL_RETRAM == 1)
#define dg_configMEM_RETENTION_MODE (0x02)
#define dg_configSHUFFLING_MODE (0x1)
#endif
#定义dg_configQSPI_CACHED_RAM_SIZE_BB( 20 * 1024)
#define dg_configQSPI_CACHED_RETRAM_0_SIZE_BB ( 128 * 1024 - dg_configQSPI_CACHED_RAM_SIZE_BB)

d:/diasemi/smartsnippetsstudio/gcc/4_9-2015q3/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/bin/ld.exe: cannot open linker script file D:\Pro/DA14683-00-Release_QSPI/mem.ld: Invalid argument
collect2.exe: error: ld returned 1 exit status
make: *** [Pro.elf] Error 1

What's the actual setting we need to reduce the retained memory so as to reduce power? For RETRAM_0, is it the RAM will not be used during sleep, or the RAM will be kept during sleep? What's difference between dg_configMEM_RETENTION_MODE and dg_configQSPI_CACHED_RAM_SIZE_BB? I didn't find very clear descriptions in the SDK.

Thanks,

Yingfen

Device:
PM_Dialog
Offline
Last seen:5 hours 15 min ago
Staff
加入:2018-02-08 11:03
Hi yingfen,

Hi yingfen,

感谢你的问题在线和for your inputs. Let me check it and I will let you know shortly.

Thanks, PM_Dialog

PM_Dialog
Offline
Last seen:5 hours 15 min ago
Staff
加入:2018-02-08 11:03
Hi yingfen,

Hi yingfen,

Apologies for the delay. Please take a lookUM-B-044: DA1468x Software Platform Referencedocument from out support website. In figure 83 (page 162), you could find the Retention RAM optimization. If dg_configOPTIMAL_RETRAM macro is defined, then RAM1, RAM2 and RAM3 are retained in sleep. To do so, if you would like to reduce the retained memory, you can “close” the RAM3 block but you will have to check the your variables etc can fit into RAM1 and RAM2 blocks. If not, the RAM3 should be retained.

Thanks, PM_Dialog

yingfen
Offline
Last seen:1 year 2 months ago
加入:2019-08-07 00:10
Hi PM_Dialog,

Hi PM_Dialog,

Thanks for providing the reference. It helps me understand the structure, but I still have some questions about the reference.

1. In P157, right below Table 52, it gives an example, in which 50K RAM needs to be retained. It uses only RAM5 and 2. Why dg_configMEM_RETENTION_MODE is 0x1D(0b1 1101) rather than 0x12(0b1 0010) (only RAM2 and 5)?

2. In Figure 83 the example you provided, it will retain RAM1-3 during sleep, but RAM5, which is required for BLE ROM (P156 above Fig77), is not retained. As it's a BLE optimized project, does it mean the BLE ROM now is stored in RetRAM0 rather than RAM5? The content in the screenshot (all from the same reference between P156-P162) seems to conflict with each other.

https://user-images.githubusercontent.com/32470088/67316033-5c912580-f4c...

Thanks,

Yingfen

PM_Dialog
Offline
Last seen:5 hours 15 min ago
Staff
加入:2018-02-08 11:03
Hi yingfen,

Hi yingfen,

According to the document, the BLE ROM variable will start at 0x07FC0200 address which is in RetRAM2. BLE ROM variable are stored into RAM5 in DA14680/1 devices. In DA14683, RAM5 can be powered down in sleep. There is no issue to use RAM optimization as described in Figure 83 if you are using DA14683.

Thanks, PM_Dialog

Dieter Falk
Offline
Last seen:1 month 3 weeks ago
加入:2019-10-12 10:33
Hello,

Hello,

I am using the DA14683 device on the eval-board with the actual SDK and tools.

It seem that I have a problem with the memory layout, that the compiler tells me to run out of memory, when requiring more then 32 KByte RAM. The following will be show:
App.elf section `RETENTION_RAM0' will not fit in region `RetRAM0'
RetRAM0' overflowed by 32 bytes

The following is my actual configuration (from custom_config_qspi.h)

#define dg_configOPTIMAL_RETRAM (0) #define dg_configMEM_RETENTION_MODE (0x1F) #define dg_configQSPI_CACHED_RAM_SIZE_AE ( 61 * 1024) #define dg_configQSPI_CACHED_RETRAM_0_SIZE_AE ( 67 * 1024) #define dg_configQSPI_CACHED_RAM_SIZE_BB ( 62 * 1024) #define dg_configQSPI_CACHED_RETRAM_0_SIZE_BB ( 66 * 1024)

I used this from an example an I would expect to have at least about 64 KByte RAM.

Even if playing around with the numbers, I could not solve the problem.

What do I have to configure to get the max. RAM size in a BLE application running in QSPI cached mode? I want to have the complete RAM retentioned.

By the way, is it correct to use the following configuration in the project settings:

dg_configBLACK_ORCA_IC_REV=BLACK_ORCA_IC_REV_B dg_configBLACK_ORCA_IC_STEP=BLACK_ORCA_IC_STEP_B

Best regards
Dieter