RETRAM could be retained in all modes using VBAT in absence of VDD supply.
Note that the Cortex-M4 is seen as a Cortex-A7/Linux coprocessor and cannot boot itself after a reset, SRAMx/RETRAM memories must be loaded by Cortex-A7/Linux side after cold boot.
RETRAM could be used to store code required upon Cortex-M4 wakeup from STANDBY, as it is possible to configure the system to wake-up only M4 (which can than wake up Cortex-A7/Linux later if needed, or go back to STANDBY).
https://wiki.st.com/stm32mpu/wiki/Coprocessor_power_management could give you mode information.
If you want dedicated non-volatile memory for Cortex-M4, depending on your application, external memories could be added using I2C, SPI or QUADSPI peripherals, but still no Cortex-M4 direct boot from it.
In order to give better visibility on the answered topics, please click on 'Best Answer' on the reply which solved your issue or answered your question.Tip of the day: Try Sidekick STM32 AI agent