nrfx_qspi: Increase default timeout to 500 ms

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>
This commit is contained in:
Andrzej Głąbek 2023-03-30 14:46:30 +02:00 committed by Carles Cufí
parent 045192fc96
commit c4044b04b8
1 changed files with 10 additions and 2 deletions

View File

@ -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.