Skip to content

Commit

Permalink
nrfx_qspi: Increase default timeout to 500 ms
Browse files Browse the repository at this point in the history
When a flash memory is busy with some operation, waiting for the READY
event may take significant amount of time even when only the ACTIVATE
task is triggered. The maximum wait time of 500 ms should cover most
cases, including erasing of sectors in most flash chips.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
  • Loading branch information
anangl authored and carlescufi committed Apr 17, 2023
1 parent 045192f commit c4044b0
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions nrfx/drivers/src/nrfx_qspi.c
Expand Up @@ -48,8 +48,16 @@
/** @brief Default time used in timeout function. */
#define QSPI_DEF_WAIT_TIME_US 10

/** @brief Default number of tries in timeout function. */
#define QSPI_DEF_WAIT_ATTEMPTS 100
/**
* @brief Default number of tries in timeout function.
*
* When the flash memory is busy with some operation, waiting for the READY
* event even when only the ACTIVATE task is triggered may take significant
* amount of time. The below default number of attempts gives the maximum
* waiting time of 500 ms what should cover most cases, including erasing
* of sectors in most flash chips.
*/
#define QSPI_DEF_WAIT_ATTEMPTS 50000

/**
* @brief Macro for initializing a QSPI pin.
Expand Down

0 comments on commit c4044b0

Please sign in to comment.