embeddedsw icon indicating copy to clipboard operation
embeddedsw copied to clipboard

Wrong init sequence in xqspipsu_generic_flash_polled_example.c for Spansion

Open RandoDev2 opened this issue 1 year ago • 2 comments

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);

RandoDev2 avatar Jun 29 '23 14:06 RandoDev2

Hello RandoDev2,

Thank you for pointing this out. We will fix this in the upcoming release.

Regards, Amit

Amit-Kumar-Mahapatra avatar Jun 30 '23 05:06 Amit-Kumar-Mahapatra

Hello @RandoDev2,

The latest release has addressed and resolved this issue.

Regards, Amit

Amit-Kumar-Mahapatra avatar Nov 20 '23 05:11 Amit-Kumar-Mahapatra