vroland / epdiy

EPDiy is a driver board for affordable e-Paper (or E-ink) displays.
https://vroland.github.io/epdiy-hardware/
GNU Lesser General Public License v3.0
1.25k stars 178 forks source link

v7 board stack in battery charging mode #316

Open fery opened 1 month ago

fery commented 1 month ago

I've been developing with the V7 for a few months without a problem using a USB-c connected to my laptop, now that I had my prototype working for the first time I tried to connect a 3.7V battery while connected to the usb-c, I could see the RED LED lighting once I connected the battery meaning is charging, the problem is that it got stack in that mode, the battery connection was not very reliable and it got connected and disconnected a couple times, with the red led lighting on and off. Then the red led stayed on even when I disconnect the battery.

If I disconnect the USB-C and connect the battery the board seems to work since the display gets updated.

But with the USB-C the red LED always stays on even without battery, I can re program the board, but the board does not seems to work , on the idf.py monitor I either get nothing after I do a epd_poweron(); (on the dragon demo) and on my program I get an infinite restart loop. So I have lost any capability to debug my code on the board

Is there anyway I can fix this problem? Maybe one of the components got fried? Any guesses?

This is the loop itself on my program:

ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0xf (BROWNOUT_RST),boot:0x9 (SPI_FAST_FLASH_BOOT)
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fce3808,len:0x148c
load:0x403c9700,len:0xe60
load:0x403cc700,len:0x3060
entry 0x403c9970
I (25) boot: ESP-IDF v4.4.7 2nd stage bootloader
I (25) boot: compile time 18:26:37
I (25) boot: Multicore bootloader
I (27) boot: chip revision: v0.2
I (31) qio_mode: Enabling default flash chip QIO
I (36) boot.esp32s3: Boot SPI Speed : 80MHz
I (41) boot.esp32s3: SPI Mode       : QIO
I (46) boot.esp32s3: SPI Flash Size : 2MB
I (50) boot: Enabling RNG early entropy source...
I (56) boot: Partition Table:
I (59) boot: ## Label            Usage          Type ST Offset   Length
I (67) boot:  0 nvs              WiFi data        01 02 00009000 00006000
I (74) boot:  1 phy_init         RF data          01 01 0000f000 00001000
I (82) boot:  2 factory          factory app      00 00 00010000 00177000
I (89) boot: End of partition table
I (93) esp_image: segment 0: paddr=00010020 vaddr=3c090020 size=5bf48h (376648) map
I (159) esp_image: segment 1: paddr=0006bf70 vaddr=3fc99710 size=03each ( 16044) load
I (162) esp_image: segment 2: paddr=0006fe24 vaddr=40374000 size=001f4h (   500) load
I (165) esp_image: segment 3: paddr=00070020 vaddr=42000020 size=8de00h (581120) map
I (261) esp_image: segment 4: paddr=000fde28 vaddr=403741f4 size=15510h ( 87312) load
I (278) esp_image: segment 5: paddr=00113340 vaddr=600fe000 size=0002ch (    44) load
I (287) boot: Loaded app from partition at offset 0x10000
I (287) boot: Disabling RNG early entropy source...
I (298) cpu_start: Multicore app
I (299) opi psram: vendor id : 0x0d (AP)
I (299) opi psram: dev id    : 0x02 (generation 3)
I (301) opi psram: density   : 0x03 (64 Mbit)
I (306) opi psram: good-die  : 0x01 (Pass)
I (311) opi psram: Latency   : 0x01 (Fixed)
I (316) opi psram: VCC       : 0x01 (3V)
I (320) opi psram: SRF       : 0x01 (Fast Refresh)
I (326) opi psram: BurstType : 0x01 (Hybrid Wrap)
I (331) opi psram: BurstLen  : 0x01 (32 Byte)
I (336) opi psram: Readlatency  : 0x02 (10 cycles@Fixed)
I (342) opi psram: DriveStrength: 0x00 (1/1)
I (348) MSPI Timing: PSRAM timing tuning index: 5
I (352) spiram: Found 64MBit SPI RAM device
I (357) spiram: SPI RAM mode: sram 80m
I (362) spiram: PSRAM initialized, cache is in normal (1-core) mode.
I (369) cpu_start: Pro cpu up.
I (372) cpu_start: Starting app cpu, entry point is 0x403752cc
0x403752cc: call_start_cpu1 at /Users/fdiaz/Developer/eink/esp/esp-idf/components/esp_system/port/cpu_start.c:151

