Page 1 of 1

ESP32-CAM roadblock

Posted: Mon Apr 04, 2022 1:10 am
by KJM
Can't get https://github.com/lemariva/micropython-camera-driver software to run on an ESP32-CAM, HK ESP32-MiniKIT(black), board. The first message looks like the firmware is not loading

Code: Select all

 --port COM4 erase_flash
esptool.py v3.0
Serial port COM4
Connecting....
Chip is ESP32-D0WDQ6 (revision 1)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
Crystal is 40MHz
MAC: 78:21:84:80:8d:d8
Uploading stub...
Running stub...
Stub running...
Erasing flash (this may take a while)...
Chip erase completed successfully in 13.1s
Hard resetting via RTS pin...
Erasing done
------------------------------------

C:\Users\Admin\AppData\Local\Programs\Thonny\python.exe -u -m esptool --chip esp32 --port COM4 write_flash --flash_mode keep --flash_size detect 0x1000 C:/Users/Admin/Downloads/micropython-camera-driver-master/micropython-camera-driver-master/firmware/micropython_cmake_9fef1c0bd_esp32_idf4.x_ble_camera.bin
esptool.py v3.0
Serial port COM4
Connecting........_____....._____....._____....._____....._____....._____....._____

A fatal error occurred: Failed to connect to ESP32: Timed out waiting for packet header

Write command returned with error code 2


But then there is another message that suggests there is a problem with either the flash memory chip or the sd card?

Code: Select all

rst:0x10 (RTCWDT_RTC_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
flash read err, 1000
ets_main.c 371 
ets Jun  8 2016 00:22:57
Anybody able to tell what's going on? I've got a FAT formatted flash card in the board but both micropython_camera_feeeb5ea3_esp32_idf4_4.bin & micropython_cmake_9fef1c0bd_esp32_idf4.x_ble_camera.bin give the same flash read error after I tried to load the micropython firmware.

Re: ESP32-CAM roadblock

Posted: Mon Apr 04, 2022 6:52 am
by tepalia02
You may get some ideas regarding the problem here: https://github.com/espressif/arduino-esp32/issues/4278

Re: ESP32-CAM roadblock

Posted: Tue Apr 05, 2022 12:59 am
by KJM
I've never used the arduino platform & I'm ignorant of C+, not sure where the main.c came from maybe on the board as supplied. I'm thinking now that I should have at least tried to do something with it before trying to flash micropython on to it.

Re: ESP32-CAM roadblock

Posted: Fri Apr 08, 2022 7:13 am
by KJM
I finally got upython loaded with gpio12 pulled low, apparently gpio12 floating causes the esp to feed 1v8 instead of 3v3 to the psram. I don't understand why this is only an issue during flashing? gpio12 floating in normal operation is OK. Is it some sort of selective behaviour where gpio12 floating only causes reduced psram voltage during programming?

Also the arduino crowd seem to have the option of efuse burning to obviate this behaviour (having to pull gpio12 low to get the correct psram voltage when flashing new upython firmware). Is there a .py program that blows efuses?

Re: ESP32-CAM roadblock

Posted: Sun Apr 10, 2022 7:36 pm
by BetterAutomations
I don't know about the PSRAM, but GPIO 12 has special bootup requirements on all ESP32 with all languages. Must be pulled low at boot. I avoid using it myself.
https://randomnerdtutorials.com/esp32-p ... nce-gpios/