pub fn stop(self) -> TwaiConfiguration<'d, Dm> {
        // Put the peripheral into reset/configuration mode by setting the reset mode
        // bit.
        self.regs().mode().modify(|_, w| w.reset_mode().set_bit());

        let mode = self.mode();

        let guard = PeripheralGuard::new(self.twai.peripheral());
        TwaiConfiguration {
            twai: self.twai,
            filter: None, // filter already applied, no need to restore it
            phantom: PhantomData,
            mode,
            _guard: guard,
        }
    }
Stop the peripheral, putting it into reset mode and enabling
reconfiguration.
esp-hal/src/twai/mod.rs