Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
281 views
in Technique[技术] by (71.8m points)

sim800 - STM32 , main loop does fire if receive data quickly using DMA

I am using DMA in circular mode with STM32 sim800c module. i can send/receive AT commands/response without any issue, but getting issue when i tried to download file using AT command, when start receiving data from UART, DMA RxCpltCallback function getting call very quickly and main loop does not getting fired until all data received. once all data received then loop function get fired and then i check response which contain last chunk of file (64 bytes).

how can i handle this situation?

question from:https://stackoverflow.com/questions/65905611/stm32-main-loop-does-fire-if-receive-data-quickly-using-dma

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Increase the size of the DMA buffer. The interrupt will be invoked less frequently. IF your UART speed is really high (about 10Mb) use flow control (CTS/RTS) to control the communication.l


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...