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
  • Hi,

     

    That is great! The module does indeed have a 32 MHz xtal in-place.

    Bk37 said:
    Should USB still will under this layout? As far as my research tells me, if the 32 MHz crystal would suffice for USB, it would be automatic, like it's automatic when a 32 KHz crystal is connection.

    R30 and R31 should be 0-ohm, as the resistors are internal to the nRF.

    Other than that, I do not see any issues.

     

    XTAL will be requested by the driver itself, so no worries there.

     

    To select internal 32k RC oscillator for your LFCLK, please append this option to your project:

    CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y

      

    Kind regards,

    Håkon

Children
Related