Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed CRC check #25

Open
edestecd opened this issue Nov 27, 2024 · 6 comments
Open

Failed CRC check #25

edestecd opened this issue Nov 27, 2024 · 6 comments

Comments

@edestecd
Copy link

Getting this error in esphome despite it seeming to be successful on a wb3l chip.

Processing office-test1 (board: wb3l; framework: arduino; platform: libretiny @ 1.7.0)
---------------------------------------------------------------------------------------------
Warning! Non-Git installations are NOT SUPPORTED.
Configuring upload protocol...
AVAILABLE: uart
CURRENT: upload_protocol = uart
Looking for upload port...
Using manually specified: /dev/ttyUSB0
Uploading .pioenvs/office-test1/firmware.uf2
|-- Detected file type: UF2 - esphome 2024.11.1
|-- Connecting to 'Beken 7231T' on /dev/ttyUSB0 @ 115200
|   |-- Success! Chip info: BK7231S_1.0.6
|-- Writing '.pioenvs/office-test1/firmware.uf2'
|   |-- esphome 2024.11.1 @ 2024-11-27 06:26:49 -> wb3l
|-- The current command timeout of 1.0 second(s) is too low for reading 782336 bytes CRC. Increasing to 2 second(s).
|-- ValueError: Chip CRC value 0 does not match calculated CRC value 1F8FB63C
|   |-- File "/root/.platformio/penv/.libretiny/lib/python3.11/site-packages/bk7231tools/serial/cmd_ll_chip.py", line 73, in check_crc
*** [upload] Error 1
```

Anything else I can check or does this seem like a bug?
@kuba2k2
Copy link
Member

kuba2k2 commented Nov 27, 2024

This means that communication with the chip is most likely lost in the final stage of the flash process. Check if your wiring is connected properly and that you're using a reliable 3.3V power supply.

You can use ltchiptool directly (GUI or CLI) to flash the UF2 file. This way, you can use verbose logging to see what packets are received from the chip.

https://docs.libretiny.eu/docs/flashing/tools/ltchiptool/

@edestecd
Copy link
Author

I'll try a different usb to serial adapter along with a separate power supply tomorrow.

@Cossid
Copy link
Member

Cossid commented Nov 27, 2024

I don't think this is a power issue, this is the BK7231T bug that has been happening randomly for a while now, were we currently need to use BK Writer to recover.

@edestecd
Copy link
Author

I was able to flash it with the same esphome build using this https://github.com/openshwprojects/BK7231GUIFlashTool

and it passed CRC check

@edestecd
Copy link
Author

edestecd commented Nov 28, 2024

I used ltchiptool directly with cli and got the same CRC error as with esphome cli

@kuba2k2
Copy link
Member

kuba2k2 commented Nov 28, 2024

The thing is, when you use ltchiptool directly you can enable verbose logging. That output would likely help finding where the issue is. If you can, try doing that and post the flashing logs here.

The flag -vv will show debug and verbose messages.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants