I took the function init_flash_memory() from one of the SDK2.0 examples for the FRDM-KL03 kit.
I have this function called in the initialization. In my design, the MCU sleeps in VLLS3 and wakes up and reads a line, does something based on that and sleeps again in VLLS3.
I was trying to pofile the code. I noticed that init_flash_memory() takes 127ms to execute and in that time, I miss the signal on the line that I want to capture.
Any idea on why it takes so long and how I can avoid it?