embeddedsw
embeddedsw copied to clipboard
Wrong init sequence in xqspipsu_generic_flash_polled_example.c for Spansion
In file xqspipsu_generic_flash_polled_example.c, in function FlashEnterExit4BAddMode(), under the case SPANSION_ID_BYTE0: clause, the source code initializes FlashMsg[1] only partially then somehow switches to FlashMsg[2] even though the 3rd FlashMsg isn't used:
FlashMsg[0].TxBfrPtr = &WriteBuffer[0];
FlashMsg[0].RxBfrPtr = NULL;
FlashMsg[0].BusWidth = XQSPIPSU_SELECT_MODE_SPI;
FlashMsg[0].Flags = XQSPIPSU_MSG_FLAG_TX;
FlashMsg[0].ByteCount = 1;
FlashMsg[1].TxBfrPtr = &WriteBuffer[1];
FlashMsg[2].RxBfrPtr = NULL;
FlashMsg[2].BusWidth = XQSPIPSU_SELECT_MODE_SPI;
FlashMsg[2].Flags = XQSPIPSU_MSG_FLAG_TX;
FlashMsg[2].ByteCount = 1;
Status = XQspiPsu_PolledTransfer(QspiPsuPtr, FlashMsg, 2);
Hello RandoDev2,
Thank you for pointing this out. We will fix this in the upcoming release.
Regards, Amit
Hello @RandoDev2,
The latest release has addressed and resolved this issue.
Regards, Amit