# \[Solved\] Peripheral power / brownout / bootloader / PSM

**URL:** <https://discuss.cubepilot.org/t/solved-peripheral-power-brownout-bootloader-psm/748>\
**Category:** Cube Autopilot\
**Created:** [3 May 2019 13:27 UTC](https://discuss.cubepilot.org/t/solved-peripheral-power-brownout-bootloader-psm/748 "2019-05-03T13:27:23Z")\
**Posts on this page:** 13\
**Page:** 2

<div class="post-metadata">

**Author:** ![ekliptiko](https://discuss.cubepilot.org/letter_avatar_proxy/v4/letter/e/c77e96/32.png) [@ekliptiko](https://discuss.cubepilot.org/u/ekliptiko)\
**Post date:** [8 May 2019 21:54 UTC](https://discuss.cubepilot.org/t/solved-peripheral-power-brownout-bootloader-psm/748/21 "2019-05-08T21:54:10Z")

</div>

Does it behave differently if you apply the load AFTER power up?

---

<div class="post-metadata">

**Author:** ![Anubis](https://discuss.cubepilot.org/user_avatar/discuss.cubepilot.org/anubis/32/334_2.png) [@Anubis](https://discuss.cubepilot.org/u/Anubis)\
**Post date:** [9 May 2019 18:24 UTC](https://discuss.cubepilot.org/t/solved-peripheral-power-brownout-bootloader-psm/748/22 "2019-05-09T18:24:06Z")

</div>

In my case, no. It can happen regardless of when the load is applied.

I haven’t been able to correlate the time-to-failure with any factors, such as hot start vs. cold start. The issue often appears between 5 and 15 minutes after boot/load applied, but it seems quite random; I’ve had it happen immediately after applying the load, or never (left it overnight).

---

<div class="post-metadata">

**Author:** ![ekliptiko](https://discuss.cubepilot.org/letter_avatar_proxy/v4/letter/e/c77e96/32.png) [@ekliptiko](https://discuss.cubepilot.org/u/ekliptiko)\
**Post date:** [9 May 2019 20:28 UTC](https://discuss.cubepilot.org/t/solved-peripheral-power-brownout-bootloader-psm/748/23 "2019-05-09T20:28:59Z")

</div>

Is it possible this is not a new issue? Here is a thread in the archive over at [ardupilot.org](http://ardupilot.org), referencing low/no voltage on peripherals using a similar bq2431x component, but i assume back on legacy pixhawk and the user reports a crash, so maybe it was physically damaged:

> **[Peripherals not powered after crash](https://discuss.ardupilot.org/t/peripherals-not-powered-after-crash/5823)**
>
> Hi, I had a crash last week with my quad and although it was not too violent and my (3DR) Pixhawk was mounted on a soft foam I think one part of the power circuit was broken. Now my 3DR Lea6H + Compass is weakly powered (led is weak, no GPS fix...

… And there’s another current thread over there in the /hardware/pixhawk section with no power:

> **[The latest firmware for Cube has a problem with the VDD\_5V\_PERIPH\_EN Pin?](https://discuss.ardupilot.org/t/the-latest-firmware-for-cube-has-a-problem-with-the-vdd-5v-periph-en-pin/42191)**
>
> GPS, I2C does no have Power, because the Enable Pin for VDD\_5V\_Periph is low. I have opened the Cube and measured this line. I make a compare to the other Enable-Pins. What is the reason for this? Any Ideas? The System i have is chibios and...

---

<div class="post-metadata">

**Author:** ![Anubis](https://discuss.cubepilot.org/user_avatar/discuss.cubepilot.org/anubis/32/334_2.png) [@Anubis](https://discuss.cubepilot.org/u/Anubis)\
**Post date:** [9 May 2019 20:51 UTC](https://discuss.cubepilot.org/t/solved-peripheral-power-brownout-bootloader-psm/748/24 "2019-05-09T20:51:10Z")

</div>

For what it’s worth, we have never experienced this issue before (100+ units). It only started happening recently, and on multiple units, so it seems to be a new issue to us.

---

<div class="post-metadata">

**Author:** ![Morso](https://discuss.cubepilot.org/user_avatar/discuss.cubepilot.org/morso/32/4661_2.png) [@Morso](https://discuss.cubepilot.org/u/Morso)\
**Post date:** [10 May 2019 06:59 UTC](https://discuss.cubepilot.org/t/solved-peripheral-power-brownout-bootloader-psm/748/25 "2019-05-10T06:59:20Z")

</div>

The PSM seems to start regulating even on low currents if the reset was not done properly.  
A 300mA load is enough on long time periods (15-20mins).

> [@Anubis](#):
>
> I haven’t been able to correlate the time-to-failure with any factors, such as hot start vs. cold start

Do you have varying load on the power bus? Using constant resistive load makes this issue quite repetitive and easy to replicate.

---

<div class="post-metadata">

**Author:** ![philip](https://discuss.cubepilot.org/user_avatar/discuss.cubepilot.org/philip/32/9035_2.png) [@philip](https://discuss.cubepilot.org/u/philip)\
**Post date:** [10 May 2019 07:40 UTC](https://discuss.cubepilot.org/t/solved-peripheral-power-brownout-bootloader-psm/748/26 "2019-05-10T07:40:12Z")

</div>

Issue found, Tridge is doing a patch for this as we speak 🙂

Once he has a firmware, are any of you guys willing to bench test it?

---

<div class="post-metadata">

**Author:** ![philip](https://discuss.cubepilot.org/user_avatar/discuss.cubepilot.org/philip/32/9035_2.png) [@philip](https://discuss.cubepilot.org/u/philip)\
**Post date:** [10 May 2019 08:27 UTC](https://discuss.cubepilot.org/t/solved-peripheral-power-brownout-bootloader-psm/748/27 "2019-05-10T08:27:15Z")

</div>

PR here: [https://github.com/ArduPilot/ardupilot/pull/11319](https://github.com/ArduPilot/ardupilot/pull/11319)

---

<div class="post-metadata">

**Author:** ![Anubis](https://discuss.cubepilot.org/user_avatar/discuss.cubepilot.org/anubis/32/334_2.png) [@Anubis](https://discuss.cubepilot.org/u/Anubis)\
**Post date:** [10 May 2019 17:52 UTC](https://discuss.cubepilot.org/t/solved-peripheral-power-brownout-bootloader-psm/748/28 "2019-05-10T17:52:58Z")

</div>

Great, thanks. I will start testing it.

> [@Morso](#):
>
> Do you have varying load on the power bus? Using constant resistive load makes this issue quite repetitive and easy to replicate.

Not yet, but soon I will have the equipment to start making more scientific measurements. Will test old and new firmware with various loads.

---

<div class="post-metadata">

**Author:** ![Morso](https://discuss.cubepilot.org/user_avatar/discuss.cubepilot.org/morso/32/4661_2.png) [@Morso](https://discuss.cubepilot.org/u/Morso)\
**Post date:** [13 May 2019 07:15 UTC](https://discuss.cubepilot.org/t/solved-peripheral-power-brownout-bootloader-psm/748/29 "2019-05-13T07:15:24Z")

</div>

PSM is reset properly now on every reboot. The Power enable is pulled high for 107 ms, should be 100 ms? However that should not be a problem?

PSM works now like it is specified to work.

---

<div class="post-metadata">

**Author:** ![philip](https://discuss.cubepilot.org/user_avatar/discuss.cubepilot.org/philip/32/9035_2.png) [@philip](https://discuss.cubepilot.org/u/philip)\
**Post date:** [13 May 2019 16:22 UTC](https://discuss.cubepilot.org/t/solved-peripheral-power-brownout-bootloader-psm/748/30 "2019-05-13T16:22:20Z")

</div>

Awesome!  
How ironic is it, that making code more efficient can cause an issue like this!

Glad it’s better

---

<div class="post-metadata">

**Author:** ![Anubis](https://discuss.cubepilot.org/user_avatar/discuss.cubepilot.org/anubis/32/334_2.png) [@Anubis](https://discuss.cubepilot.org/u/Anubis)\
**Post date:** [14 May 2019 01:53 UTC](https://discuss.cubepilot.org/t/solved-peripheral-power-brownout-bootloader-psm/748/31 "2019-05-14T01:53:46Z")

</div>

My experiments:  
Attached a load that pulls ~0.8A on the I2C 2 port. Ran trials that consist of powering the Cube Black, waiting ~5 minutes for the current to be limited (or not), then un-power the Cube.

Copter 3.5.7 NuttX: Problem appeared 37/50 trials.  
Copter 3.6.2 ChibiOS (and later): 0/30 trials.  
Copter 3.6.8 with above PR: 0/10 trials.

It seems that, at least for this specimen, the problem had already been solved by Copter 3.6.x, I guess it gets hidden by different timing on ChibiOS boot, so I can’t really test the PR with this particular Cube. We have blue cubes on hand, I’ll see if I can reproduce it with them.

To me, the mystery is why this suddenly started happening. We’ve flown 3.5.7 since its release and only had this issue appear lately, which suggests a hardware change. It won’t be an issue once we finish migrating to 3.6 (assuming the PR fixes it), but the sudden and inexplicable onset was a bit jarring. Glad @Morso was able to dive into it deeper than I could.

---

<div class="post-metadata">

**Author:** ![philip](https://discuss.cubepilot.org/user_avatar/discuss.cubepilot.org/philip/32/9035_2.png) [@philip](https://discuss.cubepilot.org/u/philip)\
**Post date:** [14 May 2019 03:30 UTC](https://discuss.cubepilot.org/t/solved-peripheral-power-brownout-bootloader-psm/748/32 "2019-05-14T03:30:56Z")

</div>

The change is the bootloader.

---

<div class="post-metadata">

**Author:** ![ekliptiko](https://discuss.cubepilot.org/letter_avatar_proxy/v4/letter/e/c77e96/32.png) [@ekliptiko](https://discuss.cubepilot.org/u/ekliptiko)\
**Post date:** [3 June 2019 15:27 UTC](https://discuss.cubepilot.org/t/solved-peripheral-power-brownout-bootloader-psm/748/33 "2019-06-03T15:27:23Z")

</div>

Is this new bootloader included in 3.6.9? If not - How does someone install it?

[Previous page](https://discuss.cubepilot.org/t/solved-peripheral-power-brownout-bootloader-psm/748.md?page=1)
