STM32 DMA串口发送,FIFO错误中断频繁进

2019-07-14 15:00发布

STM32F407ZET6的片子,采用DMA进行串口发送,DMA部分相关固定配置如下: tica Neue, Helvetica, Arial">        DMA_InitStructure.DMA_BufferSize =  255;//固定要发送的字节长度
        DMA_InitStructure.DMA_PeripheralInc = DMA_PeripheralInc_Disable;
        DMA_InitStructure.DMA_MemoryInc = DMA_MemoryInc_Enable;
        DMA_InitStructure.DMA_PeripheralDataSize = DMA_PeripheralDataSize_Byte;
        DMA_InitStructure.DMA_MemoryDataSize = DMA_MemoryDataSize_Byte;
        DMA_InitStructure.DMA_Mode = DMA_Mode_Normal;
        DMA_InitStructure.DMA_Priority = DMA_Priority_VeryHigh;
        DMA_InitStructure.DMA_FIFOMode = DMA_FIFOMode_Disable;         
        DMA_InitStructure.DMA_FIFOThreshold = DMA_FIFOThreshold_Full;
        DMA_InitStructure.DMA_MemoryBurst = DMA_MemoryBurst_Single;
        DMA_InitStructure.DMA_PeripheralBurst = DMA_PeripheralBurst_Single;
DMA在发送中断中,置完成标志位,下次发送时检查该标志位,发送完成则再次发送。
发送能正常发送,发送完成中断也能正常进,但每次发送时都会先进FIFO错误中断。何解????
友情提示: 此问题已得到解决,问题已经关闭,关闭后问题禁止继续编辑,回答。
该问题目前已经被作者或者管理员关闭, 无法添加新回复
5条回答
xieweibin
1楼-- · 2019-07-14 17:56
楼上的说的对,
既然FIFO都关闭了,
应该把FIFO的中断也关闭吧。
zhe0010
2楼-- · 2019-07-14 19:44
csw_ying
3楼-- · 2019-07-14 21:18
先签到下
60user8
4楼-- · 2019-07-14 23:44
In direct mode, the FIFO error flag can also be set under the following conditions:
• In the peripheral-to-memory mode, the FIFO can be saturated (overrun) if the memory
bus is not granted for several peripheral requests
• In the memory-to-peripheral mode, an underrun condition may occur if the memory bus
has not been granted before a peripheral request occurs
If the TEIFx or the FEIFx flag is set due to incompatibility between burst size and FIFO
threshold level, the faulty stream is automatically disabled through a hardware clear of its
EN bit in the corresponding stream configuration register (DMA_SxCR).
60user8
5楼-- · 2019-07-15 02:16
 精彩回答 2  元偷偷看……

一周热门 更多>