在使用FIFO增强功能的时候,配置SCI FIFO接收或发送中断时,发现一个问题,对于接收中断,手册上的说法如下:
TXFFIL4-0 Transmit FIFO interrupt level bits.
The transmit FIFO generates an interrupt whenever the FIFO statusbits (TXFFST4-0) are less than or equal to the FIFO level bits(TXFFIL4-0). The maximum value that can be assigned to these bits
to generate an interrupt cannot be more than the depth of the TXFIFO. The default value of these bits after reset is 00000b. Usersshould set TXFFIL to best fit their application needs by weighingbetween the CPU overhead to service the ISR and the best possibleusage of SCI bus bandwidth.
我理解为当FIFO TXFFST发送状态寄存器的数小于或等于深度TXFFIL的值时,会产生中断,那如果把TXFFIL的值设为16,此时状态寄存器的值必然小于或等于16,岂不是一直会产生中断,那何时会停止产生中断?而且在启用FIFO模式时,向SCITXBUF写入字符,字符会一个字节一个字节的传输到SCI-TXFIFO,从而TXFFST发送状态寄存器的数增加,但仍然小于TXFFIL的值,此时也会产生中断?如果把TXFFIL的值设为0,是不是可以理解为当数据完全发送出去后,才会产生中断。