cancel
Showing results for 
Search instead for 
Did you mean: 

S25FL127S QSPI problem with STM32F746

Anton.Mina
Associate II
Posted on August 13, 2016 at 01:07

Hello ST Forum,

I have a problem related to the QSPI with STM32F7xx, details as the following:

I have a STM32F746G-DISCO board, I run on it he code “QSPI_ReadWrite_IT�? found in “STM32Cube_FW_F7_V1.4.0�? the results was so great and I was very happy about it.

I got the STM32F746 (144 pin package), I was not able to buy the QSPI memory “N25Q128A�?found on the DISCO kit so I bought “S25FL127SABMFI101�? from the datasheet it looks the same, same pin order and same memory size and same instructions (but it seems that I’m mistaken)

I run the same example “QSPI_ReadWrite_IT�? on my own board (after modifying the pins in main.h) it didn’t work, the “aRxBuffer�? is filled with “0X99�?

I tried to reduce the clk to the memory by increasing the divider value from to 2 to 20 I found that the few bytes at the end of “aRxBuffer�? are filled with 0XDD, I increased more the divider to 255 I found that only the first few bytes of the “aRxBuffer�? are filled with 0x99 while the rest is filled with 0xDD. (in all cases I got wrong data)

My board has LCD (RGB565), resistive touch controller, RS485 driver, I2C temperature sensor, DC-DC to step down from 12V to 5V, LDO to step from 5V to 3.3V and DC-DC to step up from 5V to 26V for the LCD back light, all other chips are working fine on the board, the display also is showing good performance only the QSPI chip is not working.

I did my entire project based on CubeMX and HAL libraries and my QSPI pin selection is as the following:

 /**QUADSPI GPIO Configuration   

    PF6     ------> QUADSPI_BK1_IO3

    PF7     ------> QUADSPI_BK1_IO2

    PF8     ------> QUADSPI_BK1_IO0

    PF9     ------> QUADSPI_BK1_IO1

    PB2     ------> QUADSPI_CLK

    PB6     ------> QUADSPI_BK1_NCS

    */

I also put a 10K ohm resistor between the NCS pin and the 3.3V.

I need to know what is my mistake? Wrong configuration? Bad timing? Wrong selection of the Chip?

Any help is highly appreciated.

Best regards,

Mina Anton

5 REPLIES 5
Anton.Mina
Associate II
Posted on August 16, 2016 at 10:24

Hello everyone,

I’ve managed to get new parts from different and reliable supplier of (S25FL132K) I thought that changing the manufacturer and supplier may help, I changed the chip on my board with the new one and tested, same results same values, same trials from my side, it’s not working.

I’m going to get crazy, the code is working well on the ST discovery board but not working on my board even if I changed the chip part number, so I guess that the problem is from my board so I checked the board again and again, it’s all correct, so I guess that the problem is in the configuration or setup.

Anyone has experience with QSPI? Please help me to make my chips work.

Thank you.

Mina Anton

Posted on August 16, 2016 at 11:51

I'd start with bit-banging the SPI, first single-data-line, then quad.

JW
Posted on August 16, 2016 at 11:51

I'd start with bit-banging the SPI, first single-data-line, then quad.

JW
Eugene Solo
Senior
Posted on August 24, 2017 at 16:30

*probably* its something with dummy bytes or other phases (like 'alternate bytes') in qspi transaction. Check and double-check and triple-check datasheet (especially timings and recommendations for configuration) and compare it to your code. I had similar issue with reading from N25Q128 - note that READING implies that 1st you send instruction and [probably] address, then bus must switch its direction and then you starting to receive your data.

Faster your bus - more clocks chip needs to switch it's internal circuitry (when you are reading status, you are reading one simple register 'floating on surface', thats why it works really fast; but when you are reading memory array, it need to decode and setup address).

David Littell
Senior III