guild icon
Toit
#Brown out after Jaguar update
Thread channel in help
kaxori
kaxori 11/03/2023 10:08 PM
Chip is ESP32-D0WDQ6-V3 (revision v3.0)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
Crystal is 40MHz

After jaguar update (from V ~1.13 to 1.18) the device reports brown out instead of deep sleep.
(ESP-RST-BROWNOUT ::= 9 // Brownout reset (software or hardware).

-----
Version: v1.12.0
SDK version: v2.0.0-alpha.99
Build date: 2023-09-07T13:53:42Z
runs properly
-----

Any suggestions ?
(edited)
bitphlipphar
bitphlipphar 11/04/2023 09:04 AM
Are you sure the device is getting enough power? Do you have any way of measuring that?
kaxori
kaxori 11/04/2023 11:48 AM
yes, it works in the same condition with V1.12
floitsch
floitsch 11/04/2023 02:33 PM
Can you provide a bit more context?
From what I understand:
- you call deep sleep, but
- the device wakes up and claims that it experienced a brownout, instead of a regular deep-sleep).
Correct?
floitsch
floitsch 11/04/2023 02:36 PM
We had the brownout detector disabled in earlier versions.
It was enabled in https://github.com/toitlang/toit/pull/1795 (September 6)
(edited)
floitsch
floitsch 11/04/2023 02:36 PM
I'm guessing Jaguar 1.13 was released before then.
floitsch
floitsch 11/04/2023 02:39 PM
To me this looks like the ESP32 is indeed detecting a brownout, and we just didn't report it before.
There are some boards that are known to have brownout issues. Could you tell us which board you use?
Independently: if you want to continue running without brownout detection, we (or you) can create an envelope that has that feature disabled. The https://github.com/toitlang/envelopes repository has multiple variants, and is designed to be forked. Iirc we finished the work in Jaguar to fetch envelopes from custom forked envelope repositories.
Toit envelopes for different configurations. Contribute to toitlang/envelopes development by creating an account on GitHub.
kaxori
kaxori 11/04/2023 08:57 PM
Board: ESP32 D1 mini (WROOM)
floitsch
floitsch 11/04/2023 08:58 PM
Wemos?
๐Ÿ‘๐Ÿป1
kaxori
kaxori 11/04/2023 08:59 PM
with Jag V1.12 the device wakeup code 08
with newer V device wakep code 09 (brown out)
floitsch
floitsch 11/04/2023 09:00 PM
The brownout detector was disabled a few releases ago.
floitsch
floitsch 11/04/2023 09:01 PM
Is it an az-delivery board?
๐Ÿ‘๐Ÿป1
floitsch
floitsch 11/04/2023 09:01 PM
I remember those had a regulator that wasn't strong enough
floitsch
floitsch 11/04/2023 09:02 PM
kaxori
kaxori 11/04/2023 09:11 PM
floitsch
floitsch 11/04/2023 09:13 PM
Maybe see if you can figure out which regulator is on that board.
kaxori
kaxori 11/04/2023 10:10 PM
- onboard regulator removed
- replaced with external regulator
- updated to V1.18
(edited)
kaxori
kaxori 11/04/2023 10:10 PM
- application runs without problems (brown outs)
kaxori
kaxori 11/04/2023 10:11 PM
Thank you for the right hint !
kaxori
kaxori 11/04/2023 10:22 PM
kaxoriOPkaxori
- onboard regulator removed - replaced with external regulator - updated to V1.18(edited)
floitsch
floitsch 11/04/2023 11:49 PM
Nice. Removing the regulator is not something a lot of people would be able to do.
kaxori
kaxori 11/05/2023 10:14 AM
Label: almost DEAD ?:๐Ÿค”:(edited)
kaxori
kaxori 11/05/2023 10:15 AM
max 300 mA
kaxori
kaxori 11/05/2023 10:17 AM
(they had it in mind already at design time :๐Ÿ˜‚: )
floitsch
floitsch 11/05/2023 10:19 AM
From what I can find online, 300mA might not be enough.
floitsch
floitsch 11/05/2023 10:19 AM
Overview: Power Supply for ESP32 In this tutorial, we will learn how we can make Power Supply for ESP32 Board. We will also integrate a Battery Booster or
floitsch
floitsch 11/05/2023 10:20 AM
That said, I think these are peaks. So a capacitor should help a lot.
kaxori
kaxori 11/05/2023 10:28 AM
floitsch
floitsch 11/05/2023 10:47 AM
I'm not an expert in these, but I think that should work. It's probably even overpowered.
Rikke
Rikke 11/06/2023 07:37 AM
In v2.0.0-alpha.117 with jaguar v1.17.0 i've also started to see brown outs.
Rikke
Rikke 11/06/2023 07:37 AM
No changes to hardware, and ive never seen it before updating
Rikke
Rikke 11/06/2023 07:40 AM
But as far as i can see, it only happens in our power on/off test of the device.
bmentink
bmentink 11/08/2023 02:27 AM
In my product I have a 500mA continuous switchmode reg, is 500mA enough? I have lot's of capacitance on the output .. just wondering, as every 3 or 4 days get an unexplained reset.
bmentinkbmentink
In my product I have a 500mA continuous switchmode reg, is 500mA enough? I have lot's of capacitance on the output .. just wondering, as every 3 or 4 days get an unexplained reset.
floitsch
floitsch 11/08/2023 09:51 AM
The esp32.reset-reason should give you the cause of the reset.
One of them is ESP-RST-BROWNOUT.
bmentink
bmentink 11/08/2023 07:06 PM
@floitsch Hi, is that stored in flash for retrieval later? Would it be possible to retrieve that off a clients machine somehow?
bmentinkbmentink
@floitsch Hi, is that stored in flash for retrieval later? Would it be possible to retrieve that off a clients machine somehow?
floitsch
floitsch 11/08/2023 07:09 PM
You can retrieve the reset reason anytime. It's stored by the system.
floitsch
floitsch 11/08/2023 07:09 PM
The easiest is probably to just have a program that has a boot-trigger and then just looks at the value.
floitsch
floitsch 11/08/2023 07:10 PM
You can also just use artemis device container install to temporary install that program and have a look at the reset reason.
bmentink
bmentink 11/10/2023 01:43 AM
@floitsch I wish it was that easy. This is a remote system, I can't get to the serial. And can't duplicate it on my local machine.(edited)
floitsch
floitsch 11/10/2023 06:03 AM
In my example I print the reset reason, but you can just upload it to somewhere.
I would install a simple container that is triggered at boot and which uploads the reason. You could always store it in flash (maybe using Artemis channels) if you don't want to go online too often
bmentink
bmentink 11/10/2023 10:24 PM
@floitsch Thanks. When you say "upload" do you mean by FTP or some other protocol? Do you have any examples?
bmentinkbmentink
@floitsch Thanks. When you say "upload" do you mean by FTP or some other protocol? Do you have any examples?
floitsch
floitsch 11/10/2023 10:58 PM
Really depends on your setup.
You can send it via telegram, to supabase, to Google spreadsheet, mqtt to adafruit or the mosquitto test server...
If you look at the tutorial section of docs.toit.io you find tutorials for all of them there
๐Ÿ‘1
bmentink
bmentink 11/13/2023 01:16 AM
Thanks @floitsch I used google sheets method, works great :๐Ÿ™‚:
๐Ÿ‘1
bmentink
bmentink 11/13/2023 10:07 PM
@floitsch Interesting thing. On my local machine I uploaded the container on my running system with boot,install flags and I logged a reset reason of 3 (ESP-RST-SW) as expected. I did the same to a remote machine, but this time got a returned reset reason of 1 (ESP-RST-POWERON) Do you have any idea why that could be?
bmentinkbmentink
@floitsch Interesting thing. On my local machine I uploaded the container on my running system with boot,install flags and I logged a reset reason of 3 (ESP-RST-SW) as...
floitsch
floitsch 11/14/2023 10:22 AM
That's indeed curious.
POWERON should only happen after a power-cut, or when the chip was reset (either with the reset button or through the UART; and the UART reset can be avoided by jag monitor --attach).
I googled a bit, but couldn't find any lead that looked promising.
46 messages in total