ltchiptool icon indicating copy to clipboard operation
ltchiptool copied to clipboard

Flashing BK7231N (CBU) Tuya TH08 keeps crashing mid-way

Open paulandrewcrouch opened this issue 9 months ago • 11 comments

Any help appreciated. I flashed my BK7231N chip with OpenBekin (it's a Tuya TH08 Temp and Humidity display). I then tried to do an OTA update to ESP Home, something went wrong and nothing worked. I've used Itchiptool to try and put ESP Kickstart, or an original binary back on to no avail. I've erased all, re-created the RF partition, tried putting OpenBekin back on, and tried Itchiptool. It just keeps failing at various degrees of the erase or flash process. I have two, and both are doing the same. It's driving me nuts. I've used an external 3.3V Power Supply (presume no special grounding required)? Any advice appreciated, so annoying given I once got OpenBekin on, and now can't seem to do anything! Thank you.

paulandrewcrouch avatar Feb 08 '25 19:02 paulandrewcrouch

The fact that you're getting random crashes would suggest a power supply issue. Make sure you use a good power supply which can provide enough current. Also, check if your wires are connected properly. By "special grounding" I assume you don't mean the fact that GND from the power supply has to be connected (it has to).

kuba2k2 avatar Feb 08 '25 20:02 kuba2k2

The fact that you're getting random crashes would suggest a power supply issue. Make sure you use a good power supply which can provide enough current. Also, check if your wires are connected properly. By "special grounding" I assume you don't mean the fact that GND from the power supply has to be connected (it has to).

Thanks for the quick reply, very powerful 3.3V external, by grounding I mean both the power supply -ve and the FT232 needs the ground connected together and connected to the chip? I’ve tried different USB leads, have just ordered a new FT232 in case it was that. I feel I’m so close, yet so far away!!

paulandrewcrouch avatar Feb 09 '25 10:02 paulandrewcrouch

All parts of the setup (FT232, the chip, the power supply) must have their grounds connected together. Otherwise it simply won't work.

kuba2k2 avatar Feb 09 '25 10:02 kuba2k2

All parts of the setup (FT232, the chip, the power supply) must have their grounds connected together. Otherwise it simply won't work.

All connected, just tried again with a new FT board I ordered, cannot even connect now. Could it be Windows drivers? Totally perplexed. I appreciate your help. Thank you.

paulandrewcrouch avatar Feb 09 '25 19:02 paulandrewcrouch

Post what kind of error are you getting while flashing. Make sure to enable verbose logging in ltchiptool before that.

kuba2k2 avatar Feb 09 '25 20:02 kuba2k2

Image

Could it be that I've ruined the bootloader? Anyway to repair?

W: Unknown bootloader CRC - 0xB397B8F6 - please report this on GitHub issues!

paulandrewcrouch avatar Feb 11 '25 11:02 paulandrewcrouch

It would be best if you flashed a full factory firmware dump. Doing that, remember to uncheck "auto-detect" in ltchiptool and set start and skip to 0x0, length to 0x200000.

However, the bootloader is not active during the flashing process, so corrupting the bootloader won't make a difference during flashing.

kuba2k2 avatar Feb 11 '25 11:02 kuba2k2

W: Writing 4k failure @ 0x0 (No response received), retrying (attempt 0)
W: Erasing failure @ 0x0 (No response received), retrying (attempt 0)
W: Erasing failure @ 0x0 (No response received), retrying (attempt 1)
W: Erasing failure @ 0x0 (No response received), retrying (attempt 2)
W: Erasing failure @ 0x0 (No response received), retrying (attempt 3)
E: An error has occurred
E: ValueError: No response received
E: |-- File "ltchiptool\gui\work\base.py", line 24, in run
E: |-- File "ltchiptool\gui\work\flash.py", line 73, in run_impl
E: |-- File "ltchiptool\gui\work\flash.py", line 161, in _do_write
E: |-- File "ltchiptool\soc\bk72xx\flash.py", line 286, in flash_write_raw
E: |-- File "ltchiptool\util\streams.py", line 177, in update_from
E: |-- File "bk7231tools\serial\cmd_hl_flash.py", line 182, in program_flash
E: |-- File "bk7231tools\serial\cmd_ll_flash.py", line 185, in flash_write_4k
E: |-- File "bk7231tools\serial\cmd_ll_flash.py", line 244, in flash_erase_block
E: |-- File "bk7231tools\serial\cmd_ll_flash.py", line 203, in do_erase
E: |-- File "bk7231tools\serial\protocol.py", line 144, in command
E: Caused by ValueError: No response received
E: |-- File "bk7231tools\serial\cmd_ll_flash.py", line 173, in flash_write_4k
E: |-- File "bk7231tools\serial\protocol.py", line 144, in command
E: An error has occurred
E: SerialException: ClearCommError failed (PermissionError(13, 'Access is denied.', None, 5))
E: |-- File "ltchiptool\gui\work\base.py", line 24, in run
E: |-- File "ltctplugin\terminal\work.py", line 38, in run_impl
E: |-- File "serial\serialwin32.py", line 259, in in_waiting
I: Device unplugged: COM4 - USB Serial Port - FTDI (0403/6001)
I: Found new device: COM4 - USB Serial Port - FTDI (0403/6001)
W: Unknown bootloader CRC - 0xB397B8F6 - please report this on GitHub issues!
W: Writing 4k failure @ 0x4f000 (No response received), retrying (attempt 0)
W: Erasing failure @ 0x4f000 (No response received), retrying (attempt 0)
W: Erasing failure @ 0x4f000 (No response received), retrying (attempt 1)
W: Erasing failure @ 0x4f000 (No response received), retrying (attempt 2)
W: Erasing failure @ 0x4f000 (No response received), retrying (attempt 3)
E: An error has occurred
E: ValueError: No response received
E: |-- File "ltchiptool\gui\work\base.py", line 24, in run
E: |-- File "ltchiptool\gui\work\flash.py", line 73, in run_impl
E: |-- File "ltchiptool\gui\work\flash.py", line 161, in _do_write
E: |-- File "ltchiptool\soc\bk72xx\flash.py", line 286, in flash_write_raw
E: |-- File "ltchiptool\util\streams.py", line 177, in update_from
E: |-- File "bk7231tools\serial\cmd_hl_flash.py", line 182, in program_flash
E: |-- File "bk7231tools\serial\cmd_ll_flash.py", line 185, in flash_write_4k
E: |-- File "bk7231tools\serial\cmd_ll_flash.py", line 244, in flash_erase_block
E: |-- File "bk7231tools\serial\cmd_ll_flash.py", line 203, in do_erase
E: |-- File "bk7231tools\serial\protocol.py", line 144, in command
E: Caused by ValueError: No response received
E: |-- File "bk7231tools\serial\cmd_ll_flash.py", line 173, in flash_write_4k
E: |-- File "bk7231tools\serial\protocol.py", line 144, in command
W: Writing 4k failure @ 0x0 (No response received), retrying (attempt 0)
W: Erasing failure @ 0x0 (No response received), retrying (attempt 0)
W: Erasing failure @ 0x0 (No response received), retrying (attempt 1)
W: Erasing failure @ 0x0 (No response received), retrying (attempt 2)
W: Erasing failure @ 0x0 (No response received), retrying (attempt 3)
E: An error has occurred
E: ValueError: No response received
E: |-- File "ltchiptool\gui\work\base.py", line 24, in run
E: |-- File "ltchiptool\gui\work\flash.py", line 73, in run_impl
E: |-- File "ltchiptool\gui\work\flash.py", line 161, in _do_write
E: |-- File "ltchiptool\soc\bk72xx\flash.py", line 286, in flash_write_raw
E: |-- File "ltchiptool\util\streams.py", line 177, in update_from
E: |-- File "bk7231tools\serial\cmd_hl_flash.py", line 182, in program_flash
E: |-- File "bk7231tools\serial\cmd_ll_flash.py", line 185, in flash_write_4k
E: |-- File "bk7231tools\serial\cmd_ll_flash.py", line 244, in flash_erase_block
E: |-- File "bk7231tools\serial\cmd_ll_flash.py", line 203, in do_erase
E: |-- File "bk7231tools\serial\protocol.py", line 144, in command
E: Caused by ValueError: No response received
E: |-- File "bk7231tools\serial\cmd_ll_flash.py", line 173, in flash_write_4k
E: |-- File "bk7231tools\serial\protocol.py", line 144, in command
E: An error has occurred
E: SerialException: ClearCommError failed (PermissionError(13, 'Access is denied.', None, 5))
E: |-- File "ltchiptool\gui\work\base.py", line 24, in run
E: |-- File "ltctplugin\terminal\work.py", line 38, in run_impl
E: |-- File "serial\serialwin32.py", line 259, in in_waiting
W: Unknown bootloader CRC - 0xB397B8F6 - please report this on GitHub issues!
W: Writing 4k failure @ 0x27000 (No response received), retrying (attempt 0)
W: Erasing failure @ 0x27000 (No response received), retrying (attempt 0)
W: Erasing failure @ 0x27000 (No response received), retrying (attempt 1)
W: Erasing failure @ 0x27000 (No response received), retrying (attempt 2)
W: Erasing failure @ 0x27000 (No response received), retrying (attempt 3)
E: An error has occurred
E: ValueError: No response received
E: |-- File "ltchiptool\gui\work\base.py", line 24, in run
E: |-- File "ltchiptool\gui\work\flash.py", line 73, in run_impl
E: |-- File "ltchiptool\gui\work\flash.py", line 161, in _do_write
E: |-- File "ltchiptool\soc\bk72xx\flash.py", line 286, in flash_write_raw
E: |-- File "ltchiptool\util\streams.py", line 177, in update_from
E: |-- File "bk7231tools\serial\cmd_hl_flash.py", line 182, in program_flash
E: |-- File "bk7231tools\serial\cmd_ll_flash.py", line 185, in flash_write_4k
E: |-- File "bk7231tools\serial\cmd_ll_flash.py", line 244, in flash_erase_block
E: |-- File "bk7231tools\serial\cmd_ll_flash.py", line 203, in do_erase
E: |-- File "bk7231tools\serial\protocol.py", line 144, in command
E: Caused by ValueError: No response received
E: |-- File "bk7231tools\serial\cmd_ll_flash.py", line 173, in flash_write_4k
E: |-- File "bk7231tools\serial\protocol.py", line 144, in command
E: An error has occurred
E: SerialException: ClearCommError failed (PermissionError(13, 'Access is denied.', None, 5))
E: |-- File "ltchiptool\gui\work\base.py", line 24, in run
E: |-- File "ltctplugin\terminal\work.py", line 38, in run_impl
E: |-- File "serial\serialwin32.py", line 259, in in_waiting
W: Writing 4k failure @ 0x16000 (No response received), retrying (attempt 0)
W: Erasing failure @ 0x16000 (No response received), retrying (attempt 0)
W: Erasing failure @ 0x16000 (No response received), retrying (attempt 1)
W: Erasing failure @ 0x16000 (No response received), retrying (attempt 2)
W: Erasing failure @ 0x16000 (No response received), retrying (attempt 3)
E: An error has occurred
E: ValueError: No response received
E: |-- File "ltchiptool\gui\work\base.py", line 24, in run
E: |-- File "ltchiptool\gui\work\flash.py", line 73, in run_impl
E: |-- File "ltchiptool\gui\work\flash.py", line 161, in _do_write
E: |-- File "ltchiptool\soc\bk72xx\flash.py", line 286, in flash_write_raw
E: |-- File "ltchiptool\util\streams.py", line 177, in update_from
E: |-- File "bk7231tools\serial\cmd_hl_flash.py", line 182, in program_flash
E: |-- File "bk7231tools\serial\cmd_ll_flash.py", line 185, in flash_write_4k
E: |-- File "bk7231tools\serial\cmd_ll_flash.py", line 244, in flash_erase_block
E: |-- File "bk7231tools\serial\cmd_ll_flash.py", line 203, in do_erase
E: |-- File "bk7231tools\serial\protocol.py", line 144, in command
E: Caused by ValueError: No response received
E: |-- File "bk7231tools\serial\cmd_ll_flash.py", line 173, in flash_write_4k
E: |-- File "bk7231tools\serial\protocol.py", line 144, in command
V: Log level changed
E: An error has occurred
E: SerialException: ClearCommError failed (PermissionError(13, 'Access is denied.', None, 5))
E: |-- File "ltchiptool\gui\work\base.py", line 24, in run
E: |-- File "ltctplugin\terminal\work.py", line 38, in run_impl
E: |-- File "serial\serialwin32.py", line 259, in in_waiting
V: OnWorkStopped(<class 'ltctplugin.terminal.work.TerminalThread'>)
V: OnUpdate(busy=set())
D: Window message: 219, wparam=7
D: Stopped TerminalThread
V: OnUpdate(busy=set())
V: OnUpdate(busy=set())
V: OnUpdate(busy=set())
V: OnUpdate(busy=set())
V: OnUpdate(busy=set())
V: OnUpdate(busy=set())
V: OnUpdate(busy=set())
V: OnUpdate(busy=set())
V: OnUpdate(busy=set())
V: OnUpdate(busy=set())
V: OnUpdate(busy=set())
V: OnUpdate(busy=set())
V: OnUpdate(busy=set())
V: OnUpdate(busy=set())
V: OnUpdate(busy=set())
V: OnUpdate(busy=set())
V: OnUpdate(busy=set())
V: OnUpdate(busy=set())
V: Update: target=ComboBox, port=COM4, family=<Family parent: children(2), name=beken-72xx, parent=None>
D: Window message: 219, wparam=8000
V: OnUpdate(busy=set())
V: OnUpdate(busy=set())
V: OnUpdate(busy=set())
V: OnUpdate(busy=set())
V: OnUpdate(busy=set())
V: OnUpdate(busy=set())
V: OnUpdate(busy=set())
V: OnUpdate(busy=set())
V: OnUpdate(busy=set())
V: OnUpdate(busy=set())
V: OnUpdate(busy=set())
V: OnUpdate(busy=set())
V: OnUpdate(busy={'com4'})
V: OnUpdate(busy={'com4'})
V: OnUpdate(busy={'com4'})
V: OnUpdate(busy={'com4'})
V: OnUpdate(busy={'com4'})
V: OnUpdate(busy={'com4'})
V: OnUpdate(busy=set())
V: OnUpdate(busy=set())
D: Started FlashThread
D: Starting WRITE operation; file = C:\Users\paul\Downloads\BK7231GUIFlashTool-v5 (1)\readResult_BK7231N_QIO_2023-06-9--15-13-55.bin, port = COM4 @ Auto
D: Connecting
V: OnUpdate(busy={'com4'})
V: OnUpdate(busy={'com4'})
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: OnUpdate(busy={'com4'})
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
D: Connecting
V: OnUpdate(busy={'com4'})
V: OnUpdate(busy={'com4'})
V: OnUpdate(busy={'com4'})
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
D: Connecting
V: OnUpdate(busy={'com4'})
V: OnUpdate(busy={'com4'})
V: OnUpdate(busy={'com4'})
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
D: Connecting
V: OnUpdate(busy={'com4'})
V: OnUpdate(busy={'com4'})
V: OnUpdate(busy={'com4'})
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
D: Connecting
V: OnUpdate(busy={'com4'})
V: OnUpdate(busy={'com4'})
V: OnUpdate(busy={'com4'})
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
D: Connecting
V: OnUpdate(busy={'com4'})
V: OnUpdate(busy={'com4'})
V: OnUpdate(busy={'com4'})
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
D: Connecting
V: OnUpdate(busy={'com4'})
V: OnUpdate(busy={'com4'})
V: OnUpdate(busy={'com4'})
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: <- TX: BkLinkCheckCmnd()
V: -> RX (1): BkLinkCheckResp(value=0)
V: <- TX: BkCheckCrcCmnd(start=0x0, end=0x100)
V: -> RX (4): BkCheckCrcResp(crc32=0x1EBE6E45)
V: <- TX: BkLinkCheckCmnd()
V: -> RX (1): BkLinkCheckResp(value=0)
V: <- TX: BkReadRegCmnd(address=0x800000)
V: -> RX (8): Response check OK
V: -> RX (8): BkReadRegResp(address=0x800000, value=0x7231C)
D: BK72xx connected - protocol: FULL, chip: BK7231N, bootloader: BK7231N_1_0_1, chip ID: 0x7231c, boot version: None
V: <- TX: BkFlashReg24ReadCmnd(cmd=0x9F)
V: -> RX (5): BkFlashReg24ReadResp(status=0, data0=0xEB, data1=0x60, data2=0x15)
D: Starting file position: 0 / 0x0 / 0 B
D: Trying to unprotect flash memory...
V: <- TX: BkFlashReg8ReadCmnd(cmd=0x5)
V: -> RX (3): Response check OK
V: -> RX (3): BkFlashReg8ReadResp(status=0, cmd=0x5, data0=0x80)
V: <- TX: BkFlashReg8ReadCmnd(cmd=0x35)
V: -> RX (3): Response check OK
V: -> RX (3): BkFlashReg8ReadResp(status=0, cmd=0x35, data0=0x6)
V: <- TX: BkFlashReg16WriteCmnd(cmd=0x1, data=0x680)
V: -> RX (4): Response check OK
V: -> RX (4): BkFlashReg16WriteResp(status=0, cmd=0x1, data=0x680)
V: <- TX: BkFlashReg8ReadCmnd(cmd=0x5)
V: -> RX (3): Response check OK
V: -> RX (3): BkFlashReg8ReadResp(status=0, cmd=0x5, data0=0x80)
V: <- TX: BkFlashReg8ReadCmnd(cmd=0x35)
V: -> RX (3): Response check OK
V: -> RX (3): BkFlashReg8ReadResp(status=0, cmd=0x35, data0=0x6)
D: Erasing and writing at 0x0 (0.00%)
D:  - Checking block pre-erase @ 0x0
V: <- TX: BkCheckCrcCmnd(start=0x200000, end=0x200FFF)
V: -> RX (4): BkCheckCrcResp(crc32=0xA84F8983)
D:  - Trying to erase block @ 0x0
V: <- TX: BkFlashEraseBlockCmnd(erase_size=32, start=0x200000)
V: -> RX (6): Response check OK
D:  - Checking block post-erase @ 0x0
V: <- TX: BkCheckCrcCmnd(start=0x200000, end=0x200FFF)
V: -> RX (4): BkCheckCrcResp(crc32=0xEAB98F5)
D:  - Erase succeeded @ 0x0
V: <- TX: BkFlashWrite4KCmnd(start=0x200000, data=bytes(4096))
V: -> RX (5): Response check OK
V: -> RX (5): BkFlashWrite4KResp(status=0, start=0x200000)
V: <- TX: BkCheckCrcCmnd(start=0x200000, end=0x200FFF)
V: -> RX (4): BkCheckCrcResp(crc32=0xA84F8983)
D: Erasing and writing at 0x1000 (0.20%)
V: <- TX: BkFlashEraseBlockCmnd(erase_size=32, start=0x201000)
V: -> RX (6): Response check OK
V: <- TX: BkFlashWrite4KCmnd(start=0x201000, data=bytes(4096))
V: -> RX (5): Response check OK
V: -> RX (5): BkFlashWrite4KResp(status=0, start=0x201000)
V: <- TX: BkCheckCrcCmnd(start=0x201000, end=0x201FFF)
V: -> RX (4): BkCheckCrcResp(crc32=0xD38C3486)
D: Erasing and writing at 0x2000 (0.39%)
V: <- TX: BkFlashEraseBlockCmnd(erase_size=32, start=0x202000)
V: -> RX (6): Response check OK
V: <- TX: BkFlashWrite4KCmnd(start=0x202000, data=bytes(4096))
V: -> RX (5): Response check OK
V: -> RX (5): BkFlashWrite4KResp(status=0, start=0x202000)
V: <- TX: BkCheckCrcCmnd(start=0x202000, end=0x202FFF)
V: -> RX (4): BkCheckCrcResp(crc32=0x7292A1A7)
D: Erasing and writing at 0x3000 (0.59%)
V: <- TX: BkFlashEraseBlockCmnd(erase_size=32, start=0x203000)
V: -> RX (6): Response check OK
V: <- TX: BkFlashWrite4KCmnd(start=0x203000, data=bytes(4096))
V: -> RX (5): Response check OK
V: -> RX (5): BkFlashWrite4KResp(status=0, start=0x203000)
V: <- TX: BkCheckCrcCmnd(start=0x203000, end=0x203FFF)
V: -> RX (4): BkCheckCrcResp(crc32=0x24571F53)
D: Erasing and writing at 0x4000 (0.78%)
V: <- TX: BkFlashEraseBlockCmnd(erase_size=32, start=0x204000)
V: -> RX (6): Response check OK
V: <- TX: BkFlashWrite4KCmnd(start=0x204000, data=bytes(4096))
V: -> RX (5): Response check OK
V: -> RX (5): BkFlashWrite4KResp(status=0, start=0x204000)
V: <- TX: BkCheckCrcCmnd(start=0x204000, end=0x204FFF)
V: -> RX (4): BkCheckCrcResp(crc32=0x22492912)
D: Erasing and writing at 0x5000 (0.98%)
V: <- TX: BkFlashEraseBlockCmnd(erase_size=32, start=0x205000)
V: -> RX (6): Response check OK
V: <- TX: BkFlashWrite4KCmnd(start=0x205000, data=bytes(4096))
V: -> RX (5): Response check OK
V: -> RX (5): BkFlashWrite4KResp(status=0, start=0x205000)
V: <- TX: BkCheckCrcCmnd(start=0x205000, end=0x205FFF)
V: -> RX (4): BkCheckCrcResp(crc32=0x94E79BDE)
D: Erasing and writing at 0x6000 (1.17%)
V: <- TX: BkFlashEraseBlockCmnd(erase_size=32, start=0x206000)
V: -> RX (6): Response check OK
V: <- TX: BkFlashWrite4KCmnd(start=0x206000, data=bytes(4096))
V: -> RX (5): Response check OK
V: -> RX (5): BkFlashWrite4KResp(status=0, start=0x206000)
V: <- TX: BkCheckCrcCmnd(start=0x206000, end=0x206FFF)
V: -> RX (4): BkCheckCrcResp(crc32=0xCD12C154)
D: Erasing and writing at 0x7000 (1.37%)
V: <- TX: BkFlashEraseBlockCmnd(erase_size=32, start=0x207000)
V: -> RX (6): Response check OK
V: <- TX: BkFlashWrite4KCmnd(start=0x207000, data=bytes(4096))
V: -> RX (5): Response check OK
V: -> RX (5): BkFlashWrite4KResp(status=0, start=0x207000)
V: <- TX: BkCheckCrcCmnd(start=0x207000, end=0x207FFF)
V: -> RX (4): BkCheckCrcResp(crc32=0xA33A979B)
D: Erasing and writing at 0x8000 (1.56%)
V: <- TX: BkFlashEraseBlockCmnd(erase_size=32, start=0x208000)
V: -> RX (6): Response check OK
V: <- TX: BkFlashWrite4KCmnd(start=0x208000, data=bytes(4096))
V: -> RX (5): Response check OK
V: -> RX (5): BkFlashWrite4KResp(status=0, start=0x208000)
V: <- TX: BkCheckCrcCmnd(start=0x208000, end=0x208FFF)
V: -> RX (4): BkCheckCrcResp(crc32=0xE32BBCA0)
D: Erasing and writing at 0x9000 (1.76%)
V: <- TX: BkFlashEraseBlockCmnd(erase_size=32, start=0x209000)
V: -> RX (6): Response check OK
V: <- TX: BkFlashWrite4KCmnd(start=0x209000, data=bytes(4096))
V: -> RX (5): Response check OK
V: -> RX (5): BkFlashWrite4KResp(status=0, start=0x209000)
V: <- TX: BkCheckCrcCmnd(start=0x209000, end=0x209FFF)
V: -> RX (4): BkCheckCrcResp(crc32=0x189F0C23)
D: Erasing and writing at 0xA000 (1.95%)
V: <- TX: BkFlashEraseBlockCmnd(erase_size=32, start=0x20A000)
V: -> RX (6): Response check OK
V: <- TX: BkFlashWrite4KCmnd(start=0x20A000, data=bytes(4096))
W: Writing 4k failure @ 0xa000 (No response received), retrying (attempt 0)
V: <- TX: BkFlashEraseBlockCmnd(erase_size=32, start=0x20A000)
W: Erasing failure @ 0xa000 (No response received), retrying (attempt 0)
V: <- TX: BkFlashEraseBlockCmnd(erase_size=32, start=0x20A000)
W: Erasing failure @ 0xa000 (No response received), retrying (attempt 1)
V: <- TX: BkFlashEraseBlockCmnd(erase_size=32, start=0x20A000)
W: Erasing failure @ 0xa000 (No response received), retrying (attempt 2)
V: <- TX: BkFlashEraseBlockCmnd(erase_size=32, start=0x20A000)
W: Erasing failure @ 0xa000 (No response received), retrying (attempt 3)
E: An error has occurred
E: ValueError: No response received
E: |-- File "ltchiptool\gui\work\base.py", line 24, in run
E: |-- File "ltchiptool\gui\work\flash.py", line 73, in run_impl
E: |-- File "ltchiptool\gui\work\flash.py", line 161, in _do_write
E: |-- File "ltchiptool\soc\bk72xx\flash.py", line 286, in flash_write_raw
E: |-- File "ltchiptool\util\streams.py", line 177, in update_from
E: |-- File "bk7231tools\serial\cmd_hl_flash.py", line 182, in program_flash
E: |-- File "bk7231tools\serial\cmd_ll_flash.py", line 185, in flash_write_4k
E: |-- File "bk7231tools\serial\cmd_ll_flash.py", line 244, in flash_erase_block
E: |-- File "bk7231tools\serial\cmd_ll_flash.py", line 203, in do_erase
E: |-- File "bk7231tools\serial\protocol.py", line 144, in command
E: Caused by ValueError: No response received
E: |-- File "bk7231tools\serial\cmd_ll_flash.py", line 173, in flash_write_4k
E: |-- File "bk7231tools\serial\protocol.py", line 144, in command
V: Update: target=NoneType, port=COM4, family=<Family parent: children(2), name=beken-72xx, parent=None>
V: Update: target=ComboBox, port=COM4, family=<Family parent: children(2), name=beken-72xx, parent=None>
V: OnWorkStopped(<class 'ltchiptool.gui.work.flash.FlashThread'>)
V: OnUpdate(busy=set())
V: Deactivating page: <class 'ltchiptool.gui.panels.flash.FlashPanel'>
V: Activating page: <class 'ltctplugin.terminal.gui.TerminalPanel'>
V: OnUpdate(busy=set())
D: Stopped FlashThread
D: Started TerminalThread
D: Terminal opened
V: OnUpdate(busy=set())
V: OnUpdate(busy=set())

paulandrewcrouch avatar Feb 11 '25 11:02 paulandrewcrouch

This is the most common error, and it usually means that there is something wrong with the way you supply power to the chip. Either the power supply is too weak/unstable, or your wires are not connected properly.

If you soldered the wires, check the soldering and see if it's okay. If you didn't... well then that's most likely the problem 🙂

I can't really help any further, because I don't know your exact setup. If you can, maybe posting a photo of the components and connections would help somewhat.

kuba2k2 avatar Feb 11 '25 11:02 kuba2k2

This is the most common error, and it usually means that there is something wrong with the way you supply power to the chip. Either the power supply is too weak/unstable, or your wires are not connected properly.

If you soldered the wires, check the soldering and see if it's okay. If you didn't... well then that's most likely the problem 🙂

I can't really help any further, because I don't know your exact setup. If you can, maybe posting a photo of the components and connections would help somewhat.

Ok, in a way it's good to know it's common, and yes, I soldered, so I'm going to re solder, I presume I can just ignore the bootloader issue then?

paulandrewcrouch avatar Feb 11 '25 12:02 paulandrewcrouch

Well, you'll need the correct bootloader to boot the firmware afterwards. But for getting the right flashing procedure, it's not needed on BK7231N.

kuba2k2 avatar Feb 11 '25 12:02 kuba2k2