BF512: Hibernation and SRAM


     BF512 is connected to SRAM 1M by EBIU. For SPI slave mode boot (BMODE = 100), the BF512 is consuming boot data from an external SPI host device (STM32). SPI0 is configured as an SPI slave device. 

     After power on, BF512 boot (BMODE = 100) from STM32. When boot finished, the boot mode is changed to From external SRAM (BMODE=001).The rest of the time, BF512  enter in hibernation and restart from external SRAM per second.

     I  have succeed in entering the hibernate mode (with the bFrom_SysControl function) and exiting it (with the RTC), but the  program is not relaunched.

    My questions:

    1 How to write the initialization code.

    2 How to restart BF512 from hibernate and relaunched successful.

Thanks and regards!