完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
STM32F407ZET6的片子,采用DMA进行串口发送,DMA部分相关固定配置如下: 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错误中断。何解???? |
|
相关推荐
6个回答
|
|
|
|
|
|
|
|
|
|
|
|
先签到下
|
|
|
|
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). |
|
|
|
在配置完DMA之后,再使能串口触发DMA发送 该问题即可解决 每次DMA发送之侯,下次发送之前 关闭一下 串口触发DMA发送,使能DMA之后再将使能打开
|
|
|
|
你正在撰写答案
如果你是对答案或其他答案精选点评或询问,请使用“评论”功能。
1107 浏览 0 评论
AD7686芯片不传输数据给STM32,但是手按住就会有数据。
1055 浏览 2 评论
2159 浏览 0 评论
如何解决MPU-9250与STM32通讯时,出现HAL_ERROR = 0x01U
1253 浏览 1 评论
hal库中i2c卡死在HAL_I2C_Master_Transmit
1678 浏览 1 评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-11-25 09:03 , Processed in 0.908390 second(s), Total 84, Slave 67 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号