Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions src/ethernet/eth.rs
Original file line number Diff line number Diff line change
Expand Up @@ -455,12 +455,6 @@ pub unsafe fn new_unchecked<const TD: usize, const RD: usize>(
// Ensure syscfg is enabled (for PMCR)
rcc.apb4enr.modify(|_, w| w.syscfgen().set_bit());

// Reset ETH_DMA - write 1 and wait for 0.
// On the H723, we have to do this before prec.enable()
// or the DMA will never come out of reset
eth_dma.dmamr.modify(|_, w| w.swr().set_bit());
while eth_dma.dmamr.read().swr().bit_is_set() {}

// AHB1 ETH1MACEN
prec.enable();

Expand All @@ -478,6 +472,10 @@ pub unsafe fn new_unchecked<const TD: usize, const RD: usize>(
//rcc.ahb1rstr.modify(|_, w| w.eth1macrst().clear_bit());

cortex_m::interrupt::free(|_cs| {
// reset ETH_DMA - write 1 and wait for 0
eth_dma.dmamr.modify(|_, w| w.swr().set_bit());
while eth_dma.dmamr.read().swr().bit_is_set() {}

// 200 MHz
eth_mac
.mac1ustcr
Expand Down