I am doing direct programming of Timer3 (16-bit) on the ATmega32u4 processor, and set up 8-bit PWM mode with a clock prescaler of 1. With a 16 MHz system clock, I would expect a PWM frequency of 16 MHz / 1 / 256 (8-bit) = 62,500 Hz. Yet what I see on the scope is exactly half that, 32,500 Hz. That would seem to indicate an 8 MHz system clock.
This is the 5V model (SV) of the A-Star 32u4 Prime, so 16 MHz is definitely supported by the chip at this voltage. I did note from the 32u4 datasheet, however, that at 2.7V the max clock is 8 MHz, and note that the LV model of the A-Star 32u4 Prime (which runs at 3.3V) also seems to claim a 16 MHz clock, which would appear to be over-spec.
Anyone have any insight into what I am struggling with? Thanks!
- Michael