cancel
Showing results for 
Search instead for 
Did you mean: 

Another question about the QSPI flash on the STM32F746 DISCO

Ehill.16
Senior

I am using the core cycle counter to measure the read and write transfer speed of the QSPI flash memory. I am writing a 128,000 byte array and reading it. I calculate 690,000 B/s to write the flash and about 1.2 MB/s to read it. Does this sound about right. I was expecting faster rates.

2 REPLIES 2

The read does seem rather slow.

On other STM32 platforms I've seen burst read performance get pretty close to the ceiling expected for the clock being used. ie 90 MHz, 45 MBps, etc

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

I am using the BSP_QSPI_Read function to read the flash. Might this have something to do with the speed?

Here is a code snippet. Disregard the comment about 140K bytes, I am actually writing 128K bytes to the flash.

case 2: // if 2 command, read the QSPI Flash memory and send what was read to the USB
				DWT->CYCCNT = 0;
				start = DWT->CYCCNT; // get the core cycle count and store it in start variable
				BSP_QSPI_Read(aDST_Buffer, 0, sizeof(aDST_Buffer));
//				if (aDST_Buffer[0] == 0xFF) // if the aDST_Buffer is empty, the chip was erased
//					CDC_Transmit_FS(rxEmpty sizeof(rxEmpty)); // display text string to acknowledge the QSPI flash was erased
//				else {
//					CDC_Transmit_FS(aDST_Buffer, sizeof(aDST_Buffer)); // data is in the QSPI flash, display it to the USB
//				}
				finish = DWT->CYCCNT; // get the core cycle count and store it in finish variable
				totalmS = (finish - start);	// calculate the time it took in core cycles to send 140KB's
				sprintf(result, " %d B/s ", CalcTransSpeed(TOTALBYTES, CORETICK, totalmS));	// calculate transfer speed in bytes/second
				//CDC_Transmit_FS(result, 20); // send "QSPI Flash written" string to the USB
			    ssd1306_SetCursor(2, 22);
				ssd1306_WriteString("QSPI flash read:", Font_7x10, White);
			    ssd1306_SetCursor(0, 33);
				ssd1306_WriteString(result, Font_7x10, White);
				ssd1306_UpdateScreen();
				button = 0;
				break;