void PIT_Cfg(void)
{
PIT_InitTypeDef PIT_InitStruct;
PIT_InitStruct.CHANNELx = PIT_CHANNEL0;
PIT_InitStruct.PIT_Mode = PIT_Mode_ms;
PIT_InitStruct.Timer = 1000;
PIT_Init(&PIT_InitStruct);
PIT_ITConfig(PIT_CHANNEL0,ENABLE);
PIT_ClearFlag(PIT_CHANNEL0);
PIT_Cmd(PIT_CHANNEL0,ENABLE);
NVIC_Init(PIT_CH0_IRQn,1);
}
|