diff options
| author | Matous Hybl <[email protected]> | 2022-10-25 09:47:30 +0200 |
|---|---|---|
| committer | Matous Hybl <[email protected]> | 2022-11-10 17:21:42 +0100 |
| commit | 99682d313b54409c33d471e066ef6aba9f628a68 (patch) | |
| tree | 90c107756b8b0cc6607e18b122b9480e7a4c0507 | |
| parent | 059610a8de49ff2d38311f343d3d1a6f8d90a720 (diff) | |
Disable MMC interrupts
MMC interrupts can cause firmware hangup - refer to: https://github.com/stm32-rs/stm32h7xx-hal/issues/275 for more information
| -rw-r--r-- | embassy-stm32/src/eth/v2/mod.rs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/embassy-stm32/src/eth/v2/mod.rs b/embassy-stm32/src/eth/v2/mod.rs index a81ee1183..5b76d1e7f 100644 --- a/embassy-stm32/src/eth/v2/mod.rs +++ b/embassy-stm32/src/eth/v2/mod.rs | |||
| @@ -116,6 +116,24 @@ impl<'d, T: Instance, P: PHY, const TX: usize, const RX: usize> Ethernet<'d, T, | |||
| 116 | 116 | ||
| 117 | mac.macqtx_fcr().modify(|w| w.set_pt(0x100)); | 117 | mac.macqtx_fcr().modify(|w| w.set_pt(0x100)); |
| 118 | 118 | ||
| 119 | // disable all MMC RX interrupts | ||
| 120 | mac.mmc_rx_interrupt_mask().write(|w| { | ||
| 121 | w.set_rxcrcerpim(true); | ||
| 122 | w.set_rxalgnerpim(true); | ||
| 123 | w.set_rxucgpim(true); | ||
| 124 | w.set_rxlpiuscim(true); | ||
| 125 | w.set_rxlpitrcim(true) | ||
| 126 | }); | ||
| 127 | |||
| 128 | // disable all MMC TX interrupts | ||
| 129 | mac.mmc_tx_interrupt_mask().write(|w| { | ||
| 130 | w.set_txscolgpim(true); | ||
| 131 | w.set_txmcolgpim(true); | ||
| 132 | w.set_txgpktim(true); | ||
| 133 | w.set_txlpiuscim(true); | ||
| 134 | w.set_txlpitrcim(true); | ||
| 135 | }); | ||
| 136 | |||
| 119 | mtl.mtlrx_qomr().modify(|w| w.set_rsf(true)); | 137 | mtl.mtlrx_qomr().modify(|w| w.set_rsf(true)); |
| 120 | mtl.mtltx_qomr().modify(|w| w.set_tsf(true)); | 138 | mtl.mtltx_qomr().modify(|w| w.set_tsf(true)); |
| 121 | 139 | ||
