Hi anoop.radhakrishnan.nair.007@gmail.com,
I have just tested the non-sdk example on an S32K146 EVB.
The code already enables RTC_CLK on PTD13.
I added CLKOUT (LPO) on PTD10 (PCR_MUX = ALT6, SIM_CHIPCTL = 6, SIM_CHIPCTL_CLKOUTEN = 1).
This is what I got:

129.2 kHz / 4 = 32.300 kHz
(1 / 32.3 kHz) * 32.768 = 1.014s
The LPO clock in this case is well out of the compensation range 32,641; 32,896 (32,768 - TCR, where TCR == 127 to -128).
Therefore, I cannot get exactly 1s with the compensation, although setting it to 32,641 would help.
The SDK 0.8.6 is outdated.
Please use up-to-date RTM version.
You can enable RTCCLKOUT and CLKOUT (LPO) in the SDK as well.


I found that there is one issue with the SDK.
Please load the project and halt the execution before the CLOCK DRV INIT function and read the PMC_LPOTRIM register. It should show the factory trimmed value.

Once the SDK CLOCK driver is initialized, it will change the TRIM value to the one configured in PE.

The non-SDK example does not do that, it uses the default TRIM value.
So, change the PE value to the factory trimmed value (0x1D in my case).
Hope it helps,
BR, Daniel