Skip to content

Commit

Permalink
fix(systick): CVR reporting microseconds instead of cycles (#124)
Browse files Browse the repository at this point in the history
fixes #499

Co-authored-by: c1570 <[email protected]>
  • Loading branch information
c1570 and c1570 authored Mar 14, 2023
1 parent 4b038d5 commit c3690a1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/peripherals/ppb.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ export class RPPPB extends BasePeripheral implements Peripheral {
return countFlagValue | (this.systickControl & 0x7);
}
case SYST_CVR: {
const delta = (rp2040.clock.micros - this.systickLastZero) % (this.systickReload + 1);
const delta = (rp2040.core.cycles - this.systickLastZero) % (this.systickReload + 1);
if (!delta) {
return 0;
}
Expand Down

0 comments on commit c3690a1

Please sign in to comment.