I (0) cpu_start: App cpu up.
I (674) spiram: SPI SRAM memory test OK
I (683) cpu_start: Pro cpu start user code
I (683) cpu_start: cpu freq: 240000000
I (683) cpu_start: Application information:
I (686) cpu_start: Project name:     main
I (690) cpu_start: App version:      b034c26-dirty
I (696) cpu_start: Compile time:     May  2 2024 22:00:05
I (702) cpu_start: ELF file SHA256:  a4f104bf954f0d81...
I (708) cpu_start: ESP-IDF:          v4.4.7
I (713) cpu_start: Min chip rev:     v0.0
I (717) cpu_start: Max chip rev:     v0.99
I (722) cpu_start: Chip rev:         v0.2
I (727) heap_init: Initializing. RAM available for dynamic allocation:
I (734) heap_init: At 3FCA1D88 len 00047988 (286 KiB): D/IRAM
I (741) heap_init: At 3FCE9710 len 00005724 (21 KiB): STACK/DIRAM
I (747) heap_init: At 3FCF0000 len 00008000 (32 KiB): DRAM
I (753) heap_init: At 600FE02C len 00001FD4 (7 KiB): RTCRAM
I (760) spiram: Adding pool of 8192K of external SPI memory to heap allocator
I (768) spi_flash: detected chip: gd
I (772) spi_flash: flash io: qio
W (776) spi_flash: Detected size(16384k) larger than the size in the binary image header(2048k). Using the size in the binary image header.
I (789) sleep: Configure to isolate all GPIO pins in sleep state
I (796) sleep: Enable automatic switching of GPIO sleep configuration
I (803) cpu_start: Starting scheduler on PRO CPU.
I (0) cpu_start: Starting scheduler on APP CPU.
I (818) spiram: Reserving pool of 32K of internal memory for DMA/internal allocations
ttempting to connect to SSID: fdg
I (944) pp: pp rom version: e7ae62f
I (945) net80211: net80211 rom version: e7ae62f
I (946) wifi:wifi driver task: 3fcf6640, prio:23, stack:6656, core=0
I (951) system_api: Base MAC address is not set
I (956) system_api: read default base MAC address from EFUSE
I (970) wifi:wifi firmware version: 1fd20f4
I (970) wifi:wifi certification version: v7.0
I (970) wifi:config NVS flash: enabled
I (974) wifi:config nano formating: disabled
I (978) wifi:Init data frame dynamic rx buffer num: 32
I (983) wifi:Init static rx mgmt buffer num: 5
I (987) wifi:Init management short buffer num: 32
I (991) wifi:Init dynamic tx buffer num: 32
I (995) wifi:Init tx cache buffer num: 4
I (999) wifi:Init static tx FG buffer num: 2
I (1003) wifi:Init static rx buffer size: 1600
I (1007) wifi:Init static rx buffer num: 4
I (1011) wifi:Init dynamic rx buffer num: 32
I (1015) wifi_init: rx ba win: 6
I (1018) wifi_init: tcpip mbox: 32
I (1022) wifi_init: udp mbox: 6
I (1026) wifi_init: tcp mbox: 6
I (1030) wifi_init: tcp tx win: 5744
I (1034) wifi_init: tcp rx win: 5744
I (1039) wifi_init: tcp mss: 1440
I (1043) wifi_init: WiFi IRAM OP enabled
I (1047) wifi_init: WiFi RX IRAM OP enabled
I (1053) phy_init: phy_version 640,cd64a1a,Jan 24 2024,17:28:12
ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0xf (BROWNOUT_RST),boot:0x9 (SPI_FAST_FLASH_BOOT)

