ARMmbed / qspif-blockdevice

DEPRECATED: This repository is deprecated, please use mbed-os-example-blockdevice
5 stars 2 forks source link

[OOB 5.10] Fails to write/read on DISCO_L475VG_IOT01A #15

Closed maclobdell closed 4 years ago

maclobdell commented 6 years ago

To test the quad spi driver, I created an example application and pushed it here: https://github.com/maclobdell/mbed-os-example-quadspi-mpl (master branch).

It uses the latest qspif-blockdevice (#5f9ffe...) and the code snippet at readme on the qspif driver repo.

Compiler Tested: ARM compiler 5. Platform Tested: DISCO_L475VG_IOT01A

When I download and run it, I expect to see "Hello World!" on the terminal.

But, it never shows Hello World.

QSPI SFDP Flash Block Device example
QSPIF BD size: 8388608
QSPIF BD read size: 1
QSPIF BD program size: 1
QSPIF BD erase size (at address 0): 4096

Does this indicate that it failed to write or read the Quad SPI flash?

ciarmcom commented 6 years ago

ARM Internal Ref: IOTSTOR-657

deepikabhavnani commented 6 years ago

Response to Read Manufacturer ID on DISCO_L475VG_IOT01A is "[DBG ][QSPIF]: Vendor device ID = 0xc2 0x28 0x17 0x0"

https://github.com/ARMmbed/qspif-blockdevice/blob/master/QSPIFBlockDevice.cpp#L195

Is this switch applicable for this ST device as well?

deepikabhavnani commented 6 years ago

Log difference between working DISCO_F413ZH and DISCO_L475VG_IOT01A for SFDP DISCO_L475VG_IOT01A :

[INFO][QSPIF]: Init - verified SFDP Signature and version Successfully

[DBG ][QSPIF]: Number of Param Headers: 3

[DBG ][QSPIF]: Found Basic Param Table at Table: 1

[DBG ][QSPIF]: Detected Page Size: 256

[INFO][QSPIF]: Erase Type(A) 1 - Inst: 0xffh, Size: 4096

[INFO][QSPIF]: Erase Type 1 - Inst: 0x20h, Size: 4096

[INFO][QSPIF]: Erase Type(A) 2 - Inst: 0xffh, Size: 32768

[INFO][QSPIF]: Erase Type 2 - Inst: 0x52h, Size: 32768

[INFO][QSPIF]: Erase Type(A) 3 - Inst: 0xffh, Size: 65536

[INFO][QSPIF]: Erase Type 3 - Inst: 0xd8h, Size: 65536

[INFO][QSPIF]: Erase Type(A) 4 - Inst: 0xffh, Size: 1

[INFO][QSPIF]: Erase Type 4 - Inst: 0xffh, Size: 1

[DBG ][QSPIF]: Read Bus Mode set to 1-4-4, Instruction: 0xebh

[INFO][QSPIF]: Init - Setting Quad Enable
**[DBG ][QSPIF]: Setting QE Bit, Bit 6 of Status Reg 1**

[DBG ][QSPIF]: Reading Status Register Success: value = 0x0

[ERR ][QSPIF]: _set_write_enable failed: status value = 0x0 0x0

[ERR ][QSPIF]: Write Enabe failed

[ERR ][QSPIF]: Device supports Quad bus, but Quad Enable Failed

[ERR ][QSPIF]: Init - Parse Basic Param Table Failed

DISCO_F413ZH :

[INFO][QSPIF]: Init - verified SFDP Signature and version Successfully

[DBG ][QSPIF]: Number of Param Headers: 2

[DBG ][QSPIF]: Found Basic Param Table at Table: 1

[DBG ][QSPIF]: Detected Page Size: 256

[INFO][QSPIF]: Erase Type(A) 1 - Inst: 0xffh, Size: 4096

[INFO][QSPIF]: Erase Type 1 - Inst: 0x20h, Size: 4096

[INFO][QSPIF]: Erase Type(A) 2 - Inst: 0xffh, Size: 65536

[INFO][QSPIF]: Erase Type 2 - Inst: 0xd8h, Size: 65536

[INFO][QSPIF]: Erase Type(A) 3 - Inst: 0xffh, Size: 1

[INFO][QSPIF]: Erase Type 3 - Inst: 0xffh, Size: 1

[INFO][QSPIF]: Erase Type(A) 4 - Inst: 0xffh, Size: 1

[INFO][QSPIF]: Erase Type 4 - Inst: 0xffh, Size: 1

[DBG ][QSPIF]: Read Bus Mode set to 4-4-4, Instruction: 0xebh

[INFO][QSPIF]: Init - Setting Quad Enable

[DBG ][QSPIF]: Device Does not Have a QE Bit, continue based on Read Inst

[INFO][QSPIF]: Init - Setting QPI mode
deepikabhavnani commented 6 years ago

Resolved by #18