bug: Timer0 clock source set to external (T0CKI) instead of internal #30
Labels
No labels
bug
duplicate
enhancement
help wanted
invalid
question
wait-to-fix
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
daru/PICsense#30
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
OPTION_REG was set to 0b11111111, which sets TMR0CS=1 (external clock from RA4/T0CKI). RA4 is analog input, so no clock edge arrives and Timer0 never increments. ISR never fires, tx_done never asserts, transmit_packet hangs forever. Fix: set OPTION_REG = 0b11011111 to use internal Fosc/4 clock.
Fixed in PR #39: OPTION_REG corrected to 0b11011111 (TMR0CS=0, internal Fosc/4 clock).