求助,关于ATIM中断的问题
下面是一段ATIM定时例程,这两个函数有什么关联?中断是如何产生?哪位帮忙解读一下void MF_ATIM_TimerBase_Init(void)
{
/*IO CONFIG*/
FL_ATIM_InitTypeDef TimerBaseInitStruct;
TimerBaseInitStruct.clockSource = FL_RCC_ATIM_CLK_SOURCE_APB2CLK;
TimerBaseInitStruct.prescaler = 10-1;
TimerBaseInitStruct.counterMode = FL_ATIM_COUNTER_DIR_UP;
TimerBaseInitStruct.autoReload = 0xFFFFU;
TimerBaseInitStruct.autoReloadState = FL_DISABLE;
TimerBaseInitStruct.clockDivision = FL_ATIM_CLK_DIVISION_DIV1;
TimerBaseInitStruct.repetitionCounter = 0;
FL_ATIM_Init(ATIM,&TimerBaseInitStruct );
FL_ATIM_EnableIT_Update(ATIM );
}
/**
* @briefNVIC Initialization function
* @paramvoid
* @retval None
*/
void MF_NVIC_Init(void)
{
FL_NVIC_ConfigTypeDef InterruptConfigStruct;
InterruptConfigStruct.preemptPriority = 0x00;
FL_NVIC_Init(&InterruptConfigStruct,ATIM_IRQn );
}
MF_ATIM_TimerBase_Init(void) 这个是初始化 Atimer和开Atimer的外设中断
MF_NVIC_Init(void) 这是将Atimer中断 挂靠在ARM0 内核上,完成外设到内核的中断连接
页:
[1]