arduino / arduino/ArduinoCore-mbed

32khz Crystal and internal RC (u-blox BMD-380)

Open
#282 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C
Stars
411
Forks
225
PR merge metrics
No merged PRs in 30d

Description

I've been running the core on both a Nordic DK and recently a u-blox BMD-380 evaluation board as well as Nano 33 BLEs. All run without issues. I am now looking at running the BMD-380 part without the external 38khz crystal and instead using the internal oscillator for the low-frequency clock.

I have modified the mbed_app.json files to correctly set the clock source & associated defines, rebuilt the core and my application. If I run the application on the Nordic board (with the external crystal), the application runs fine and I can confirm that the LFCLK is the internal RC one.

If I run the application on the u-blox board (crystal now disconnected), it hangs in the PluggableUSB.begin() call in main.cpp. If I remove that call, my application boots and runs without further issue, but without any USB/Serial connection either.

It feels like there is still something in mbed or the ArduinoCore that is trying to use the external crystal. If I re-enable the PluggableUSB.begin() call, I also notice the the host machine can see the USB device, but it's not identified as a Arduino board. The bootloader has no problem running on the u-blox board, or identifying itself correctly as a Arduino to the host.

Any suggestions as to what I might have missed? Has anybody else tried running the core on SoC without an external crystal?

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the modified mbed_app.json files and main.cpp, focusing on the PluggableUSB.begin() call and the low-frequency clock configuration. Compare the BMD-380 and Nordic board configurations, then trace USB initialization with the external crystal disconnected. Done means the BMD-380 application boots and the host identifies its USB/Serial connection correctly while using the internal oscillator.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
embedded-iot
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.