Skip to content

Commit

Permalink
Fix return flow on QSPI read
Browse files Browse the repository at this point in the history
  • Loading branch information
josesimoes committed May 15, 2024
1 parent 60132da commit 247120c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions targets/ChibiOS/ORGPAL_PALX/target_littlefs.c
Original file line number Diff line number Diff line change
Expand Up @@ -369,13 +369,12 @@ uint8_t QSPI_Read(uint8_t *pData, uint32_t readAddr, uint32_t size)
if (status != HAL_OK)
{
__NOP();
return QSPI_ERROR;
}

// Restore S# timing for nonRead commands
MODIFY_REG(QSPID1.Instance->DCR, QUADSPI_DCR_CSHT, QSPI_CS_HIGH_TIME_5_CYCLE);

return QSPI_OK;
return status == HAL_OK ? QSPI_OK : QSPI_ERROR;
}

uint8_t QSPI_Write(uint8_t *pData, uint32_t writeAddr, uint32_t size)
Expand Down

0 comments on commit 247120c

Please sign in to comment.