A16 flash problem - saint_code - 07-09-2023
Hi
I am try to flash my brand new KinKony A16 controller with empty sketch using Arduino 2.1.1
earn "A fatal error occurred: Invalid head of packet (0xA6)" error
Code: Linking everything together...
/Users/myuser/Library/Arduino15/packages/esp32/tools/xtensa-esp32-elf-gcc/1.22.0-97-gc752ad5-5.2.0/bin/xtensa-esp32-elf-gcc -nostdlib -L/Users/myuser/Library/Arduino15/packages/esp32/hardware/esp32/1.0.6/tools/sdk/lib -L/Users/myuser/Library/Arduino15/packages/esp32/hardware/esp32/1.0.6/tools/sdk/ld -T esp32_out.ld -T esp32.project.ld -T esp32.rom.ld -T esp32.peripherals.ld -T esp32.rom.libgcc.ld -T esp32.rom.spiram_incompatible_fns.ld -u esp_app_desc -u ld_include_panic_highint_hdl -u call_user_start_cpu0 -Wl,--gc-sections -Wl,-static -Wl,--undefined=uxTopUsedPriority -u __cxa_guard_dummy -u __cxx_fatal_exception -Wl,--start-group /private/var/folders/42/swzk51zs3x93tjqmp7mlcmhm0000gn/T/arduino/sketches/F59284665596F1CC333E4934A94B676A/sketch/sketch_jul9a.ino.cpp.o /private/var/folders/42/swzk51zs3x93tjqmp7mlcmhm0000gn/T/arduino/sketches/F59284665596F1CC333E4934A94B676A/core/core.a -lgcc -lesp_websocket_client -lwpa2 -ldetection -lesp_https_server -lwps -lhal -lconsole -lpe -lsoc -lsdmmc -lpthread -llog -lesp_http_client -ljson -lmesh -lesp32-camera -lnet80211 -lwpa_supplicant -lc -lmqtt -lcxx -lesp_https_ota -lulp -lefuse -lpp -lmdns -lbt -lwpa -lspiffs -lheap -limage_util -lunity -lrtc -lmbedtls -lface_recognition -lnghttp -ljsmn -lopenssl -lcore -lfatfs -lm -lprotocomm -lsmartconfig -lxtensa-debug-module -ldl -lesp_event -lesp-tls -lfd -lespcoredump -lesp_http_server -lfr -lsmartconfig_ack -lwear_levelling -ltcp_transport -llwip -lphy -lvfs -lcoap -lesp32 -llibsodium -lbootloader_support -ldriver -lcoexist -lasio -lod -lmicro-ecc -lesp_ringbuf -ldetection_cat_face -lapp_update -lespnow -lface_detection -lapp_trace -lnewlib -lbtdm_app -lwifi_provisioning -lfreertos -lfreemodbus -lethernet -lnvs_flash -lspi_flash -lc_nano -lexpat -lfb_gfx -lprotobuf-c -lesp_adc_cal -ltcpip_adapter -lstdc++ -Wl,--end-group -Wl,-EL -o /private/var/folders/42/swzk51zs3x93tjqmp7mlcmhm0000gn/T/arduino/sketches/F59284665596F1CC333E4934A94B676A/sketch_jul9a.ino.elf
/Users/myuser/Library/Arduino15/packages/esp32/tools/esptool_py/3.0.0/esptool --chip esp32 elf2image --flash_mode dio --flash_freq 80m --flash_size 4MB -o /private/var/folders/42/swzk51zs3x93tjqmp7mlcmhm0000gn/T/arduino/sketches/F59284665596F1CC333E4934A94B676A/sketch_jul9a.ino.bin /private/var/folders/42/swzk51zs3x93tjqmp7mlcmhm0000gn/T/arduino/sketches/F59284665596F1CC333E4934A94B676A/sketch_jul9a.ino.elf
esptool.py v3.0-dev
python /Users/myuser/Library/Arduino15/packages/esp32/hardware/esp32/1.0.6/tools/gen_esp32part.py -q /private/var/folders/42/swzk51zs3x93tjqmp7mlcmhm0000gn/T/arduino/sketches/F59284665596F1CC333E4934A94B676A/partitions.csv /private/var/folders/42/swzk51zs3x93tjqmp7mlcmhm0000gn/T/arduino/sketches/F59284665596F1CC333E4934A94B676A/sketch_jul9a.ino.partitions.bin
/Users/myuser/Library/Arduino15/packages/esp32/tools/xtensa-esp32-elf-gcc/1.22.0-97-gc752ad5-5.2.0/bin/xtensa-esp32-elf-size -A /private/var/folders/42/swzk51zs3x93tjqmp7mlcmhm0000gn/T/arduino/sketches/F59284665596F1CC333E4934A94B676A/sketch_jul9a.ino.elf
Sketch uses 199324 bytes (15%) of program storage space. Maximum is 1310720 bytes.
Global variables use 13224 bytes (4%) of dynamic memory, leaving 314456 bytes for local variables. Maximum is 327680 bytes.
"/Users/myuser/Library/Arduino15/packages/esp32/tools/esptool_py/3.0.0/esptool" --chip esp32 --port "/dev/cu.usbserial-210" --baud 921600 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 80m --flash_size detect 0xe000 "/Users/myuser/Library/Arduino15/packages/esp32/hardware/esp32/1.0.6/tools/partitions/boot_app0.bin" 0x1000 "/Users/myuser/Library/Arduino15/packages/esp32/hardware/esp32/1.0.6/tools/sdk/bin/bootloader_dio_80m.bin" 0x10000 "/private/var/folders/42/swzk51zs3x93tjqmp7mlcmhm0000gn/T/arduino/sketches/F59284665596F1CC333E4934A94B676A/sketch_jul9a.ino.bin" 0x8000 "/private/var/folders/42/swzk51zs3x93tjqmp7mlcmhm0000gn/T/arduino/sketches/F59284665596F1CC333E4934A94B676A/sketch_jul9a.ino.partitions.bin"
esptool.py v3.0-dev
Serial port /dev/cu.usbserial-210
Connecting....
Chip is ESP32-D0WD-V3 (revision 3)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
Crystal is 40MHz
MAC: b0:a7:32:80:e4:a0
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 921600
Changed.
Configuring flash size...
A fatal error occurred: Invalid head of packet (0xA6)
Failed uploading: uploading error: exit status 2
also esptool shows some other errors
Code: esptool.py --baud 115200 write_flash 0x0 tasmota32.bin --flash_freq 80m --flash_mode dio --flash_size 4MB
esptool.py v4.6.2
Found 2 serial ports
Serial port /dev/cu.usbserial-210
Connecting....
Detecting chip type... Unsupported detection protocol, switching and trying again...
Connecting....
Detecting chip type... ESP32
Chip is ESP32-D0WD-V3 (revision v3.1)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
Crystal is 40MHz
MAC: b0:a7:32:80:e4:a0
Uploading stub...
Running stub...
Stub running...
WARNING: Failed to communicate with the flash chip, read/write operations will fail. Try checking the chip connections or removing any other hardware connected to IOs.
Configuring flash size...
Flash will be erased from 0x00000000 to 0x001d3fff...
Compressed 1915648 bytes to 1228182...
Writing at 0x0000e5d8... (4 %)Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/esptool/__init__.py", line 1073, in _main
main()
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/esptool/__init__.py", line 868, in main
operation_func(esp, args)
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/esptool/cmds.py", line 595, in write_flash
esp.flash_defl_block(block, seq, timeout=timeout)
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/esptool/loader.py", line 131, in inner
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/esptool/loader.py", line 1037, in flash_defl_block
self.check_command(
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/esptool/loader.py", line 436, in check_command
val, data = self.command(op, data, chk, timeout=timeout)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/esptool/loader.py", line 405, in command
p = self.read()
^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/esptool/loader.py", line 338, in read
return next(self._slip_reader)
^^^^^^^^^^^^^^^^^^^^^^^
StopIteration
A fatal error occurred: The chip stopped responding.
but erase successfully
Code: esptool.py erase_flash
esptool.py v4.6.2
Found 2 serial ports
Serial port /dev/cu.usbserial-210
Connecting....
Detecting chip type... Unsupported detection protocol, switching and trying again...
Connecting....
Detecting chip type... ESP32
Chip is ESP32-D0WD-V3 (revision v3.1)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
Crystal is 40MHz
MAC: b0:a7:32:80:e4:a0
Uploading stub...
Running stub...
Stub running...
WARNING: Failed to communicate with the flash chip, read/write operations will fail. Try checking the chip connections or removing any other hardware connected to IOs.
Erasing flash (this may take a while)...
Chip erase completed successfully in 0.1s
Hard resetting via RTS pin...
some additional info from Arduino serial port monitor
looks like A16 is into continius loop reset ?
Code: [13:42:55]rst:0x3 (SW_RESET),boot:0x1f (SPI_FAST_FLASH_BOOT)
[13:42:55]configsip: 0, SPIWP:0xee
[13:42:56]clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
[13:42:56]mode:DIO, clock div:2
[13:42:56]load:0x3fff0030,len:1184
[13:42:56]load:0x40078000,len:12784
[13:42:56]load:0x40080400,len:3032
[13:42:56]entry 0x400805e4
[13:42:56]ets Jul 29 2019 12:21:46
[13:42:56]
[13:42:56]rst:0x3 (SW_RESET),boot:0x1f (SPI_FAST_FLASH_BOOT)
[13:42:56]configsip: 0, SPIWP:0xee
[13:42:56]clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
[13:42:56]mode:DIO, clock div:2
[13:42:56]load:0x3fff0030,len:1184
[13:42:56]load:0x40078000,len:12784
[13:42:56]load:0x40080400,len:3032
[13:42:56]entry 0x400805e4
[13:42:56]ets Jul 29 2019 12:21:46
[13:42:56]
[13:42:56]rst:0x3 (SW_RESET),boot:0x1f (SPI_FAST_FLASH_BOOT)
[13:42:56]configsip: 0, SPIWP:0xee
[13:42:56]clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
[13:42:56]mode:DIO, clock div:2
[13:42:56]load:0x3fff0030,len:1184
[13:42:56]load:0x40078000,len:12784
[13:42:56]load:0x40080400,len:3032
[13:42:56]entry 0x400805e4
[13:42:57]ets Jul 29 2019 12:21:46
...
RE: A16 flash problem - admin - 07-09-2023
do you have installed RF433 module on PCB? if installed, just reomve it before you download firmware.
RE: A16 flash problem - saint_code - 07-10-2023
(07-09-2023, 11:25 PM)admin Wrote: do you have installed RF433 module on PCB? if installed, just reomve it before you download firmware.
yes - it's installed
thanks a lot
I will try in a few days
RE: A16 flash problem - admin - 07-10-2023
ok, remove it will be ok.
RE: A16 flash problem - saint_code - 07-10-2023
[SOLVED]
Thanks a lot!
RE: A16 flash problem - admin - 07-10-2023
ok
RE: A16 flash problem - saint_code - 07-22-2023
@admin
do you have Tasmota config for KC868-A16 rev 1.6 ?
because this https://templates.blakadder.com/kincony_KC868-A16.html for rev 1.4 not working
PHP Code: 00:00:00.003 HDW: ESP32-D0WD-V3 00:00:00.079 UFS: FlashFS mounted with 304 kB free 00:00:00.180 CFG: Loaded from File, Count 49 00:00:00.195 QPC: Count 1 00:00:00.286 BRY: Berry initialized, RAM used=3408 00:00:00.311 BRY: no 'preinit.be' 00:00:00.314 I2C: PCF8574 found at 0x21 00:00:00.314 I2C: PCF8574 found at 0x22 00:00:00.315 I2C: PCF8574 found at 0x24 00:00:00.316 I2C: PCF8574 found at 0x25 00:00:00.329 PCF: Total devices 4, PCF8574 output ports 16 00:00:00.334 Project tasmota - Tasmota Version 10.1.0(TasmoCompiler-esp32generic)-2_0_1_1(2022-02-25T09:33:44) 00:00:04.443 BRY: no 'autoexec.be'
its only PCF8574-2 react on GND + X08 ... GND + X01 on inputs
PHP Code: 11:33:52.896 RSL: RESULT = {"Time":"2023-07-22T11:33:52","PCF8574-2_INP":{"D7":0}} 11:33:52.947 RSL: RESULT = {"Time":"2023-07-22T11:33:52","PCF8574-2_INP":{"D7":1}} 11:34:10.187 RSL: RESULT = {"Time":"2023-07-22T11:34:10","PCF8574-2_INP":{"D7":0}} 11:34:11.038 RSL: RESULT = {"Time":"2023-07-22T11:34:11","PCF8574-2_INP":{"D7":1}} 11:34:11.087 RSL: RESULT = {"Time":"2023-07-22T11:34:11","PCF8574-2_INP":{"D7":0}} 11:34:11.757 RSL: RESULT = {"Time":"2023-07-22T11:34:11","PCF8574-2_INP":{"D7":1}} 11:34:11.831 RSL: RESULT = {"Time":"2023-07-22T11:34:11","PCF8574-2_INP":{"D7":0}} 11:34:12.431 RSL: RESULT = {"Time":"2023-07-22T11:34:12","PCF8574-2_INP":{"D7":1}} 11:34:16.984 RSL: RESULT = {"Time":"2023-07-22T11:34:16","PCF8574-2_INP":{"D7":0}} 11:34:21.504 RSL: RESULT = {"Time":"2023-07-22T11:34:21","PCF8574-2_INP":{"D7":1}} 11:34:28.891 RSL: RESULT = {"Time":"2023-07-22T11:34:28","PCF8574-2_INP":{"D5":0}} 11:34:31.321 RSL: RESULT = {"Time":"2023-07-22T11:34:31","PCF8574-2_INP":{"D5":1}} 11:34:37.215 RSL: RESULT = {"Time":"2023-07-22T11:34:37","PCF8574-2_INP":{"D5":0}} 11:34:42.930 RSL: RESULT = {"Time":"2023-07-22T11:34:42","PCF8574-2_INP":{"D5":1}}
RE: A16 flash problem - saint_code - 07-22-2023
Xmmm)))
Looks like I found my issue - output(s) +12v should be connected to inputs work correctly
RE: A16 flash problem - admin - 07-22-2023
ok, good.
RE: A16 flash problem - zeltini1401 - 11-20-2023
I can connect to the board KC868-A16 with wifi, but I can't record a sketch. I tried reprogramming again with KCS_KC868_A16_V2.0.5 and again it shows an error about incorrect baud rate.
|