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

peripheral.rs

Blame
  • peripheral.rs 590 B
    #![no_std]
    #![no_main]
    
    #[macro_use]
    extern crate klee;
    
    #[cfg(not(feature = "klee-analysis"))]
    extern crate panic_abort;
    
    extern crate cortex_m;
    
    use core::ptr;
    use cortex_m::peripheral::Peripherals;
    
    #[no_mangle]
    fn main() {
        let peripherals = Peripherals::take().unwrap();
        let mut dwt = peripherals.DWT;
        dwt.enable_cycle_counter();
        // unsafe {
        //     dwt.ctrl.write(0);
        // }
        // if dwt.ctrl.read() == 0 {
        //     if dwt.ctrl.read() == 0 {
        //         klee::abort();
        //     };
        // };
    
        // unsafe {
        //     ptr::read_volatile(&dwt);
        // }
    }