From 477a00d43f6a685f6fe9a25691f5bd1c18ec83a8 Mon Sep 17 00:00:00 2001 From: Benjamin Valentin Date: Fri, 31 Oct 2025 13:26:11 +0100 Subject: [PATCH] cpu/sam0_eth: disable interrupts during init --- cpu/sam0_common/periph/eth.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cpu/sam0_common/periph/eth.c b/cpu/sam0_common/periph/eth.c index 7d374e090b..1550849976 100644 --- a/cpu/sam0_common/periph/eth.c +++ b/cpu/sam0_common/periph/eth.c @@ -355,6 +355,9 @@ bool sam0_eth_has_queued_pkt(void) int sam0_eth_init(void) { + /* HACK: interrupting the init sequence leads to strange hangs */ + unsigned state = irq_disable(); + /* Enable clocks */ _enable_clock(); /* Initialize GPIOs */ @@ -413,5 +416,7 @@ int sam0_eth_init(void) /* Enable both receiver and transmitter */ GMAC->NCR.reg |= GMAC_NCR_TXEN | GMAC_NCR_RXEN; + irq_restore(state); + return 0; }