Open
Description
Hi! Delays are not correct.
sdcc 4.2.0 compiles your implemetation to this:
; src/delay.c:25: SAFE_MOD++; // 2 Fsys cycles, for higher Fsys, add operation here
mov a,_SAFE_MOD
inc a
mov _SAFE_MOD,a
and it is not 2 Fsys cycles, so f.e. DLY_ms(1000) at 24MHz becomes ~2+ secs. While this is more correct (about 1.200 secs at 24MHz) (as of Blinkinlabs or official SDK):
; src/delay.c:25: ++SAFE_MOD; // 2 Fsys cycles, for higher Fsys, add operation here
inc _SAFE_MOD
Thanks.
Metadata
Assignees
Labels
No labels
Activity