Skip to content
  • David Brownell's avatar
    Cortex-M3: expose most DWT registers · 16b4b8cf
    David Brownell authored
    
    
    Expose most DWT registers via Tcl; there are a few more, but
    those are mostly for profiling along with the ITM.  Having
    this set available enables operations which aren't possible
    with just the standard watchpoint operations.
    
    The cycle counter may be interesting.  Turn it on after reset
    by setting the LSB of the dwt_ctrl register, and it counts
    CPU clocks.  You can program the comparator 0 watchpoint to
    trigger on a given cycle count, rather than a data address.
    
    Likewise, comparator 1 may be able to match data values given
    address matches from one or two other comparators.  (Not all
    hardware supports this capability though; try it.  That is
    something the standard watchpoint methods should eventually
    handle, for the single address case.)
    
    Minor cleanup:  remove needless functional indirection for
    exposing the v7m architctural registers.
    
    Signed-off-by: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
    16b4b8cf