Question about the SPI3 XIP mode



  • Hi,
    I encountered the same issue mentioned in the post:
    https://forum.kendryte.com/topic/199/can-we-put-the-weights-in-xip-spi-flash

    I had managed to enable XIP mode with the w25qxx driver code provided in that post, but there is the endianness issue.

    For example, suppose the following byte sequence is stored in the flash memory at the address 0x1000:
    {0x10, 0x20, 0x30, 0x40}

    The data can be retrieved using XIP memory map:
    const char * xip_map = SPI3_BASE_ADDR + 0x1000;

    If there is a word size access to the address, i.e. *(uint32_t *)xip_map, the retrieved data should be 0x40302010.

    But with the code provided in that post, the actual data read out is 0x10203040.

    Is there any solution to solve this issue?