Skip to content

Add support for use with "Nordic Semiconductor nRF5 Boards" platform #3

Open
@kriswiner

Description

@kriswiner

I am using the Nordic Semiconductor nRF5 Boards platform with a custom nRF52 dev board. I tried to compile one of the simple timed low power examples and I am getting a couple of compile errors:

C:\Users\kris\AppData\Local\Temp\arduino_build_473580\sketch\serial_example.ino.cpp.o: In function `ArduinoLowPowerClass::sleep(int)':

C:\Users\kris\AppData\Local\Temp\arduino_build_473580\sketch/ArduinoLowPower.h:43: undefined reference to `LowPower'

C:\Users\kris\AppData\Local\Temp\arduino_build_473580\sketch/ArduinoLowPower.h:43: undefined reference to `ArduinoLowPowerClass::sleep(unsigned long)'

looks like I am missing the LowPower C module; where am I supposed to get this?

Edit:

Got it to compile by commenting out one line in the .h file:

void sleep(void);
//    void sleep(uint32_t millis);
void sleep(int millis) {
  sleep((uint32_t)millis);
}

not sure why this should matter.

Ran the timed wakeup example, but the device never wakes from sleep mode. The led remains on. If I comment out the lowPower.sleep(2000); call the led blinks, of course.

Good news is the power drops by 5 mA, which is great, but I need the device to wake up. Is it possible the RTC is not functioning on my nRF52, or that I need to attach an interrupt? Somewhat confused at this point why the simplest example doesn't just work...

And tried the wake from external example and it won't compile again with these kinds of errors:

C:\Users\kris\AppData\Local\Temp\arduino_build_385961\sketch\LowPower_externalGPIO_example.ino.cpp.o: In function `setup':

C:\Users\kris\Documents\Arduino\LowPower_externalGPIO_example/LowPower_externalGPIO_example.ino:28: undefined reference to `ArduinoLowPowerClass::attachInterruptWakeup(unsigned long, void (*)(), unsigned long)'

C:\Users\kris\AppData\Local\Temp\arduino_build_385961\sketch\LowPower_externalGPIO_example.ino.cpp.o: In function `loop':

C:\Users\kris\Documents\Arduino\LowPower_externalGPIO_example/LowPower_externalGPIO_example.ino:40: undefined reference to `ArduinoLowPowerClass::sleep()'

Metadata

Metadata

Assignees

No one assigned

    Labels

    topic: codeRelated to content of the project itselftype: enhancementProposed improvement

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions