RT1050 QSPI flash change to Winbond W25Q32JV (3.3V)

cancel
Showing results for 
Search instead for 
Did you mean: 

RT1050 QSPI flash change to Winbond W25Q32JV (3.3V)

Jump to solution
1,233 Views
felix1
Contributor III

I want to use QSPI flash Winbond W25Q32JV instead of IS25WP064A.

1) how to get the flash driver .cfx file?

2) where to get the flash config define?

const flexspi_nor_config_t qspiflash_config

3) Does mfgtool support Winbond QSPI flash? Do I need to modify anything? 

Labels (1)
1 Solution
399 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Felix Shih,

    Answer your 3 questions:

1) how to get the flash driver .cfx file?

   We don't have the specific .cfx file for W25Q32jv, you can try the IS25WP064A .cfx.

2) where to get the flash config define?

const flexspi_nor_config_t qspiflash_config

  You don't to modify the flexspi_nor_config_t qspiflash_config. Because the read LUT is the same as IS25WP064A.

  But, I think you can run this SDK code:

SDK_2.5.1_EVKB-IMXRT1050\boards\evkbimxrt1050\driver_examples\flexspi\nor\polling_transfer

  And modify the QE code like this:

 status_t flexspi_nor_enable_quad_mode(FLEXSPI_Type *base)
{
    flexspi_transfer_t flashXfer;
    status_t status;
    uint32_t writeValue = 0x0200;//0x40;// enable bit 9 in the status, it is QE bit.

    /* Write enable */
    status = flexspi_nor_write_enable(base, 0);

    if (status != kStatus_Success)
    {
        return status;
    }

    /* Enable quad mode. */
    flashXfer.deviceAddress = 0;
    flashXfer.port = kFLEXSPI_PortA1;
    flashXfer.cmdType = kFLEXSPI_Write;
    flashXfer.SeqNumber = 1;
    flashXfer.seqIndex = NOR_CMD_LUT_SEQ_IDX_WRITESTATUSREG;
    flashXfer.data = &writeValue;
    flashXfer.dataSize = 2;

    status = FLEXSPI_TransferBlocking(base, &flashXfer);
    if (status != kStatus_Success)
    {
        return status;
    }

    status = flexspi_nor_wait_bus_busy(base);

    return status;
}

As you know, the Winbond QSPI QE bit is S9

pastedImage_2.png

This is different with IS25WP064A.

You also need to erase sector, in the customLUT array, you need to change the 0xD7 for 0x20.

You can also change the size with 0x52 for 32KB or 0xD8 for 64KB block erase.

3) Does mfgtool support Winbond QSPI flash? Do I need to modify anything? 

   yes, mfgtool can support winond QSPI flash, you just need to select the program_flexspinor_image_qspinor_status_reg2_bit1.bd , choose the correct QE bit, it can be found in the RT1050 flashloader folder: Flashloader_i.MXRT1050_GA\Flashloader_RT1050_1.1\Tools\bd_file\imx10xx

  BTW, I highly recommend you use our new tool, MCUBOOTutility, which can be downloaded from this link:

https://github.com/JayHeng/NXP-MCUBootUtility/releases/tag/v1.4.0

You can find the user manual from this link:

GitHub - JayHeng/NXP-MCUBootUtility: A one-stop utility tool based on Python2.7+wxPython4.0, it can ... 

This tool can support winbond QSPI FLASH directly, and it is easy to use.

You just need to configure the device configuration like this:

pastedImage_6.png

You can try it on your side.

If you still have question about it, please kindly let me know.

Have a great day,
Kerry

 

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

View solution in original post

7 Replies
399 Views
antoinezen
Contributor III

Hi Felix & Kerry,

I'm working on the same topic. We like to use the Winbound WS25Q128FW. This is the same family, simply this one is 1.8V (same as original IS25WP064AJBLE) and is 128Mbits. When flashing using the flashloader and the "blhost" command, i always run into the "kStatus_FlexSPINOR_SFDP_NotFound" error . It seems that this errors means that the device does not response to the "Read SFDP" command 0x5A. I've confirmed this using a logic analyser: The WS25Q128FW device does not output any data upon 0x5A commands from the Flashloader.

Felix did you encounter the same ? Any suggestions ?

0 Kudos
399 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Antoine Zen-Ruffinen,

  Could you please create a new question post about your question, then we can help you in your own question post, if you want I provide service for you, you can @ kerry zhou in your post.

   Please also tell me what's the board you are using, your own boar or the official board, more details, we can talk it in your own post!

