Skip to content
This repository was archived by the owner on Jan 29, 2023. It is now read-only.
This repository was archived by the owner on Jan 29, 2023. It is now read-only.

RP2040_RTC_Time crashes Pico, does not work #3

@maxgerhardt

Description

@maxgerhardt

Describe the bug

Using the https://github.com/khoih-prog/RP2040_RTC/tree/main/examples/Time/RP2040_RTC_Time example on a Raspberry Pi Pico does not work.

Steps to Reproduce

Open the https://github.com/khoih-prog/RP2040_RTC/tree/main/examples/Time/RP2040_RTC_Time example, set the board to "Arduino Mbed OS RP2040 boards" -> Raspberry Pi Pico, compile and uplaod the sketch. Observe the serial monitor.

Expected behavior

The sketch sets the current RTC time as dictated by currTime = { 2021, 9, 30, 4, 4, 0, 0 }; and prints the current time on the serial monitior.

Actual behavior

Hangup after the sketch outputs

Start RP2040_RTC_Time on MBED RASPBERRY_PI_PICO RP2040_RTC v1.0.6 Timezone_Generic v1.7.1 

In fact when adding a few print statements in setup() as

 Serial.println("Creating new timezone.."); Serial.flush(); myTZ = new Timezone(myDST, mySTD); // Start the RTC Serial.println("rtc_init().."); Serial.flush(); rtc_init(); Serial.println("rtc_set_datetime().."); Serial.flush(); rtc_set_datetime(&currTime);

The serial monitor outputs

Start RP2040_RTC_Time on MBED RASPBERRY_PI_PICO RP2040_RTC v1.0.6 Timezone_Generic v1.7.1 Creating new timezone.. 

hinting at that it did not survive the line myTZ = new Timezone(myDST, mySTD);.

After that, the on-board LED goes into a fast blinking pattern, meaning the board has landed in mbed_die() after a fatal error.

Debug and AT-command log (if applicable)

See above.

Screenshots

None.

Information

  • Arduino IDE version: 1.8.13
  • RP2040 Core Version: Arduino-mbed RP2040 v2.5.2 (latest)
  • RP2040 Board type: RASPBERRY_PI_PICO
  • Contextual information (e.g. what you were trying to achieve): Run the simplest library exaemple
  • Simplest possible steps to reproduce: Done per above
  • Anything that might be relevant in your opinion, such as:
    • Operating system: Windows 10 x64

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions