Hi zhouhui,
Please take a look at this.
Definition_of_RTC_IP_TICKS.png
Maybe the value 0 comes from the fact that you didn't enable RTC in GptHwIp, or RTC conditions are met but calculated value for in used clock still 0.
Please add RTC channel configuration
GpthwIp_RTC.png
After configure GptRtc, please enable channel by tick them in HwConfiguration part.
RTC_ChannelIsUsed.png
Please let me know if have further information.
Thank you,
Nam.