The logs on the dragon demo:

ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0xf (BROWNOUT_RST),boot:0x9 (SPI_FAST_FLASH_BOOT)
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fce3808,len:0x148c
load:0x403c9700,len:0xe60
load:0x403cc700,len:0x3060
entry 0x403c9970
I (25) boot: ESP-IDF v4.4.7 2nd stage bootloader
I (25) boot: compile time 19:57:02
I (25) boot: Multicore bootloader
I (27) boot: chip revision: v0.2
I (31) qio_mode: Enabling default flash chip QIO
I (36) boot.esp32s3: Boot SPI Speed : 80MHz
I (41) boot.esp32s3: SPI Mode       : QIO
I (46) boot.esp32s3: SPI Flash Size : 2MB
I (50) boot: Enabling RNG early entropy source...
I (56) boot: Partition Table:
I (59) boot: ## Label            Usage          Type ST Offset   Length
I (67) boot:  0 nvs              WiFi data        01 02 00009000 00006000
I (74) boot:  1 phy_init         RF data          01 01 0000f000 00001000
I (82) boot:  2 factory          factory app      00 00 00010000 00177000
I (89) boot: End of partition table
I (93) esp_image: segment 0: paddr=00010020 vaddr=3c020020 size=804a0h (525472) map
I (181) esp_image: segment 1: paddr=000904c8 vaddr=3fc930f0 size=02028h (  8232) load
I (183) esp_image: segment 2: paddr=000924f8 vaddr=40374000 size=0db20h ( 56096) load
I (198) esp_image: segment 3: paddr=000a0020 vaddr=42000020 size=1b06ch (110700) map
I (215) esp_image: segment 4: paddr=000bb094 vaddr=40381b20 size=015c8h (  5576) load
I (222) boot: Loaded app from partition at offset 0x10000
I (222) boot: Disabling RNG early entropy source...
I (235) cpu_start: Multicore app
I (235) opi psram: vendor id : 0x0d (AP)
I (235) opi psram: dev id    : 0x02 (generation 3)
I (238) opi psram: density   : 0x03 (64 Mbit)
I (243) opi psram: good-die  : 0x01 (Pass)
I (248) opi psram: Latency   : 0x01 (Fixed)
I (252) opi psram: VCC       : 0x01 (3V)
I (257) opi psram: SRF       : 0x01 (Fast Refresh)
I (262) opi psram: BurstType : 0x01 (Hybrid Wrap)
I (268) opi psram: BurstLen  : 0x01 (32 Byte)
I (273) opi psram: Readlatency  : 0x02 (10 cycles@Fixed)
I (279) opi psram: DriveStrength: 0x00 (1/1)
I (284) MSPI Timing: PSRAM timing tuning index: 5
I (289) spiram: Found 64MBit SPI RAM device
I (294) spiram: SPI RAM mode: sram 80m
I (298) spiram: PSRAM initialized, cache is in normal (1-core) mode.
I (306) cpu_start: Pro cpu up.
I (309) cpu_start: Starting app cpu, entry point is 0x40374fe0
0x40374fe0: call_start_cpu1 at /Users/fdiaz/Developer/eink/esp/esp-idf/components/esp_system/port/cpu_start.c:151

I (0) cpu_start: App cpu up.
I (611) spiram: SPI SRAM memory test OK
I (620) cpu_start: Pro cpu start user code
I (620) cpu_start: cpu freq: 240000000
I (620) cpu_start: Application information:
I (622) cpu_start: Project name:     dragon_example
I (628) cpu_start: App version:      2.0.0-11-g2803a55
I (634) cpu_start: Compile time:     Apr 11 2024 19:56:57
I (640) cpu_start: ELF file SHA256:  c7ad6ff89789e4c3...
I (646) cpu_start: ESP-IDF:          v4.4.7
I (651) cpu_start: Min chip rev:     v0.0
I (655) cpu_start: Max chip rev:     v0.99
I (660) cpu_start: Chip rev:         v0.2
I (665) heap_init: Initializing. RAM available for dynamic allocation:
I (672) heap_init: At 3FC95CB8 len 00053A58 (334 KiB): D/IRAM
I (679) heap_init: At 3FCE9710 len 00005724 (21 KiB): STACK/DIRAM
I (685) heap_init: At 3FCF0000 len 00008000 (32 KiB): DRAM
I (691) heap_init: At 600FE000 len 00002000 (8 KiB): RTCRAM
I (698) spiram: Adding pool of 8192K of external SPI memory to heap allocator
I (706) spi_flash: detected chip: gd
I (710) spi_flash: flash io: qio
W (714) spi_flash: Detected size(16384k) larger than the size in the binary image header(2048k). Using the size in the binary image header.
I (727) sleep: Configure to isolate all GPIO pins in sleep state
I (734) sleep: Enable automatic switching of GPIO sleep configuration
I (741) cpu_start: Starting scheduler on PRO CPU.
I (0) cpu_start: Starting scheduler on APP CPU.
I (761) spiram: Reserving pool of 32K of internal memory for DMA/internal allocations
I (761) main: Update screen result:
I (771) gpio: GPIO[45]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0
I (781) epdiy: using resolution 300x832
I (781) epdiy: num dma nodes: 1
I (791) epdiy: size: 1204 max: 4095
I (791) epdiy: pclk freq: 22000000 Hz
I (791) epdiy: line width: 14us, 308 cylces
I (801) epdiy: LCD init done.
E (801) epd: lut size: 65536
I (831) main: Power on

And it just stays like that forever

vroland commented 1 month ago

Hm, it's indeed plausible that one of your components is faulty. I guess you can try to check the 3.3V rail and the EPD voltages, but ideally you'd have an Oscilloscope to see how the TPS65185 behaves. Or some diode in the switchover circuit is fried, etc. Hard to tell from just the logs :/