Skip to content
Snippets Groups Projects
Select Git revision
  • c24284b1088ad9e904277ebb87dbe722ec8f8bc3
  • master default protected
  • v5
  • stable
4 results

systick.rs

Blame
  • systick.rs 385 B
    #![no_std]
    #![no_main]
    
    extern crate cortex_m;
    extern crate klee;
    extern crate panic_abort;
    
    use cortex_m::peripheral::Peripherals;
    
    #[no_mangle]
    fn main() {
        // access to core peripherals
        let peripherals = Peripherals::take().unwrap();
        let syst = peripherals.SYST;
    
        if syst.rvr.read() == 0 {
            if syst.cvr.read() == 0x21 {
                panic!();
            }
        }
    }