Have a great day,
Kerry

 

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos
399 Views
felix1
Contributor III

Hi Antoine,

sorry, I did not meet the same issue with Winbond W25Q32JV (3.3V).

Maybe NXP FAE Kerry can help you to solve it.

0 Kudos
399 Views
felix1
Contributor III

1) Can I use MIMXRT1050_SFDP_QSPI.cfx instead of IS25WP064A.cfx? From driver file name, it seems a general purpose QSPI flash driver.
2) "You can also change the size with 0x52 for 32KB or 0xD8 for 64KB block erase."
Do you mean in the customLUT array? Can you show me which LUT command need to change?

0 Kudos
399 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Felix Shih,

    1) Yes, the MIMXRT1050_SFDP_QSPI.cfx is the general purpose QSPI flash driver, you can try it.

    2) Yes, it is the customLUT array, please check the following picture:

pastedImage_1.png

You can try it on your side.

If you still have question about it, please kindly let me know.


Have a great day,
Kerry

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos
400 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Felix Shih,

    Answer your 3 questions:

1) how to get the flash driver .cfx file?

   We don't have the specific .cfx file for W25Q32jv, you can try the IS25WP064A .cfx.

2) where to get the flash config define?

const flexspi_nor_config_t qspiflash_config

  You don't to modify the flexspi_nor_config_t qspiflash_config. Because the read LUT is the same as IS25WP064A.

  But, I think you can run this SDK code:

SDK_2.5.1_EVKB-IMXRT1050\boards\evkbimxrt1050\driver_examples\flexspi\nor\polling_transfer

  And modify the QE code like this:

 status_t flexspi_nor_enable_quad_mode(FLEXSPI_Type *base)
{
    flexspi_transfer_t flashXfer;
    status_t status;
    uint32_t writeValue = 0x0200;//0x40;// enable bit 9 in the status, it is QE bit.

    /* Write enable */
    status = flexspi_nor_write_enable(base, 0);

    if (status != kStatus_Success)
    {
        return status;
    }

    /* Enable quad mode. */
    flashXfer.deviceAddress = 0;
    flashXfer.port = kFLEXSPI_PortA1;
    flashXfer.cmdType = kFLEXSPI_Write;
    flashXfer.SeqNumber = 1;
    flashXfer.seqIndex = NOR_CMD_LUT_SEQ_IDX_WRITESTATUSREG;
    flashXfer.data = &writeValue;
    flashXfer.dataSize = 2;

    status = FLEXSPI_TransferBlocking(base, &flashXfer);
    if (status != kStatus_Success)
    {
        return status;
    }

    status = flexspi_nor_wait_bus_busy(base);

    return status;
}

As you know, the Winbond QSPI QE bit is S9

pastedImage_2.png

This is different with IS25WP064A.

You also need to erase sector, in the customLUT array, you need to change the 0xD7 for 0x20.

You can also change the size with 0x52 for 32KB or 0xD8 for 64KB block erase.

3) Does mfgtool support Winbond QSPI flash? Do I need to modify anything? 

   yes, mfgtool can support winond QSPI flash, you just need to select the program_flexspinor_image_qspinor_status_reg2_bit1.bd , choose the correct QE bit, it can be found in the RT1050 flashloader folder: Flashloader_i.MXRT1050_GA\Flashloader_RT1050_1.1\Tools\bd_file\imx10xx

  BTW, I highly recommend you use our new tool, MCUBOOTutility, which can be downloaded from this link:

https://github.com/JayHeng/NXP-MCUBootUtility/releases/tag/v1.4.0

You can find the user manual from this link:

GitHub - JayHeng/NXP-MCUBootUtility: A one-stop utility tool based on Python2.7+wxPython4.0, it can ... 

This tool can support winbond QSPI FLASH directly, and it is easy to use.

You just need to configure the device configuration like this:

pastedImage_6.png

You can try it on your side.

If you still have question about it, please kindly let me know.

Have a great day,
Kerry

 

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

View solution in original post

399 Views
paul_argue
Contributor I

One small thing to change on this, when writing to both status 1 and status 2 registers in flexspi_nor_enable_quad_mode(), increase the dataSize to 2.

From this:

flashXfer.dataSize = 1;

To this:

flashXfer.dataSize = 2;