tabemann / zeptoforth

A not-so-small Forth for Cortex-M
MIT License
192 stars 18 forks source link

RP2040 USB PLL settings #79

Closed pkoning2 closed 11 months ago

pkoning2 commented 11 months ago

I was reading the RP2040 initialization code in src/rp2040/hardware.s and noticed something: the USB PLL is configured for a VCO frequency of 480 MHz. The RP2040 data sheet says the VCO frequency is supposed to be between 750 and 1600 MHz. I have not seen problems from this, but I wonder if it would make sense to change the code to conform to the data sheet requirements. For example, doubling the PLL frequency would do, that would mean PLL_FBDIV would be 80 rather than 40, and PLL_POSTDIV2 would be 4 rather than 2.

tabemann commented 11 months ago

Thanks for catching this! I overlooked this when I got the code from its original author. I will make the changes when I come home from work today.

tabemann commented 11 months ago

I have fixed this issue, and you can get the latest, build 1.3.3.2, from here.

pkoning2 commented 11 months ago

Looks good, thanks!