diff options
author | 2021-08-14 19:42:25 +0000 | |
---|---|---|
committer | 2021-08-14 19:42:25 +0000 | |
commit | bb41983ad51a8d6bbde70507358b792cdbdbd3be (patch) | |
tree | 8e8ada068d35c953191eb101143ca8449b594c25 /src/call_asm.rs | |
parent | ea91f18004a408f763a7d11532cdc7e14c62d80c (diff) | |
parent | ba479bde8a55b88f9b5b77069f68081ffda171fd (diff) | |
download | cortex-m-bb41983ad51a8d6bbde70507358b792cdbdbd3be.tar.gz cortex-m-bb41983ad51a8d6bbde70507358b792cdbdbd3be.tar.zst cortex-m-bb41983ad51a8d6bbde70507358b792cdbdbd3be.zip |
Merge #349
349: Add support for additional DWT counters r=adamgreig a=newAM
This adds support for these DWT counters:
* CPI counter
* Exception overhead counter
* LSU counter
* Folded-instruction counter
The getters do not have the `get_` prefix per the [C-GETTER](https://rust-lang.github.io/api-guidelines/naming.html#c-getter) API guidelines. This does not match the existing `get_cycle_count` method. I was not sure if I should maintain consistency or not, let me know if you want this changed.
Here is the documentation to validate each of the added methods:
* [ARMv7-M DWT register summary](https://developer.arm.com/documentation/ddi0403/d/Debug-Architecture/ARMv7-M-Debug/The-Data-Watchpoint-and-Trace-unit/DWT-register-summary)
* [Control Register](https://developer.arm.com/documentation/ddi0403/d/Debug-Architecture/ARMv7-M-Debug/The-Data-Watchpoint-and-Trace-unit/Control-register--DWT-CTRL)
* `num_comp`
* [ARMv6-M DWT register summary](https://developer.arm.com/documentation/ddi0419/c/Debug-Architecture/ARMv6-M-Debug/The-Data-Watchpoint-and-Trace-unit/DWT-register-summary)
* The `num_comp` method is not guarded with `#[cfg(not(armv6m))]` because it is valid for both.
* `has_exception_trace`
* `has_external_match`
* `has_cycle_counter`
* `has_profiling_counter`
* `disable_cycle_counter`
* `cycle_counter_enabled`
* [CPI count register](https://developer.arm.com/documentation/ddi0403/d/Debug-Architecture/ARMv7-M-Debug/The-Data-Watchpoint-and-Trace-unit/CPI-Count-register--DWT-CPICNT)
* `cpi_count`
* `set_cpi_count`
* [Exception Overhead Count register](https://developer.arm.com/documentation/ddi0403/d/Debug-Architecture/ARMv7-M-Debug/The-Data-Watchpoint-and-Trace-unit/Exception-Overhead-Count-register--DWT-EXCCNT)
* `exception_count`
* `set_exception_count`
* [Sleep Count register](https://developer.arm.com/documentation/ddi0403/d/Debug-Architecture/ARMv7-M-Debug/The-Data-Watchpoint-and-Trace-unit/Sleep-Count-register--DWT-SLEEPCNT)
* `sleep_count`
* `set_sleep_count`
* [LSU Count register](https://developer.arm.com/documentation/ddi0403/d/Debug-Architecture/ARMv7-M-Debug/The-Data-Watchpoint-and-Trace-unit/LSU-Count-register--DWT-LSUCNT)
* `lsu_count`
* `set_lsu_count`
* [Folded-instruction Count register](https://developer.arm.com/documentation/ddi0403/d/Debug-Architecture/ARMv7-M-Debug/The-Data-Watchpoint-and-Trace-unit/Folded-instruction-Count-register--DWT-FOLDCNT)
* `fold_count`
* `set_fold_count`
Co-authored-by: Alex Martens <alexmgit@protonmail.com>
Diffstat (limited to 'src/call_asm.rs')
0 files changed, 0 insertions, 0 deletions