Skip to content

Commit db345a7

Browse files
authored
Merge pull request #21634 from benpicco/hack/sam0-eth/delay
[HACK] cpu/sam0_common: eth: delay init by 10ms for more stable Ethernet
2 parents 58302ce + 54a7446 commit db345a7

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

cpu/sam0_common/sam0_eth/eth-netdev.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
#include "net/eui_provider.h"
2929

3030
#include "periph/gpio.h"
31+
#include "xtimer.h"
3132
#include "ztimer.h"
3233

3334
#include "sam0_eth_netdev.h"
@@ -153,6 +154,10 @@ static inline void _setup_phy_irq(gpio_cb_t cb, void *arg)
153154

154155
static int _sam0_eth_init(netdev_t *netdev)
155156
{
157+
/* HACK: without the delay we see random hard faults or no sent/received
158+
frames after boot. */
159+
xtimer_msleep(10);
160+
156161
sam0_eth_init();
157162
eui48_t hwaddr;
158163
netdev_eui48_get(netdev, &hwaddr);

0 commit comments

Comments
 (0)