Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
4 years, 12 months ago.
QSPIFBlockDevice : SFPD parsing failed when calling init()
Calling the init function on QSPIBlockDevice results in status -4002 SFDP Parsing failed, unexpected format or values in one of the SFDP tables.
How do I debug this problem? Is there a config that I can do on mbed, or do I need to configure the device ?
From the datasheet the device does contain an SFPD table (page 39)
I can also find references to the model in mbed source files under mbed-os/tests/mbed_hal/qspi/flash_configs The header files should be enabled for my board.
The Quad SPI device is : Micron N25Q128A<br /> The board is : STM32F746NG
include the mbed library with this snippet
QSPIFBlockDevice qspi(PD_11, PD_12, PE_2, PD_13, PB_2, PB_6, 0); int status = qspi.init(); switch (status) { case QSPIF_BD_ERROR_OK: { bd_size_t read_size = qspi.get_read_size(); bd_size_t program_size = qspi.get_program_size(); bd_size_t erase_size = qspi.get_erase_size(); bd_size_t size = qspi.size(); log->info(LOG_QSPI, "QSPI init [%d] read_size: %lld B program_size: %lld B erase_size: %lld B size: %lld B", status, read_size, program_size, erase_size, size); break; } case QSPIF_BD_ERROR_DEVICE_ERROR: log->error(LOG_QSPI, "QSPI init [%d] Device specific error", status); break; case QSPIF_BD_ERROR_PARSING_FAILED: log->error(LOG_QSPI, "QSPI init [%d] SFPD parsing failed", status); break; case QSPIF_BD_ERROR_READY_FAILED: log->error(LOG_QSPI, "QSPI init [%d] Wait for Mem Ready failed", status); break; case QSPIF_BD_ERROR_WREN_FAILED: log->error(LOG_QSPI, "QSPI init [%d] Write Enable Failed", status); break; case QSPIF_BD_ERROR_INVALID_ERASE_PARAMS: log->error(LOG_QSPI, "QSPI init [%d] Erase command not on sector aligned addresses or exceeds device size", status); break; case QSPIF_BD_ERROR_DEVICE_NOT_UNIQE: log->error(LOG_QSPI, "QSPI init [%d] Only one instance per csel is allowed", status); break; case QSPIF_BD_ERROR_DEVICE_MAX_EXCEED: log->error(LOG_QSPI, "QSPI init [%d] Max active QSPIF devices exceeded", status); break; }