PSoC 6 SMIF QSPI customizations

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
RiKw_4278376
Level 2
Level 2
5 replies posted 5 questions asked First question asked

I’m using the PSoC 6 BLE Pioneer Kit, and learning to use the SMIF Interface to QSPI. I’ve been studying Device Configurator and from there launching the QSPI Configurator.

There are a couple of things I want to do:

  1. I want to issue a “get JEDEC ID” (opcode 0x9F).  But when I look at the QSPI Config, I do not see a command and opcode for it.  Q: How do I add a QSPI command?
  2. I want to add a second QPSI device; its part number is not in the drop-down list for Memory Part Number. Q: How do I add a new flash device?

Below is a snap of the QPSI Configuration panel that I see.

QPSIConfig.png

0 Likes
1 Solution
DheerajK_81
Moderator
Moderator
Moderator
First comment on KBA First comment on blog 5 questions asked

Yes, the configurator only has some generic commands you would normally see in every chip. You can of-course pass your own commands, you just need to use the low level APIs. For example, to read JEDEC ID (opcode 9F) please do the following:

    Cy_SMIF_TransmitCommand( KIT_QSPI_HW,

                                    0x9F, /* RDID (JEDEC) command */

                                    CY_SMIF_WIDTH_SINGLE,

                                    CY_SMIF_CMD_WITHOUT_PARAM , /* Command does not have parameters */

                                    CY_SMIF_CMD_WITHOUT_PARAM ,

                                    CY_SMIF_WIDTH_SINGLE,

                                    CY_SMIF_SLAVE_SELECT_0, /* External memory connected to nSS0 */

                                    0U, /* Do not disable nSS after command transfered */

                                    &KIT_QSPI_context);

    smifStatus = Cy_SMIF_ReceiveData(KIT_QSPI_HW, rxBuffer,

                               20U, /* Read 20-byte */

                               CY_SMIF_WIDTH_SINGLE,

                               NULL, /* Callback function is not used */

                               &KIT_QSPI_context);

    CheckStatus("Reading JEDEC failed", smifStatus);

    PrintArray("Received JEDEC", rxBuffer, 20);

Output:

2.PNG

You can also add a new flash device by File > New *.cymem file in the device configurator. You can find more information on how to go about this in Page#6 of the QSPI Configurator Guide​.

Regards,

Dheeraj

View solution in original post

1 Reply
DheerajK_81
Moderator
Moderator
Moderator
First comment on KBA First comment on blog 5 questions asked

Yes, the configurator only has some generic commands you would normally see in every chip. You can of-course pass your own commands, you just need to use the low level APIs. For example, to read JEDEC ID (opcode 9F) please do the following:

    Cy_SMIF_TransmitCommand( KIT_QSPI_HW,

                                    0x9F, /* RDID (JEDEC) command */

                                    CY_SMIF_WIDTH_SINGLE,

                                    CY_SMIF_CMD_WITHOUT_PARAM , /* Command does not have parameters */

                                    CY_SMIF_CMD_WITHOUT_PARAM ,

                                    CY_SMIF_WIDTH_SINGLE,

                                    CY_SMIF_SLAVE_SELECT_0, /* External memory connected to nSS0 */

                                    0U, /* Do not disable nSS after command transfered */

                                    &KIT_QSPI_context);

    smifStatus = Cy_SMIF_ReceiveData(KIT_QSPI_HW, rxBuffer,

                               20U, /* Read 20-byte */

                               CY_SMIF_WIDTH_SINGLE,

                               NULL, /* Callback function is not used */

                               &KIT_QSPI_context);

    CheckStatus("Reading JEDEC failed", smifStatus);

    PrintArray("Received JEDEC", rxBuffer, 20);

Output:

2.PNG

You can also add a new flash device by File > New *.cymem file in the device configurator. You can find more information on how to go about this in Page#6 of the QSPI Configurator Guide​.

Regards,

Dheeraj