pmu_control_cldo1_sleep_bypass(TURN_OFF);\r
#endif\r
chip_get_tempe();\r
+\r
+ uapi_ulp_systick_soc_calibration();\r
}
\ No newline at end of file
return g_clock_ulp;
}
+uint32_t uapi_ulp_systick_get_frequency(void)
+{
+ return g_clock_ulp;
+}
+
uint64_t uapi_ulp_systick_get_ms(void)
{
uint64_t count = 0;
* @brief RC32K clock calibration. Do not call this API when the clock is in use.
*/
uint32_t uapi_ulp_systick_soc_calibration(void);
+
+uint32_t uapi_ulp_systick_get_frequency(void);
+
/**
* @}
*/
cnt_h = hal_calendar_get_cnt_h();\r
counter = (cnt_h << HAL_CLC_H_OFFSET) | cnt_l;\r
timeout = ((uapi_ulp_systick_get_count() - counter) * (MS_PER_S * CALIBRATION_CLOCK_MUL)) /\r
- uapi_ulp_systick_soc_calibration();\r
+ uapi_ulp_systick_get_frequency();\r
timestamp = ((data_h << HAL_CLC_H_OFFSET) | data_l) + timeout;\r
\r
/* get时补偿刷新 */\r
void restore_time(void)
{
- uapi_ulp_systick_soc_calibration();
calendar_t date;
uapi_calendar_get_datetime(&date);
print_time(&date);