diff --git a/examples/rtic-stm32/.cargo/config b/examples/rtic-stm32/.cargo/config
new file mode 100644
index 00000000..617fbf74
--- /dev/null
+++ b/examples/rtic-stm32/.cargo/config
@@ -0,0 +1,10 @@
+[target.'cfg(all(target_arch = "arm", target_os = "none"))']
+runner = "probe-rs run --chip STM32F429ZITx"
+rustflags = [
+ "-C", "link-arg=-Tlink.x",
+ "-C", "link-arg=-Tdefmt.x",
+]
+
+
+[build]
+target = "thumbv7em-none-eabi"
diff --git a/examples/rtic-stm32/.gitignore b/examples/rtic-stm32/.gitignore
new file mode 100644
index 00000000..2c96eb1b
--- /dev/null
+++ b/examples/rtic-stm32/.gitignore
@@ -0,0 +1,2 @@
+target/
+Cargo.lock
diff --git a/examples/rtic-stm32/Cargo.toml b/examples/rtic-stm32/Cargo.toml
new file mode 100644
index 00000000..0ef2919d
--- /dev/null
+++ b/examples/rtic-stm32/Cargo.toml
@@ -0,0 +1,28 @@
+[package]
+version = "0.1.0"
+name = "stm32-rtic"
+edition = "2021"
+resolver = "2"
+
+[dependencies]
+volatile-register = "0.2"
+aligned = "0.4"
+stm32f4xx-hal = { version = "0.14", features = ["stm32f429"] }
+stm32f4 = { version = "0.15" }
+ieee802_3_miim = "0.8"
+defmt = { version = "0.3" }
+futures = { version = "0.3", default-features = false, features = [
+ "async-await",
+] }
+cortex-m = { version = "0.7", features = ["critical-section-single-core"] }
+cortex-m-rt = "0.7"
+fugit = "0.3"
+defmt-rtt = "0.4"
+panic-probe = { version = "0.3", features = ["print-defmt"] }
+systick-monotonic = "1.0"
+rtic = { version = "2.0.1", features = ["thumbv7-backend"] }
+stm32-eth = { version = "0.5.2", default-features = false, features = ["defmt", "stm32f429", "async-await"] }
+
+[profile.release]
+debug = 2
+lto = true
diff --git a/examples/rtic-stm32/rust-toolchain.toml b/examples/rtic-stm32/rust-toolchain.toml
new file mode 100644
index 00000000..2fefb806
--- /dev/null
+++ b/examples/rtic-stm32/rust-toolchain.toml
@@ -0,0 +1,4 @@
+[toolchain]
+channel = "nightly"
+components = ["llvm-tools"]
+targets = ["thumbv7em-none-eabi"]
diff --git a/examples/rtic-stm32/src/common.rs b/examples/rtic-stm32/src/common.rs
new file mode 100644
index 00000000..fde8288e
--- /dev/null
+++ b/examples/rtic-stm32/src/common.rs
@@ -0,0 +1,284 @@
+//! Common features used in examples.
+//!
+//! Note that this module isn't an example by itself.
+
+use defmt_rtt as _;
+use panic_probe as _;
+
+use stm32_eth::{
+ hal::{
+ gpio::{GpioExt, *},
+ rcc::Clocks,
+ },
+ EthPins, PartsIn,
+};
+
+use fugit::RateExtU32;
+use stm32_eth::hal::rcc::RccExt;
+
+/// Setup the clocks and return clocks and a GPIO struct that
+/// can be used to set up all of the pins.
+///
+/// This configures HCLK to be at least 25 MHz, which is the minimum required
+/// for ethernet operation to be valid.
+pub fn setup_peripherals(p: stm32_eth::stm32::Peripherals) -> (Clocks, Gpio, PartsIn) {
+ let ethernet = PartsIn {
+ dma: p.ETHERNET_DMA,
+ mac: p.ETHERNET_MAC,
+ mmc: p.ETHERNET_MMC,
+ #[cfg(feature = "ptp")]
+ ptp: p.ETHERNET_PTP,
+ };
+
+ let rcc = p.RCC.constrain();
+
+ let clocks = rcc.cfgr.sysclk(96.MHz()).hclk(96.MHz());
+
+ #[cfg(feature = "stm32f4xx-hal")]
+ let clocks = {
+ if cfg!(hse = "bypass") {
+ clocks.use_hse(8.MHz()).bypass_hse_oscillator()
+ } else if cfg!(hse = "oscillator") {
+ clocks.use_hse(8.MHz())
+ } else {
+ clocks
+ }
+ };
+
+ #[cfg(feature = "stm32f7xx-hal")]
+ let clocks = {
+ if cfg!(hse = "bypass") {
+ clocks.hse(stm32_eth::hal::rcc::HSEClock::new(
+ 8.MHz(),
+ stm32_eth::hal::rcc::HSEClockMode::Bypass,
+ ))
+ } else if cfg!(hse = "oscillator") {
+ clocks.hse(stm32_eth::hal::rcc::HSEClock::new(
+ 8.MHz(),
+ stm32_eth::hal::rcc::HSEClockMode::Oscillator,
+ ))
+ } else {
+ clocks
+ }
+ };
+
+ let clocks = clocks.freeze();
+
+ let gpio = Gpio {
+ gpioa: p.GPIOA.split(),
+ gpiob: p.GPIOB.split(),
+ gpioc: p.GPIOC.split(),
+ gpiog: p.GPIOG.split(),
+ };
+
+ (clocks, gpio, ethernet)
+}
+
+pub struct Gpio {
+ pub gpioa: gpioa::Parts,
+ pub gpiob: gpiob::Parts,
+ pub gpioc: gpioc::Parts,
+ pub gpiog: gpiog::Parts,
+}
+
+pub type RefClk = PA1;
+pub type Crs = PA7;
+pub type TxD1 = PB13;
+pub type RxD0 = PC4;
+pub type RxD1 = PC5;
+
+#[cfg(not(pins = "nucleo"))]
+pub type TxEn = PB11;
+#[cfg(not(pins = "nucleo"))]
+pub type TxD0 = PB12;
+
+#[cfg(pins = "nucleo")]
+pub type TxEn = PG11;
+#[cfg(pins = "nucleo")]
+pub type TxD0 = PG13;
+
+pub type Mdio = PA2>;
+pub type Mdc = PC1>;
+
+#[cfg(not(pps = "alternate"))]
+pub type Pps = PB5