You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by GitBox <gi...@apache.org> on 2019/02/27 21:45:52 UTC

[GitHub] wes3 commented on a change in pull request #1664: spiflash: Improve erase sectors

wes3 commented on a change in pull request #1664: spiflash: Improve erase sectors
URL: https://github.com/apache/mynewt-core/pull/1664#discussion_r260958456
 
 

 ##########
 File path: hw/drivers/flash/spiflash/src/spiflash.c
 ##########
 @@ -876,6 +876,8 @@ spiflash_wait_ready(struct spiflash_dev *dev, uint32_t timeout_ms)
     spiflash_lock(dev);
 
     while (!spiflash_device_ready(dev)) {
+        /* If not ready let's give it 10ms */
+        os_time_delay(os_time_ms_to_ticks32(10));
         if (os_time_get() > exp_time) {
 
 Review comment:
   I have a question about this 10msec delay here. The spiflash_wait_ready() function is called by called that does not do erases. Waiting 10msecs seems like it could seriously impact flash read/write times, especially if you are doing small reads and writes. Was this change added to the code? I think I would only do something like this when erasing as opposed to reading/writing flash. Looks like there is a change below to that effect...

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services