QSPI Flash support


We use Spansion NOR flash on our S7 based controller. I get SSP error SSP_ERR_UNSUPPORTED for open() call. How do I add support for Spansion flash in BSP ? 



  • In reply to Jake:


    No, the first read of the 8 bit SFMD register into regval just sets the lower bits in regval.
    The second read does use a |= operator to or in the higher bits from the SFMD register.
    The order that the bits are send in is Lower Byte, Upper Byte.

  • In reply to garyj:

    Thanks for responding. I'm blind and didn't see the (regval | )inside there.
  • In reply to garyj:

    Hi garyj,

    Thank you, now NOR Flash is working fine. We can able to write/read data to/from NOR flash.
    Before proceeding further with your suggestions first we tried to understand how MT25QL256A is put into DTR mode by verifying non-volatile configuration register bit-by-bit. And then we modified the BSP and replaced MT25QL256A with new IC, and we re-flashed the MCU BEFORE using it with a new MT25QL256A device.

  • In reply to Prashanth:

    Hi Prasanth, how were you able to verify the nv config register? When I read from it, all I get is FF's. I thought if you were in DTR, the flash was basically bricked.
  • In reply to Jake:

    Hi Jake,

    Even we were getting 0xFF. Then we erased the uc and removed the NOR Flash. Then populated new NOR Flash to our board. Then we made required changes in BSP as explained by garyj. Now we programmed the uc with proper code and this time we are able to read device characteristics properly.



  • In reply to Kandhu:

    Nice :) Glad to hear. I put the flash on the back burner for right now. Getting back to it in the next week, and I'm glad those steps worked for you.
  • In reply to Prashanth:

    Hi  ,

    I am running into same error though i am able to read device characteristic correctly ,while writting and reading ,it always errors as SSP_ERR_UNSUPPORTED,for which addressing mode did you configure SFM register and is it possible for you to share BSP files.

  • In reply to garyj:

    Hello Gary,

    I am working on MT25Q512 device with s5d9 micro,with the help of this thread I am ble to read device characteristic(ID and capacity )correctly ,when I try to program a page I get error as SSP error as UNSUPPORTED (6) so included above lines after resetting the flash, still I am getting same error .

    can you help me to what I am missing and correct me

  • In reply to Alex:

    Hi Alex-
    This is a very old thread with a couple of recent posts so it may get overlooked. I suggest you create a new post with additional details of your project- what version of SSP and e2 studio, what have you done so far- for example, have you created a bsp for your board, are you adapting some existing QSPI code from another board, etc.

    If you can start a new thread I believe you will get a quicker response.