// Set the clock division :No division
TIM1->CR1.CKD = 3;
//Set the auto-reload preload :TIMx_ARR register is buffered
TIM1->CR1.ARPE = 1;
//Set the Autoreload value :10000(Arr)
TIM1->CNT.CNT = 0;
TIM1->ARR.ARR = 10000;
// Set the Prescaler value :7199 (CK_CNT = CK_PSC /( PSC[15:0]+1))
TIM1->PSC.PSC = 7199;
// Set the Repetition Counter value :0,is no repetition
TIM1->RCR.REP = 0;
//Generate an update event to reload the Prescaler and the repetition counter (only for advanced timer) value immediately :UG
TIM1->EGR.UG = 1;
//ClockSourceConfig:internal clock-CK_INT
//Reset the SMS, TS, ECE, ETPS and ETRF bits:0
TIM1->SMCR.SMS = 0;
TIM1->SMCR.TS = 0;
TIM1->SMCR.ECE = 0;
TIM1->SMCR.ETPS = 0;
TIM1->SMCR.ETF = 0;
// Select the TRGO source and Set master mode :0
TIM1->CR2.MMS = 0;
TIM1->SMCR.MSM = 0;