Post Go back to editing

Variable in L2 SRAM will be reseted to zero after calling adi_rcu_ControlSystemReset() even though the variable are allocated in "no_init" L2 region

Category: Software
Product Number: ADSP-21593
Software Version: CCES


I used "#pragma section("seg_l2_noinit_data", NO_INIT)" to allocate variable to "no_init" L2 SRAM, but it has still been reset to zero after calling adi_rcu_ControlSystemReset()  API,

How do I fix this, since I want to keep the variable value unchanged after the system software reset? 

Thansk, and looking forward your reply.

Thread Notes

  • Hi,

    Using the NO_INIT qualifier should only affect download speeds where the data being downloaded consists of large, statically defined buffers/arrays. If the
    arrays/variable are being declared dynamically, it will have no effect.

    If the system reset is done , the variable returns to idle state, signifying the completion of the reset process. It will reset all system units except the RTC module and RCU_BCODE, RCU_CRCTL and RCU_STAT registers. For more information, please refer to the topic "Reset Control Unit (RCU)" in the ADSP-2159x Sharc+ Processor HRM linked below.

    If this is not helpful, please explain your query in detail with sample snippet to reproduce the scenario. This would be helpful for us to assist you further.

    Waiting for your reply.

    Best Regards,

  • Hi santha.vijay

    Thanks for the reply. actually I want to shared informations between SSL(bootloader) and application, and I use adi_rcu_ControlSystemReset()  API to swtich between running SSL or applications,

    If this is not suitable for my case, is there another way to make that happen?

Reply Children
  • Hi Jay Lee,

    Apologies for the delay in response.

    When linking an executable file that contains large uninitialized variables, use the NO_INIT or ZERO_INIT section qualifier to reduce the file size. The NO_INIT qualifier directs the linker to omit data for that section from the output file.

    No data initialization is used for NO_INIT memory section. The purpose of NO_INIT and NOMEMINIT are different.

    The Memory Initialization process is enabled by default and optionally bypassed by setting RCU_BCODE.NOMEMINIT.


    Setting RCU_BCODE bit 4 (NOMEMINIT) avoids the writing of the rom space and leaves us with the L2 Memory space not initialized.

    Set the bit RCU_BCODE.NOMEMINIT in your application before issuing a reset.

    Note: The variable can be declared as global in the L2 memory section but should not be defined while using NOMEMINIT.

    Please let us know if you need any further assistance.