diff --git a/XilinxProcessorIPLib/drivers/qspipsu/examples/xqspipsu_generic_flash_interrupt_example.c b/XilinxProcessorIPLib/drivers/qspipsu/examples/xqspipsu_generic_flash_interrupt_example.c index 78b6c10c..210f9ff9 100644 --- a/XilinxProcessorIPLib/drivers/qspipsu/examples/xqspipsu_generic_flash_interrupt_example.c +++ b/XilinxProcessorIPLib/drivers/qspipsu/examples/xqspipsu_generic_flash_interrupt_example.c @@ -1236,10 +1236,20 @@ int FlashRead(XQspiPsu *QspiPsuPtr, u32 Address, u32 ByteCount, u8 Command, /* Update Dummy cycles as per flash specs for QUAD IO */ /* - * Bus width of dummy phase is recommended to be the same as - * address phase + * It is recommended that Bus width value during dummy + * phase should be same as data phase */ - FlashMsg[1].BusWidth = FlashMsg[0].BusWidth; + if ((Command == FAST_READ_CMD) || (Command == FAST_READ_CMD_4B)) { + FlashMsg[1].BusWidth = XQSPIPSU_SELECT_MODE_SPI; + } + + if ((Command == DUAL_READ_CMD) || (Command == DUAL_READ_CMD_4B)) { + FlashMsg[1].BusWidth = XQSPIPSU_SELECT_MODE_DUALSPI; + } + + if ((Command == QUAD_READ_CMD) || (Command == QUAD_READ_CMD_4B)) { + FlashMsg[1].BusWidth = XQSPIPSU_SELECT_MODE_QUADSPI; + } FlashMsg[1].TxBfrPtr = NULL; FlashMsg[1].RxBfrPtr = NULL; diff --git a/XilinxProcessorIPLib/drivers/qspipsu/examples/xqspipsu_generic_flash_polled_example.c b/XilinxProcessorIPLib/drivers/qspipsu/examples/xqspipsu_generic_flash_polled_example.c index a2460df6..9ae29fac 100644 --- a/XilinxProcessorIPLib/drivers/qspipsu/examples/xqspipsu_generic_flash_polled_example.c +++ b/XilinxProcessorIPLib/drivers/qspipsu/examples/xqspipsu_generic_flash_polled_example.c @@ -1154,10 +1154,20 @@ int FlashRead(XQspiPsu *QspiPsuPtr, u32 Address, u32 ByteCount, u8 Command, /* Update Dummy cycles as per flash specs for QUAD IO */ /* - * Bus width of dummy phase is recommended to be the same as - * address phase + * It is recommended that Bus width value during dummy + * phase should be same as data phase */ - FlashMsg[1].BusWidth = FlashMsg[0].BusWidth; + if ((Command == FAST_READ_CMD) || (Command == FAST_READ_CMD_4B)) { + FlashMsg[1].BusWidth = XQSPIPSU_SELECT_MODE_SPI; + } + + if ((Command == DUAL_READ_CMD) || (Command == DUAL_READ_CMD_4B)) { + FlashMsg[1].BusWidth = XQSPIPSU_SELECT_MODE_DUALSPI; + } + + if ((Command == QUAD_READ_CMD) || (Command == QUAD_READ_CMD_4B)) { + FlashMsg[1].BusWidth = XQSPIPSU_SELECT_MODE_QUADSPI; + } FlashMsg[1].TxBfrPtr = NULL; FlashMsg[1].RxBfrPtr = NULL;