You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2020/02/14 14:55:39 UTC

[GitHub] [incubator-nuttx] patacongo commented on a change in pull request #275: AT24 EEPROM Increase Polling Retries

patacongo commented on a change in pull request #275: AT24 EEPROM Increase Polling Retries
URL: https://github.com/apache/incubator-nuttx/pull/275#discussion_r379473468
 
 

 ##########
 File path: drivers/eeprom/i2c_xx24xx.c
 ##########
 @@ -266,6 +267,7 @@ static int ee24xx_waitwritecomplete(FAR struct ee24xx_dev_s *eedev,
   do
     {
      ret = I2C_TRANSFER(eedev->i2c, msgs, 1);
+     up_udelay(10);
 
 Review comment:
   up_udelay() should only be used during initialize.  It has disasterous consequences on really time performance since it is a tight loop and blocks all other tasks.  The code was better without this because you had  chance  to get out of the loop sooner.  No, there is almost a guaranteed block, hogging the CPU for a minimum of 10 usec.
   
   You got some very bad advice.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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