1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-14 09:03:50 +01:00

Merge pull request #21634 from benpicco/hack/sam0-eth/delay

[HACK] cpu/sam0_common: eth: delay init by 10ms for more stable Ethernet
This commit is contained in:
benpicco 2025-08-04 17:09:49 +00:00 committed by GitHub
commit db345a77bf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -28,6 +28,7 @@
#include "net/eui_provider.h" #include "net/eui_provider.h"
#include "periph/gpio.h" #include "periph/gpio.h"
#include "xtimer.h"
#include "ztimer.h" #include "ztimer.h"
#include "sam0_eth_netdev.h" #include "sam0_eth_netdev.h"
@ -153,6 +154,10 @@ static inline void _setup_phy_irq(gpio_cb_t cb, void *arg)
static int _sam0_eth_init(netdev_t *netdev) static int _sam0_eth_init(netdev_t *netdev)
{ {
/* HACK: without the delay we see random hard faults or no sent/received
frames after boot. */
xtimer_msleep(10);
sam0_eth_init(); sam0_eth_init();
eui48_t hwaddr; eui48_t hwaddr;
netdev_eui48_get(netdev, &hwaddr); netdev_eui48_get(netdev, &hwaddr);