Hi,Thanks for the reply. I never noticed the lag in the room temperature. And i don't know the exact amount of lag, When i installed my logger in the Site where the temperature varies 16 - 40C. When i see the logger after 6 months some of them lags one day and some of them lags 1 month. The component details are as follows. Please suggest me if calibration of crystal frequency is needed or any other possible solution.

The crystal has a load capacitance of 12.5pF so assuming you have 18pf on both ends and allowing for parasitic capacitance that looks about right. The frequency is designed for 25C and will change at higher and lower temperatures (temperature coefficient) but not by as much as you're seeing!

Either your oscillator is sometimes stopping then restarting or it's sometimes running very slow. I expect power supply or PCB problems to be the cause. Are your PCBs washed? Contamination often sits under surface mount packages. Alternatively are they conformally coated? Do you have condensation on the PCBs sometimes?

Several of the STM32 family allow you to measure the LSI/LSE against a timer, which can be clocked by an accurate HSE (crystal or source). You should also be able to push several internal clocks out via the MCO (PA8) pin. Pretty sure the L1 series gives you access to LSI and LSE