1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-21 23:35:34 +03:00

Update default flash bulk-erase timeout and improve developer

documentation regarding timeouts.
This commit is contained in:
Dominic Clifton 2019-06-12 12:22:07 +02:00
parent 6189d6bdc5
commit b09012621b
2 changed files with 7 additions and 3 deletions

View file

@ -68,12 +68,14 @@
#define JEDEC_ID_CYPRESS_S25FL128L 0x016018 #define JEDEC_ID_CYPRESS_S25FL128L 0x016018
#define JEDEC_ID_BERGMICRO_W25Q32 0xE04016 #define JEDEC_ID_BERGMICRO_W25Q32 0xE04016
// IMPORTANT: Timeout values are currently required to be set to the highest value required by any of the supported flash chips by this driver.
// The timeout we expect between being able to issue page program instructions // The timeout we expect between being able to issue page program instructions
#define DEFAULT_TIMEOUT_MILLIS 6 #define DEFAULT_TIMEOUT_MILLIS 6
// These take sooooo long:
#define SECTOR_ERASE_TIMEOUT_MILLIS 5000 #define SECTOR_ERASE_TIMEOUT_MILLIS 5000
#define BULK_ERASE_TIMEOUT_MILLIS 21000
// etracer65 notes: For bulk erase The 25Q16 takes about 3 seconds and the 25Q128 takes about 49
#define BULK_ERASE_TIMEOUT_MILLIS 50000
#define M25P16_PAGESIZE 256 #define M25P16_PAGESIZE 256

View file

@ -122,6 +122,8 @@ serialPort_t *debugSerialPort = NULL;
#define W25N01G_BLOCK_TO_PAGE(block) ((block) * W25N01G_PAGES_PER_BLOCK) #define W25N01G_BLOCK_TO_PAGE(block) ((block) * W25N01G_PAGES_PER_BLOCK)
#define W25N01G_BLOCK_TO_LINEAR(block) (W25N01G_BLOCK_TO_PAGE(block) * W25N01G_PAGE_SIZE) #define W25N01G_BLOCK_TO_LINEAR(block) (W25N01G_BLOCK_TO_PAGE(block) * W25N01G_PAGE_SIZE)
// IMPORTANT: Timeout values are currently required to be set to the highest value required by any of the supported flash chips by this driver
// The timeout values (2ms minimum to avoid 1 tick advance in consecutive calls to millis). // The timeout values (2ms minimum to avoid 1 tick advance in consecutive calls to millis).
#define W25N01G_TIMEOUT_PAGE_READ_MS 2 // tREmax = 60us (ECC enabled) #define W25N01G_TIMEOUT_PAGE_READ_MS 2 // tREmax = 60us (ECC enabled)
#define W25N01G_TIMEOUT_PAGE_PROGRAM_MS 2 // tPPmax = 700us #define W25N01G_TIMEOUT_PAGE_PROGRAM_MS 2 // tPPmax = 700us