Arduino Nano 33 BLE Stops Execution After 8.5 Minutes ... - GitHub

Skip to content Dismiss alert {{ message }} / mbed-os Public
  • Notifications You must be signed in to change notification settings
  • Fork 3k
  • Star 4.8k
  • Code
  • Issues 194
  • Pull requests 14
  • Actions
  • Projects
  • Security

    Uh oh!

    There was an error while loading. Please reload this page.

  • Insights
Additional navigation options Arduino Nano 33 BLE stops execution after 8.5 minutes unless LPTICKER is disabled #15307New issueNew issueClosedClosedArduino Nano 33 BLE stops execution after 8.5 minutes unless LPTICKER is disabled#15307Labelscomponent: untriagedpriority: untriaged@drewmnoel

Description

@drewmnoeldrewmnoelopened on Jul 5, 2022

Description of defect

Arduino Nano 33 BLE (nRF52840 based) stops execution without error on stdout after about 8.5 minutes unless LPTICKER is disabled. With LPTICKER disabled (e.g. through target.device_has_remove), applications appear to run without issue, or at least for several hours.

Debugging with OpenOCD shows that after that time, breakpoints in the program do not execute. RTC interrupts continue to execute, and can be stepped through:

mbed-os/targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_NRF52/common_rtc.c

Lines 81 to 97 in 91b793c

void COMMON_RTC_IRQ_HANDLER(void)
#endif
{
rtc_ovf_event_check();
#if DEVICE_LPTICKER
if (nrf_rtc_event_pending(COMMON_RTC_INSTANCE, LP_TICKER_EVENT) ||
lp_ticker_interrupt_fire) {
if (lp_ticker_interrupt_fire) {
lp_ticker_interrupt_fire = false;
}
lp_ticker_irq_handler();
}
#endif
}

Hypothesis: since the nRF52840 uses an RTC with a 24-bit counter and frequency of 32768 Hz, the RTC overflow is at around 512 seconds (about 8.5 minutes), it's a possible culprit.

Target(s) affected by this defect ?

ARDUINO_NANO33BLE (which is nRF52840 based).

Bootloader information below from bossac:

Device : nRF52840-QIAA Version : Arduino Bootloader (SAM-BA extended) 2.0 [Arduino:IKXYZ] Address : 0x0 Pages : 256 Page Size : 4096 bytes Total Size : 1024KB

Toolchain(s) (name and version) displaying this defect ?

GCC_ARM, version 12.1.0

What version of Mbed-os are you using (tag or sha) ?

91b793c

What version(s) of tools are you using. List all that apply (E.g. mbed-cli)

  • mbed CLI 1.10.4, made a copy with mbed-tools v7.55.0 but the behavior is the same.
  • Arduino's bossa

How is this defect reproduced ?

Clone the sample project, remove the device_has_remove line from mbed_app.json and compile. Flash to board and execute. After approximately 8.5 minutes, the program appears to halt without any errors on the console line.

To remediate, re-add the device_has_remove line from mbed_app.json and do a fresh compile. Flash to board and execute. Application runs at least more than a few hours without issue.

Metadata

Metadata

Assignees

No one assigned

Labels

component: untriagedpriority: untriaged

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

You can’t perform that action at this time.

Tag » Arduino Nano 33 Ble Mbed Os