This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

MCU-PLUS-SDK-AM263X: How to use the QSPI Memory Mapped (SFI) interface?

Part Number: MCU-PLUS-SDK-AM263X

I would like to use the QSPI's SFI interface to access the flash on the am263x-cc in a non-rots environment.  The SDK appears to set up the MSS_QSPI0_SPI_SETUP0 register and then access the memory mapped region, EXT_FLASH0 located at 0x60000000,1 byte at a time.  Is there anything else that needs to be done to kick off the read from flash? How would the setup differ to read 4 bytes at a time?

  • Hi Joe,

    QSPI_SPI_SWITCH_REG should also be configured to enable Memory mapped mode before reading from flash.

    QSPI register configuration is not required to specify the number of bytes to be read at a time in Mem Mapped mode. Read size is based on the type of read that CPU does to the mem mapped address. SDK currently uses uint8_t to access the address and thus the read will be 1 Byte at a time. To change it to 4 Bytes, you may use uint32_t for the address.

    Regards,

    Ashwin

  • Thank you for the answer.

    Are there any restriction on writing/reading from/to the memory mapped area?  For example are both word and byte access allowed?  

  • Hi Joe,

    QSPI IP doesn't have any such restrictions. Since NOR flashes normally have an internal buffer of 256Bytes (Equal to page size and used only for writes), there is a restriction that only a maximum of 256Bytes can be written in one go. After which, the WIP bit in flash should be checked to make sure that the write is complete.

    Regards,

    Ashwin