mirror of
https://github.com/apache/nuttx.git
synced 2026-06-05 15:58:59 +08:00
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:
committed by
Xiang Xiao
parent
8659a31c9d
commit
1ca952243c
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user