stm32h7:flash can not use usleep

commit 328374f465

   changed the wait to use usleep. This killed the
   write performace from the published values in the
   datasheet of ~100 us to 2 mS per 256 bits. On
   a 1000 per tick config. It can be 10 X worse
   on the default 100 per tick config.

   This changes uses up_udelay.
This commit is contained in:
David Sidrane
2022-02-11 12:27:29 -08:00
committed by Xiang Xiao
parent 8659a31c9d
commit 1ca952243c
+2 -2
View File
@@ -155,7 +155,7 @@
#define PROGMEM_NBLOCKS STM32_FLASH_NBLOCKS
#define FLASH_NPAGES (STM32_FLASH_SIZE / FLASH_PAGE_SIZE)
#define FLASH_TIMEOUT_VALUE 500000 /* 5s */
#define FLASH_TIMEOUT_VALUE 5000000 /* 5s */
/****************************************************************************
* Private Types
@@ -429,7 +429,7 @@ static int stm32h7_wait_for_last_operation(FAR struct stm32h7_flash_priv_s
break;
}
usleep(1000);
up_udelay(1);
}
if (timeout)