stm32h7:Ethernet Add some delays so that ifup() does not hog the CPU.

This commit is contained in:
David Sidrane 2021-07-08 13:13:16 -07:00 committed by Xiang Xiao
parent 70c9cd1508
commit 282ab797bf
1 changed files with 6 additions and 1 deletions

View File

@ -40,6 +40,7 @@
#include <nuttx/irq.h>
#include <nuttx/wdog.h>
#include <nuttx/wqueue.h>
#include <nuttx/signal.h>
#include <nuttx/net/mii.h>
#include <nuttx/net/arp.h>
#include <nuttx/net/netdev.h>
@ -295,7 +296,7 @@
#define PHY_READ_TIMEOUT (0x0004ffff)
#define PHY_WRITE_TIMEOUT (0x0004ffff)
#define PHY_RETRY_TIMEOUT (0x0004ffff)
#define PHY_RETRY_TIMEOUT (0x0001998)
/* MAC reset ready delays in loop counts */
@ -3553,6 +3554,8 @@ static int stm32_phyinit(struct stm32_ethmac_s *priv)
{
break;
}
nxsig_usleep(100);
}
if (timeout >= PHY_RETRY_TIMEOUT)
@ -3585,6 +3588,8 @@ static int stm32_phyinit(struct stm32_ethmac_s *priv)
{
break;
}
nxsig_usleep(100);
}
if (timeout >= PHY_RETRY_TIMEOUT)