Hi Orhan
My FRDM-KL46Z board (super-set of, and compatible with KL36) has a 16MHz oscillator so I couldn't test the case on this but instead I tested on the FRDM-KL43Z. This doesn't have the same clock module but the board has a 32kHz crystal and the oscillator/RTC part is the same:

I run the CPU from the IRC48M and use the system oscillator as 32kHz exclusively for the RTC.
My results are the same as yours.
As long as OSC_CR is set to 0xa0 (oscillator enabled and OSCERCLK runs in stop mode) the RTC will continue counting in low power modes (VLLS1 for example). As soon as OSC_CR is changed to 0x80 (enabled but OSCERCLK stops in low power modes) the RTC freezes when in the low power state.
The exception is VLLS0, where the RTC always freezes, irrespective of the OSC_CR value: this is expected since it is stated so in the user's manual.
Therefore my conclusion is, based on your reports with the KL36 and my tests with the KL43, is that the RTC freezes when OSCERCLK is stopped in STOP modes (including VLLS1) which is not expected according to the block diagram. The block diagram suggests that the RTC can continue to run from OSC32KCLK when OSCERCLK is stopped but this seems not to be the case when controlled by the OSC directly.
HOWEVER if the RTC_CR is configured to control the OSC via its OSCE bit (CLKO can also be set to 1 so that it doesn't supply the clock to other peripherals) OSC_CR can be left at 0.
Now the RTC continues counting in VLLS1.
I don't have a multi-meter with me at the moment (being on holiday with just a few basic boards to work with) so I can't confirm that the current is lower like this than the OSC_CR = 0xa0 setup. But you can try the same with your KL36 board (it has the same RTC registers) so see whether it does represent a way to stop the maximum internal peripheral clocks while allowing RTC operation in VLLS1 (and various other low power modes).
That is, try OSC_CR = 0; and RTC_CR = 0x300; instead of OSC_CR = 0xa0; and see whether it gives you better low current performance or not!
Good luck!
Regards
Mark
Complete Kinetis solutions for professional needs, training and support: http://www.utasker.com/kinetis.html
Kinetis KL25, KL26, KL27, KL28, KL43, KL46, KL82
- http://http://www.utasker.com/kinetis/FRDM-KL25Z.html
- http://www.utasker.com/kinetis/TWR-KL25Z48M.html
- http://www.utasker.com/kinetis/FRDM-KL26Z.html
- http://www.utasker.com/kinetis/TEENSY_LC.html
- http://www.utasker.com/kinetis/FRDM-KL27Z.html
- http://www.utasker.com/kinetis/Capuccino-KL27.html
- http://www.utasker.com/kinetis/FRDM-KL28Z.html
- http://www.utasker.com/kinetis/FRDM-KL43Z.html
- http://www.utasker.com/kinetis/TWR-KL43Z48M.html
- http://www.utasker.com/kinetis/FRDM-KL46Z.html
- http://www.utasker.com/kinetis/TWR-KL46Z48M.html
- http://www.utasker.com/kinetis/FRDM-KL82Z.html
uTasker: supporting >1'000 registered Kinetis users get products faster and cheaper to market
Request Free emergency remote desk-top consulting at http://www.utasker.com/services.html
Open Source version at https://github.com/uTasker/uTasker-Kinetis