/* This function is used to stop calculating & return elapsed time.  */
u32 tls_watchdog_stop_cal_elapsed_time(void)
/* This function is used to stop calculating & return elapsed time.  */
u32 tls_watchdog_stop_cal_elapsed_time(void)
{
#define RT_TIME_BASE (40)
	u32 val = 0;
	switch (wdg_jumpclear_flag)
	{
		case 1:
		{
			val = (tls_reg_read32(HR_WDG_LOAD_VALUE) - tls_reg_read32(HR_WDG_CUR_VALUE))/RT_TIME_BASE;
			__tls_watchdog_deinit();
			__tls_watchdog_init(wdg_value_us);
			wdg_jumpclear_flag = 0;
		}
		break;
		case 2:
		{
			val = (tls_reg_read32(HR_WDG_LOAD_VALUE) - tls_reg_read32(HR_WDG_CUR_VALUE))/RT_TIME_BASE;
			__tls_watchdog_deinit();
			wdg_jumpclear_flag = 0;
		}
		break;
		default:
			wdg_jumpclear_flag = 0;
			break;
	}
	return val;}