2024-03-26 06:02 AM
Hi,
I need to receive approximately 300kb size text file through UART interrupt mode in Nucleo H7 board. But only 65535 bytes are received. i used HAL_UART_Receive_IT for this.
2024-03-26 06:15 AM
This is because the size argument of HAL_UART_Receive_IT is 16-bit
Receiving 300 KB of data in one HAL_UART_Receive_IT call is unusual. This is why no one else noticed this limitation ))
2024-03-26 11:34 PM
Is there any other methods to send the text files completely using UART interrupt
2024-03-27 09:46 AM
You can use XMODEM (or YMODEM or ZMODEM) protocols to break the file into smaller manageable chunks. ST has example ymodem code (a very minimal implementation) in some of their app notes. Search st.com for "ymodem" to find them. Or any of the open source versions.
If you can't do that you best bet is to use circular DMA to continuously receive data and then poll the receive buffer to pull out data as it comes in. @Tilen MAJERLE has code for this on his github site https://github.com/MaJerle/stm32-usart-uart-dma-rx-tx
2024-03-27 03:18 PM
What is sending this text file? What are you doing with this text file? Are you saving it all to RAM or to external memory?