SirSydom
Posts: 31
Joined: Mon Jan 18, 2021 7:38 am

RP2040 with internal oszilator

Fri Jul 09, 2021 8:24 am

Hi,

what do you think about RP2040 without crystal?

When using in an environment whch is not so timing critical ?

like uart with 19200 baud.
what about usb (wenn using uf2 oder serial over usb).
I2C and SWD have their own clock..

that would save space on the PCB. I used SAMD21 a lot with internal oszilator never had problems.

jayben
Posts: 466
Joined: Mon Aug 19, 2019 9:56 pm

Re: RP2040 with internal oszilator

Fri Jul 09, 2021 8:37 am

See the RP2040 datasheet, section 2.17 "Ring Oscillator"

However, unlike the Atmel device, it has a very wide range of operation: "During boot the ROSC runs at a nominal 6.5MHz and is guaranteed to be in the range 1.8MHz to 12MHz" so it can't be used as a clock for serial or USB.

SirSydom
Posts: 31
Joined: Mon Jan 18, 2021 7:38 am

Re: RP2040 with internal oszilator

Fri Jul 09, 2021 8:56 am

yeah I read that (1.8 to 12MHz) - but I thought this wide range is while booting and I assumed, that this will stabilize later.

How does this work with the Bootloader? Does the Bootloader in the boot rom use external clock for its usb support?
and what happens when there is none?

Lobo-T
Posts: 111
Joined: Fri Jan 22, 2021 10:52 am

Re: RP2040 with internal oszilator

Fri Jul 09, 2021 10:03 am

I think you will have to program it via SWD if you are running without a crystal.

jdb
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 2733
Joined: Thu Jul 11, 2013 2:37 pm

Re: RP2040 with internal oszilator

Sun Jul 11, 2021 6:00 pm

SirSydom wrote:
Fri Jul 09, 2021 8:56 am
yeah I read that (1.8 to 12MHz) - but I thought this wide range is while booting and I assumed, that this will stabilize later.

How does this work with the Bootloader? Does the Bootloader in the boot rom use external clock for its usb support?
and what happens when there is none?
ROM bootloader + USB requires the presence of an external crystal. It initially uses the ring oscillator during the poweron sequence, but switches internally to crystal (if present).

See the bootrom source: https://github.com/raspberrypi/pico-boo ... ain.c#L100

It follows that trying to do USB boot on a device with no crystal will likely hang.
Rockets are loud.
https://astro-pi.org

SirSydom
Posts: 31
Joined: Mon Jan 18, 2021 7:38 am

Re: RP2040 with internal oszilator

Sun Jul 11, 2021 7:05 pm

ok, I'll forget that.

It's a pitty, cause that crystals need almost quarter of the space of rp2040 itself..

thanks.

cleverca22
Posts: 6823
Joined: Sat Aug 18, 2012 2:33 pm

Re: RP2040 with internal oszilator

Mon Jul 12, 2021 10:44 am

if there is some other cpu on the board/product, you can potentially generate a clock from there

the rpi is doing the same thing, instead of having a 25mhz crystal for the usb ethernet chip, it just generates a 25mhz clock on a gpio pin

Return to “General”