diff options
| -rw-r--r-- | embassy-stm32/src/eth/v2/mod.rs | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/embassy-stm32/src/eth/v2/mod.rs b/embassy-stm32/src/eth/v2/mod.rs index ce5f25ebd..b9acbf404 100644 --- a/embassy-stm32/src/eth/v2/mod.rs +++ b/embassy-stm32/src/eth/v2/mod.rs | |||
| @@ -86,9 +86,6 @@ impl<'d, P: PHY, const TX: usize, const RX: usize> Ethernet<'d, P, TX, RX> { | |||
| 86 | dma.dmamr().modify(|w| w.set_swr(true)); | 86 | dma.dmamr().modify(|w| w.set_swr(true)); |
| 87 | while dma.dmamr().read().swr() {} | 87 | while dma.dmamr().read().swr() {} |
| 88 | 88 | ||
| 89 | // 200 MHz ? | ||
| 90 | mac.mac1ustcr().modify(|w| w.set_tic_1us_cntr(200 - 1)); | ||
| 91 | |||
| 92 | mac.maccr().modify(|w| { | 89 | mac.maccr().modify(|w| { |
| 93 | w.set_ipg(0b000); // 96 bit times | 90 | w.set_ipg(0b000); // 96 bit times |
| 94 | w.set_acs(true); | 91 | w.set_acs(true); |
| @@ -108,21 +105,15 @@ impl<'d, P: PHY, const TX: usize, const RX: usize> Ethernet<'d, P, TX, RX> { | |||
| 108 | mac.maca0hr() | 105 | mac.maca0hr() |
| 109 | .modify(|w| w.set_addrhi(u16::from(mac_addr[4]) | (u16::from(mac_addr[5]) << 8))); | 106 | .modify(|w| w.set_addrhi(u16::from(mac_addr[4]) | (u16::from(mac_addr[5]) << 8))); |
| 110 | 107 | ||
| 111 | // TODO: Enable filtering once we get the basics working | 108 | mac.macpfr().modify(|w| w.set_saf(true)); |
| 112 | mac.macpfr().modify(|w| w.set_ra(true)); | ||
| 113 | mac.macqtx_fcr().modify(|w| w.set_pt(0x100)); | 109 | mac.macqtx_fcr().modify(|w| w.set_pt(0x100)); |
| 114 | 110 | ||
| 115 | mtl.mtlrx_qomr().modify(|w| w.set_rsf(true)); | 111 | mtl.mtlrx_qomr().modify(|w| w.set_rsf(true)); |
| 116 | mtl.mtltx_qomr().modify(|w| w.set_tsf(true)); | 112 | mtl.mtltx_qomr().modify(|w| w.set_tsf(true)); |
| 117 | 113 | ||
| 118 | // TODO: Address aligned beats plus fixed burst ? | 114 | dma.dmactx_cr().modify(|w| w.set_txpbl(1)); // 32 ? |
| 119 | dma.dmasbmr().modify(|w| { | ||
| 120 | w.set_aal(true); | ||
| 121 | w.set_fb(true); | ||
| 122 | }); | ||
| 123 | dma.dmactx_cr().modify(|w| w.set_txpbl(32)); // 32 ? | ||
| 124 | dma.dmacrx_cr().modify(|w| { | 115 | dma.dmacrx_cr().modify(|w| { |
| 125 | w.set_rxpbl(32); // 32 ? | 116 | w.set_rxpbl(1); // 32 ? |
| 126 | w.set_rbsz(MTU as u16); | 117 | w.set_rbsz(MTU as u16); |
| 127 | }); | 118 | }); |
| 128 | } | 119 | } |
