Skip to content

Commit be24079

Browse files
authored
Update timers.h
_RTC_PRESCALE_VALUE was defined as 0x05. It should be 0x28 as the bit position of the prescaler field in RTC.CTRLA is 3 bits over.
1 parent 0f883ad commit be24079

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

megaavr/cores/megatinycore/timers.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@
141141
#define TIME_TRACKING_TIMER_PERIOD (0xFFFF)
142142
#define TIME_TRACKING_TIMER_DIVIDER (32)
143143
#define MILLIS_INC (64000)
144-
#define _RTC_PRESCALE_VALUE (0x05)
144+
#define _RTC_PRESCALE_VALUE (0x28) //change from 0x05 to set prescaler to divide by 32, prescaler field is shifted by three bits. Alows millis()/delay() to run at correct speed.
145145
#else
146146
#error "Millis timer not specified, nor is millis disabled - can't happen!"
147147
#endif

0 commit comments

Comments
 (0)