AnsweredAssumed Answered

KDS 3.2.0 with SDK 2.1 and VLLS mode

Question asked by Ryssus on Apr 27, 2017
Latest reply on May 3, 2017 by Jorge Antonio Alcala Vazquez

I am currently using KDS 3.2.0 with SDK v2.1.0 for Kinetis KL15z128. As far as I have found, the initialization for my device is placed in startup directory in startup_MKL15Z4. I have found 2 sections in that file:

 

/* Loop to copy data from read only memory to RAM. The ranges
* of copy from/to are specified by following symbols evaluated in
* linker script.
* __etext: End of code section, i.e., begin of data sections to copy from.
* __data_start__/__data_end__: RAM address range that data should be
* copied to. Both must be aligned to 4 bytes boundary. */

this part is used for ROM data in global variables. There is also section for zeroing BSS sector just after that

 

#ifdef __STARTUP_CLEAR_BSS
/* This part of work usually is done in C library startup code. Otherwise,
* define this macro to enable it in this startup.
*
* Loop to zero out BSS section, which uses following symbols
* in linker script:
* __bss_start__: start of BSS section. Must align to 4
* __bss_end__: end of BSS section. Must align to 4
*/

#endif

 

Comment says that defining a macro should disable/enable initialization. 

 

Unfortunately it does not work for me when exiting VLLS3 mode. Af far as I know, in VLLS3 mode RAM is powered and after wakeup all data should be available. I have defined global variable (uninitialized so in BSS sector if I understand correctly) and even though I have __STARTUP_CLEAR_BSS  macro undefined, this variable is being zeroed after wakeup. Maybe I am wrong and someone can help with that? Where is initialization procedure during VLLS3 wakeup, and how to keep RAM values? 

Outcomes