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.

AM437x IDK QSPI flash memory-map

Hi all,

I am running the AM437x Industrial Development Kit (TMDXIDK437X) with Starterware (PDK AM437x v1.0.3) and am having trouble accessing the full memory-mapped address space of the on-board QSPI flash (64MB).

The QSPI address space is 64MB (0x3000_0000 to 0x33FF_FFFF) however when interrogating the address space via the CCS memory browser, the contents of the memory appears to 'wrap' every 16MB - i.e. the contents of address 0x3100_0000 appears identical to that of 0x3000_0000, 0x3200_0000 and 0x3300_0000 despite different values being written to these addresses using the QSPILibWrite function.

When using the QSPILibRead function the expected results are returned. In my application I wish to access this memory space directly without calling the driver. The following two lines are therefore giving different values (for testDataRead):

QSPILibRead(&qspiLibInfo, 0x1000000, (uint32_t) &testDataRead, 4);

testDataRead = *((volatile uint32_t *)0x31000000);

I have tried setting the NUM_A_BYTES field in the QSPI_SETUP_REG_0 register to 3h (send 4 address bytes) but remain unable to access the full address range. 

Any assistance in understanding this behavior gratefully received.

Kind regards,

David

  • The RTOS team have been notified. They will respond directly here.
  • David,

    Can you confirm that using QSPI Library R/W functions the data are correct? The thing is that CCS memory window doesn't (the data is 16MB wrapped) so the direct data read like *((volatile uint32_t *)0x31000000) give you the wrong data?

    In qspi_lib.c, function QspiLibMemMapRead():

    case QSPI_LIB_READ_TYPE_QUAD:
    /**< Quad read mode */
    QSPISetMemMapReadCmd(baseAddr, chipSelect, QSPI_LIB_CMD_READ_QUAD);
    QSPISetMemMapReadType(baseAddr,
    chipSelect,
    QSPI_MEM_MAP_READ_TYPE_QUAD);
    QSPISetMemMapNumDummyBits(baseAddr, chipSelect, 0x8U);

    Can you try to set the same before using *((volatile uint32_t *)address? The point is to check what the differnce between working/failure case QSPI_SPI_SETUP0_REG?

    Regards, Eric
  • Eric,

    Many thanks for your informative response. Setting the commands you have specified (in addition to enabling 4-byte address mode) gives me the correct result. If I then pause execution prior to returning to 3-byte address mode I can see the full 64MB of memory in the CCS memory browser.

    Kind regards,

    David