cancel
Showing results for 
Search instead for 
Did you mean: 

Processing the large size file and storing it into QSPI directly

BG.3
Associate III

Hi there!

I am using STM32F413ZH based custom board, Also having Wi-Fi Module along with 32MB×2 QSPI. Wi-Fi module is connected with MCU over UART3 in interrupt mode. I am looking into transfer a 1MB file from a server to QSPI. 

Especially I will be getting complete 1MB file from server at a instant. So please help me to transfer that file directly to QSPI. How to do that?

1 ACCEPTED SOLUTION

Accepted Solutions
Pavel A.
Evangelist II

@BG.3 Processing a 1MB file is possible (very few things are really impossible). But due to UART throughput it is more likely that receive of 1 MB will take some time. You can test and measure it. Yes, the data will come in pieces.

Yes, overflow can happen if your board designer has not routed the hardware flow control pins (RTS/CTS) from the wi-fi module so the host cannot pause the incoming data.

Maybe you refer to the situation when your wi-fi module receives the file in background, and stores it in its internal flash. If so, you will ask it to send you the data in pieces, and overflow is not possible (don't ask to send more than you have room for). Hope it's clear now. 

 

View solution in original post

6 REPLIES 6
Pavel A.
Evangelist II

Well, you receive the data over the wi-fi into the internal RAM (why not?), then copy to the QSPI flash. For which step of this you need help?

Especially I will be getting complete 1MB file from server at a instant

Hardly so. More likely, it will come in smaller pieces.

TDK
Guru

> Wi-Fi module is connected with MCU over UART3 in interrupt mode.

UART seems like a bad choice for a WIFI connection. Even at high baud rates, it'll take seconds for the file to come on. Plenty of time to transfer the pieces to QSPI, I suppose.

If you feel a post has answered your question, please click "Accept as Solution".

Hi Pavel,

Thanks for your response. Do you mean that processing complete 1MB file is impossible? and should be coming in as chunks? or basically it will be received as pieces. Please explain clearly.

When receiving the file buffer overflow or RAM overflow may happen right?

BG.3
Associate III

Hello!

Thanks for the information. 

 

Pavel A.
Evangelist II

@BG.3 Processing a 1MB file is possible (very few things are really impossible). But due to UART throughput it is more likely that receive of 1 MB will take some time. You can test and measure it. Yes, the data will come in pieces.

Yes, overflow can happen if your board designer has not routed the hardware flow control pins (RTS/CTS) from the wi-fi module so the host cannot pause the incoming data.

Maybe you refer to the situation when your wi-fi module receives the file in background, and stores it in its internal flash. If so, you will ask it to send you the data in pieces, and overflow is not possible (don't ask to send more than you have room for). Hope it's clear now. 

 

Suggest you start by getting your BSP code erasing and writing the QSPI. You can only do 256 bytes at a time, 512 byte if the devices are paired. Erase typically 4KB minimum on most single devices. 

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..