DA14683: Turn off FLASH in Cached Mode

I am working on a Bluetooth Low Energy (BLE) project with a custom board running a DA14683 MCU.
The VDD1V8 rail on the DA14683 powers the FLASH and an additional MCU.
Every once in a while I have to turn off the VDD1V8 rail of the DA14683 to shut down the additional MCU to save energy.
Because the DA14683 is running in cached mode, the program will stop working when the FLASH is turned off.

The DA14683 datasheet mentions a mirror mode.
On the basis of the description from the datasheet, the mirror mode would allow me to load my program from FLASH and run the program from RAM.
Unfortunately the SDK does not support the mirror mode, when the program code location is set to FLASH.
The compilation process will abort with an error "sdk/bsp/config/bsp_memory_layout.h:140:18: error: #error "QSPI mirrored mode is not supported!"", when I set the code location to FLASH and the execution mode to mirror mode.

Is it possible with the SDK 1.0.14.1081 to load the program from FLASH into RAM during startup or runtime and start executing the program from RAM for a BLE project?

Parents
  • Hi Klara,

    Regarding the issue that SDK 1.0.14 does not support mirrored mode from Flash:
    Yes SDK 1.0.14 does not support mirrored mode from Flash.
    Please check the Screenshot below:

    With:
    __RETAINED_CODE --> You can Retain Code
    __RETAINED --> You can Retain zero-initialized Data
    __RETAINED_RW--> You can Retain non-zero initialized Data
    You can mark your code (each function separately) with __RETAINED_CODE, then the linker will go and give this address on the RAM address space and inside system_init we will copy this code into RAM.
    All you have to do is use the preprocessor macro on your functions.
    Please try and share the results.

    Kind Regards,
    OV_Renesas


Reply
  • Hi Klara,

    Regarding the issue that SDK 1.0.14 does not support mirrored mode from Flash:
    Yes SDK 1.0.14 does not support mirrored mode from Flash.
    Please check the Screenshot below:

    With:
    __RETAINED_CODE --> You can Retain Code
    __RETAINED --> You can Retain zero-initialized Data
    __RETAINED_RW--> You can Retain non-zero initialized Data
    You can mark your code (each function separately) with __RETAINED_CODE, then the linker will go and give this address on the RAM address space and inside system_init we will copy this code into RAM.
    All you have to do is use the preprocessor macro on your functions.
    Please try and share the results.

    Kind Regards,
    OV_Renesas


Children
No Data