A-Star 32u4 PWM Frequency Half Expected

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

Hello, Michael.

I am sorry you are having problems with your A-Star 32U4. It is not clear how you are setting the frequency for your PWM signal. Could you post the code you are using to set the PWM frequency? Could you also post screen captures of your oscilloscope?

By the way, the AVR on the A-Star 32U4 Prime LV does not operate at 3.3V. It operates at 5V and uses a 16Mhz crystal.

- Jeremy