最近在研究051的uart库,,发现一个问题
Bit 5 RXNEIE: RXNE interrupt enable
This bit is set and cleared by software.
0: Interrupt is inhibited
1: A USART interrupt is generated whenever ORE=1 or RXNE=1 in the USARTx_ISR
register
其中ORE产生的中断使用USART_GetITStatus()函数时有问题,因为函数查询了这个
Bit 0 EIE: Error interrupt enable
Error Interrupt Enable Bit is required to enable interrupt generation in case of a framing
error, overrun error or noise flag (FE=1 or ORE=1 or NF=1 in the USARTx_ISR register).
0: Interrupt is inhibited
1: An interrupt is generated when FE=1 or ORE=1 or NF=1 in the USARTx_ISR register.
所以一直返回的没有出发,,我的想法是使用USART_GetFlagStatus()函数来解决。。
问题主要是:ORE标志可以由两个中断使能位来控制中断。。 |