Skip to content

Commit c3690a1

Browse files
authored
fix(systick): CVR reporting microseconds instead of cycles (#124)
fixes #499 Co-authored-by: c1570 <c1570@users.noreply.github.com>
1 parent 4b038d5 commit c3690a1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/peripherals/ppb.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ export class RPPPB extends BasePeripheral implements Peripheral {
121121
return countFlagValue | (this.systickControl & 0x7);
122122
}
123123
case SYST_CVR: {
124-
const delta = (rp2040.clock.micros - this.systickLastZero) % (this.systickReload + 1);
124+
const delta = (rp2040.core.cycles - this.systickLastZero) % (this.systickReload + 1);
125125
if (!delta) {
126126
return 0;
127127
}

0 commit comments

Comments
 (0)