From a282d723ca0b4f1e5fa0c4cba5a3266b62ccd33d Mon Sep 17 00:00:00 2001 From: atomiclama Date: Tue, 13 Dec 2016 12:33:11 +0000 Subject: [PATCH] Added a nop around the setting of the Flash CS pin. This increases the time the CS pin is high between sequential bus access. Was a problem on some Revo/AirbotF4 targets. Where the timinig was more critical due to the flash chip used. --- src/main/drivers/flash_m25p16.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/drivers/flash_m25p16.c b/src/main/drivers/flash_m25p16.c index c6429fe435..79fc8509e7 100644 --- a/src/main/drivers/flash_m25p16.c +++ b/src/main/drivers/flash_m25p16.c @@ -51,8 +51,8 @@ #define JEDEC_ID_WINBOND_W25Q128 0xEF4018 #define JEDEC_ID_MACRONIX_MX25L25635E 0xC22019 -#define DISABLE_M25P16 IOHi(m25p16CsPin) -#define ENABLE_M25P16 IOLo(m25p16CsPin) +#define DISABLE_M25P16 IOHi(m25p16CsPin); __NOP() +#define ENABLE_M25P16 __NOP(); IOLo(m25p16CsPin) // The timeout we expect between being able to issue page program instructions #define DEFAULT_TIMEOUT_MILLIS 6