I have a custom RT1010 board with Adesto AT25SF161. That I want to run as XIP. I read many posts here but I cannot run/debug my application from XIP (from external SPI.). When I try debug from XIP the debugger does not stop in main it just "runs" but I can see my code is not running (simple LED blink)
const flexspi_nor_config_t qspiflash_config = {
.memConfig =
{
.tag = FLEXSPI_CFG_BLK_TAG,
.version = FLEXSPI_CFG_BLK_VERSION,
.readSampleClksrc=kFlexSPIReadSampleClk_LoopbackFromDqsPad,
.csHoldTime = 3u,
.csSetupTime = 3u,
.sflashPadType = kSerialFlash_4Pads,
.serialClkFreq = kFlexSpiSerialClk_100MHz,
.sflashA1Size = 2u * 1024u * 1024u,
.lookupTable =
{
// Read LUTs
FLEXSPI_LUT_SEQ(CMD_SDR, FLEXSPI_1PAD, 0xEB, RADDR_SDR, FLEXSPI_4PAD, 0x18),
FLEXSPI_LUT_SEQ(DUMMY_SDR, FLEXSPI_4PAD, 0x06, READ_SDR, FLEXSPI_4PAD, 0x04),
},
},
.pageSize = 256u,
.sectorSize = 4u * 1024u,
.blockSize = 256u * 1024u,
.isUniformBlockSize = false,
};
hi,
Use the SDRAM? seems that the sdram is not inited correctly. if so, you need to add a DCD.c into your
project, then compile it together.
Regards,
Crist
Hi Crist,
Thanks for your reply.
There is no SDRAM on the design, I only want to use external SPI data flash as XIP , so boot and run from this external SPI device
THanks
Hi,
Have you ever replaced the flash algorithm? I found some important flash op codes from the DS:
1) Quad I/O Read : 0xEB with 6 dummy circles and 24bit address
2) BLOCK ERASE(4KB): 0x20
3) Byte/Page Program(1 to 256B): 0x02 and seems that it only need to use 1 single line to
send the data:
So, i think you can first check if the flash download algorithm is correct, and the image has already
downloaded to your device by try to read something from flash when your code run in the ram.
Regards,
Crist