mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-12-29 08:21:18 +01:00
Merge pull request #21836 from benpicco/cpu/sam0-eth/irq-init
cpu/sam0_eth: disable interrupts during init
This commit is contained in:
commit
20ff9dba35
@ -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;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user