STM32为什么进入了中断函数还要检查中断标志位啊?void DMA1_Channel6_IRQHandler(void){/* Test on DMA1 Channel6 Transfer Complete interrupt */if(DMA_GetITStatus(DMA1_IT_TC6)){/* Get Current Data Counter value after complete transfer */
来源:学生作业帮助网 编辑:六六作业网 时间:2024/11/29 06:18:21
STM32为什么进入了中断函数还要检查中断标志位啊?void DMA1_Channel6_IRQHandler(void){/* Test on DMA1 Channel6 Transfer Complete interrupt */if(DMA_GetITStatus(DMA1_IT_TC6)){/* Get Current Data Counter value after complete transfer */
STM32为什么进入了中断函数还要检查中断标志位啊?
void DMA1_Channel6_IRQHandler(void)
{
/* Test on DMA1 Channel6 Transfer Complete interrupt */
if(DMA_GetITStatus(DMA1_IT_TC6))
{
/* Get Current Data Counter value after complete transfer */
CurrDataCounterEnd = DMA_GetCurrDataCounter(DMA1_Channel6);
/* Clear DMA1 Channel6 Half Transfer,Transfer Complete and Global interrupt pending bits */
DMA_ClearITPendingBit(DMA1_IT_GL6);
}
}
像这个中断函数,都已经进入中断了,为什么还要用IF判断下啊
STM32为什么进入了中断函数还要检查中断标志位啊?void DMA1_Channel6_IRQHandler(void){/* Test on DMA1 Channel6 Transfer Complete interrupt */if(DMA_GetITStatus(DMA1_IT_TC6)){/* Get Current Data Counter value after complete transfer */
多个中断源共用一个中断入口,因此需要区分究竟是怎么中断的.