mirror of
https://github.com/apache/nuttx.git
synced 2026-08-03 05:09:00 +00:00
stm32h7:Ethernet Add some delays so that ifup() does not hog the CPU.
This commit is contained in:
parent
70c9cd1508
commit
282ab797bf
1 changed files with 6 additions and 1 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue