What exactly is required to run USB on an nRF52840 without an external crystal?

Long story short, I trusted the datasheet (big mistake) where it says an external crystal is optional. In previous builds, I had an external crystal onboard anyway, so this issue never arose, but now I don't want an external crystal, but it turns out the "optional" marking in the datasheet really means "there's no easy way to do this, oh ya, and no clear guide either".

1. I have no external crystal oscillator, how can I use USB as an HID device still?

2. Can I still use BLE reliably without the external crystal? I'm depending on 7.5ms intervals, 16 Kb/s throughput.

Please don't paste minute code snippets without telling me where to paste them. Thank you!

Parents Reply Children
  • Hi,

     

    Bk37 said:
    One last question as an aside, I assume that BLE will still require a 32.768 KHz external crystal, correct? Or is there a way to make BLE work with this configuration as well? I can open a new question thread if necessary, just curious.

    BLE does indeed require a LFCLK source, but it does not need to be a physical crystal.

    You can use the 32k RC oscillator for this.

     

    This is already handled with your previous setting of the LF clk source:

    CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y

     So if you want to evaluate some bluetooth-samples, remember to include this configuration in addition to your DCDC-config.

     

    Kind regards,

    Håkon

Related