Page 1 of 1

Defective board?

Posted: Sat Dec 09, 2023 9:32 pm
by c4gArdruino
After uploading this IDE sketch (based on BLEclient example):

#include "BLEDevice.h"

...some code...

void setup() {

//Start serial communication
Serial.begin(115200);

//Init BLE device
BLEDevice::init("THC Controller");
BLEScan* pBLEScan = BLEDevice::getScan();
pBLEScan->setAdvertisedDeviceCallbacks(new MyAdvertisedDeviceCallbacks());
pBLEScan->setActiveScan(true);
Serial.println("Starting THC Controller...");
}

void loop () {
....some code..
}

and IDE reports:

Sketch uses 1101097 bytes (84%) of program storage space. Maximum is 1310720 bytes.
Global variables use 37716 bytes (11%) of dynamic memory, leaving 289964 bytes for local variables. Maximum is 327680 bytes.
esptool.py v4.5.1
Serial port /dev/ttyUSB1
Connecting....
Chip is ESP32-D0WD-V3 (revision v3.0)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
Crystal is 40MHz
MAC: 40:91:51:fd:5d:a8
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 921600
Changed.
Configuring flash size...
Erasing flash (this may take a while)...
Chip erase completed successfully in 1.3s
Compressed 18992 bytes to 13112...
Writing at 0x00001000... (100 %)
Wrote 18992 bytes (13112 compressed) at 0x00001000 in 0.4 seconds (effective 394.5 kbit/s)...
Hash of data verified.
Compressed 3072 bytes to 137...
Writing at 0x00008000... (100 %)
Wrote 3072 bytes (137 compressed) at 0x00008000 in 0.0 seconds (effective 545.6 kbit/s)...
Hash of data verified.
Compressed 8192 bytes to 47...
Writing at 0x0000e000... (100 %)
Wrote 8192 bytes (47 compressed) at 0x0000e000 in 0.1 seconds (effective 735.3 kbit/s)...
Hash of data verified.
Compressed 1106848 bytes to 694791...
Writing at 0x00010000... (2 %)
Writing at 0x0001c695... (4 %)
Writing at 0x0002848a... (6 %)
Writing at 0x00037768... (9 %)
Writing at 0x0003e85e... (11 %)
Writing at 0x00044401... (13 %)
Writing at 0x00049f31... (16 %)
Writing at 0x0004f5e3... (18 %)
Writing at 0x00054a8b... (20 %)
Writing at 0x0005a629... (23 %)
Writing at 0x000600b8... (25 %)
Writing at 0x000657e0... (27 %)
Writing at 0x0006aad5... (30 %)
Writing at 0x0007007d... (32 %)
Writing at 0x000763b7... (34 %)
Writing at 0x0007b7d7... (37 %)
Writing at 0x00081515... (39 %)
Writing at 0x0008738d... (41 %)
Writing at 0x0008cd64... (44 %)
Writing at 0x00092357... (46 %)
Writing at 0x00097c7b... (48 %)
Writing at 0x0009d41d... (51 %)
Writing at 0x000a2b8e... (53 %)
Writing at 0x000a8983... (55 %)
Writing at 0x000ae527... (58 %)
Writing at 0x000b517c... (60 %)
Writing at 0x000bb0f1... (62 %)
Writing at 0x000c0a1f... (65 %)
Writing at 0x000c6153... (67 %)
Writing at 0x000cb6de... (69 %)
Writing at 0x000d124c... (72 %)
Writing at 0x000d70e0... (74 %)
Writing at 0x000dd499... (76 %)
Writing at 0x000e3363... (79 %)
Writing at 0x000e8c8d... (81 %)
Writing at 0x000ee56a... (83 %)
Writing at 0x000f3e1b... (86 %)
Writing at 0x000fcace... (88 %)
Writing at 0x001050cc... (90 %)
Writing at 0x0010b2ce... (93 %)
Writing at 0x00110e13... (95 %)
Writing at 0x001165ee... (97 %)
Writing at 0x0011be7b... (100 %)
Wrote 1106848 bytes (694791 compressed) at 0x00010000 in 9.1 seconds (effective 976.5 kbit/s)...
Hash of data verified.

Leaving...
Hard resetting via RTS pin...

Serial monitor repeats:

ts Jul 29 2019 12:21:46

rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0030,len:1344
load:0x40078000,len:13964
load:0x40080400,len:3600
entry 0x400805f0
[ 4][D][esp32-hal-cpu.c:244] setCpuFrequencyMhz(): PLL: 480 / 2 = 240 Mhz,
Brownout detector was triggered

ets Jul 29 2019 12:21:46

The BLEDevice never gets initialized! Why is brownout detector triggered???

The board works with a simple test :

void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
}

void loop() {
// put your main code here, to run repeatedly:
Serial.println("this is a test");
delay(4000);
}

Is the bluetooth module defective??????. The board is connected to a powered (red) usb port that can charge
devices.

The BLE was working a day ago.....with an earlier sketch. I got this new board 4 days ago.
I am stumped at what is causing the reset loop.

Thanks in advance.

Addendum: I uploaded the earlier sketch that worked yesterday. That sketch now fails with the same boot reset loop and error code.

Re: Defective board?

Posted: Sun Dec 10, 2023 5:33 am
by ESP_Sprite
c4gArdruino wrote:
Sat Dec 09, 2023 9:32 pm
Brownout detector was triggered
That's a power supply issue. Try to use a different USB cable; yours may not have thick enough power wires.

Re: Defective board?

Posted: Mon Dec 11, 2023 1:17 am
by c4gArdruino
Its not the usb port. tried a new usb cable in usb2,usb3 and powered usb ports and got the same brownout fault. The second esp32 board I bought, which is provisioned as a BLE_server, works with all usb cables and usb ports.

Re: Defective board?

Posted: Mon Dec 11, 2023 1:33 am
by ESP_Sprite
Then it indeed seems the board is defective. You could try reworking the LDO if you want to have a go at fixing it, otherwise simply return it.

Re: Defective board?

Posted: Sat Dec 16, 2023 6:53 pm
by c4gArdruino
The replacement boards work fine :). Up a running again