Global variables losing their contents, using Keil and STM32l031k6
Dear Community,
I am encountering a strange behavior, where some of my global variables in main.c file are losing their contents (even when I declare them as static). They show the initial values which are 0. I am using Keil with optimization level O3, I used also level O1 , the problem is still occurring. My MCU is STM32l031k6. I want to know if this is related to optimization issues, has somebody encountered the same problem before? your help will be really appreciated.
Thank you very much
