Skip to content

cores: fix the sim_megax.h timer 2 prescaler table - #606

Merged
gatk555 merged 1 commit into
buserror:masterfrom
teknoman117:megax-timer2-clk32
Nov 19, 2026
Merged

gatk555 merged 1 commit into
buserror:masterfrom
teknoman117:megax-timer2-clk32

Conversation

@teknoman117

@teknoman117 teknoman117 commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

The clock prescaler table in sim_megax.h for timer 2 incorrectly defines a division of 24 (16) rather than 25 (32). This results in it running at twice the expected for CS2[2:0] = b'011.

Timer/Counter2 Clock Select Bit Tables:

ATmega8 datasheet page 116 Table 46: CS2 011 is clkT2S/32.
@teknoman117 teknoman117 changed the title cores: fix the megax Timer 2 CLK/32 divider cores: fix the sim_megax.h timer 2 prescaler table Nov 16, 2026
@gatk555
gatk555 merged commit 13d4ed3 into buserror:master Nov 19, 2026
7 of 8 checks passed
@teknoman117
teknoman117 deleted the megax-timer2-clk32 branch November 19, 2026 18:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants