Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

nrf_pwr_mgmt_run() crashes LDO on custom board?

I've been running into an issue when running examples from SDK 15.2 (S132 6.1.0) on a custom board that uses a Fanstel BC832 (uses 52832 soc) module.

At the moment I have not attached a lipo battery, and am only powering the board with a micro USB, which is regulated down to 3.3 volts.

I can flash any application without the function idle_state_handle(), which in turn calls nrf_pwr_mgmt_run().

Without calling this function, I have run multiple SDK examples, and never had any issues. When measuring voltage at the VDD pin on the module after flashing, I get a constant 3.3v, which is to be expected. The board advertises, and is connectable; no problems.

As soon as I un-comment idle_state_handle(), and re-flash the board, I will usually measure somewhere between 3.8-3.9v at the VDD pin while the board is running the firmware.

What's odd is that whenever I enable one of the LED's (I have one RGB LED), the voltage will immediately return to 3.3v. It doesn't matter which LED i turn on; using nrf_gpio_pin_clear(G_LED), turns on the LED and the voltage flips to 3.3 as long as the LED is on. As soon as i set the pin (turn off LED), the voltage will return back to around 3.9V.

I don't understand what could be going on. As a side note, I am using Segger to flash the board with SWD. The board will only advertise, when I choose Build and Debug, not when I use Build and Run. The same thing with, NRFGO studio; I flash successfully, yet the board won't advertise the application i just flashed. I am forced to Build and debug in Segger. Don't know if this has some kind of correlation.

Here are the schematics. I left out the vibration motor, buzzer, and buttons, as they are irrelevant. I haven't yet defined their pins in firmware. The blue LED is not connected.

All I have defined is LED1 as pin 11, and LED2 as pin 13, Like this:

#ifndef PCA10040_H
#define PCA10040_H

#ifdef __cplusplus
extern "C" {
#endif

#include "nrf_gpio.h"

// LEDs definitions for PCA10040
#define LEDS_NUMBER    2

#define LED_1          13
#define LED_2          11

#define LEDS_ACTIVE_STATE 0

#define LEDS_INV_MASK  LEDS_MASK

#define LEDS_LIST { LED_1, LED_2 }

#define BSP_LED_0      LED_1
#define BSP_LED_1      LED_2

#define BUTTONS_NUMBER 0

I haven't yet tested the DC DC converter.

Please let me know what could be happening.

Again to be short:

  • Flash board without idle_state_handle() ..... Board functions and advertises; Voltage will always remain at 3.3v, regardless if any LED is on or off
  • Flash board WITH idle_state_handle() ....... Board functions and advertises, yet Voltage will remain at ~3.8v until an LED is turned on using CLEAR. And as soon is that LED turns off, the voltage will return to the original ~3.8v
  • Can only flash board using Build and Debug in Segger, not Build and Run. The flash will succeed, but it won't advertise after the flash. Don't know if this is relevant though.
Parents Reply Children
Related