Fix #50: Enable core cycle counter
This commit is contained in:
@@ -892,7 +892,7 @@ shellmatta_retCode_t shell_cmd_cycle_count(const shellmatta_handle_t handle, con
|
||||
|
||||
|
||||
counter = main_cycle_counter_get();
|
||||
core_cycle_count = DWT->CYCCNT;
|
||||
core_cycle_count = core_cycle_counter_get();
|
||||
if (hex) {
|
||||
shellmatta_printf(handle, "Main loop: 0x%016"PRIX64"\r\n", counter);
|
||||
shellmatta_printf(handle, "CPU cycles: 0x%08"PRIX32"\r\n", core_cycle_count);
|
||||
@@ -901,8 +901,8 @@ shellmatta_retCode_t shell_cmd_cycle_count(const shellmatta_handle_t handle, con
|
||||
shellmatta_printf(handle, "CPU cycles: %"PRIu32"\r\n", core_cycle_count);
|
||||
}
|
||||
if (clear) {
|
||||
main_cycle_counter_init();
|
||||
DWT->CYCCNT = 0UL;
|
||||
main_cycle_counter_reset();
|
||||
core_cycle_counter_reset();
|
||||
}
|
||||
return SHELLMATTA_OK;
|
||||
}
|
||||
|
Reference in New Issue
Block a user