AnsweredAssumed Answered

I can not erase QSPI Flash W25Q32JV

Question asked by Stefan Ivanov on Jan 18, 2019
Latest reply on Feb 5, 2019 by Victor Jimenez

I am working on a project with a microcontroller  i.MX RT1052B and MCUXpresso 10.2.0 and EVKB-IMXRT1050. 

QSPI flash on our board is W25Q32JV which is 32Mb(4MB) serial flash. I want to erase, read, write to QSPI flash

in run time. I can write to and read from QSPI flash but can't erase the flash. From SDK folder: driver_examples\flexspi\nor\polling_transfer     I use the function:

 

status_t flexspi_nor_flash_erase_sector(FLEXSPI_Type *base, uint32_t address)
{
    status_t status;
    flexspi_transfer_t flashXfer;
    /* Write enable */
    flashXfer.deviceAddress = address;
    flashXfer.port = kFLEXSPI_PortA1;
    flashXfer.cmdType = kFLEXSPI_Command;
    flashXfer.SeqNumber = 1;
    flashXfer.seqIndex = NOR_CMD_LUT_SEQ_IDX_WRITEENABLE;
    status = FLEXSPI_TransferBlocking(base, &flashXfer);
    if (status != kStatus_Success)
    {
        return status;
    }
    flashXfer.deviceAddress = address;
    flashXfer.port = kFLEXSPI_PortA1;
    flashXfer.cmdType = kFLEXSPI_Command;
    flashXfer.SeqNumber = 1;
    flashXfer.seqIndex = NOR_CMD_LUT_SEQ_IDX_ERASESECTOR;
    status = FLEXSPI_TransferBlocking(base, &flashXfer);
    if (status != kStatus_Success)
    {
        return status;
    }
    status = flexspi_nor_wait_bus_busy(base);
    return status;
}

Thank you in advance. 



 

Outcomes