You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On the CH32V307, using DFU, the following effects may be observed:
The data buffer received by the DFU functions is 64 bytes off (can be in either direction)
This feels like a race condition thing, as it is very repeatable with CFG_TUSB_DEBUG=2 or ASAN enabled, while without it happens much more randomly
Random bytes in the data buffer are corrupted (watch the CRC)
Sometimes it hangs (due to a crash due to the memory corruption, I think)
With payloads larger than 512 bytes, crashes seem to almost always happen.
How to reproduce ?
Compile and load the provided firmware onto the chip. Then run dfu-util -D payload.py. Watch how the data in the hexdump changes, the CRC changes (for hard to spot single-byte errors), and how sometimes, hangs/crashes occur.
Operating System
Linux
Board
CH32V307 (using both the SCDZ devboard and a custom board)
Firmware
Provided at https://github.com/PoroCYon/tinyusb-bug-repro --- both a CH32V307 version, and an RP2040 version which does functions correctly.
What happened ?
On the CH32V307, using DFU, the following effects may be observed:
CFG_TUSB_DEBUG=2
or ASAN enabled, while without it happens much more randomlyHow to reproduce ?
Compile and load the provided firmware onto the chip. Then run
dfu-util -D payload.py
. Watch how the data in the hexdump changes, the CRC changes (for hard to spot single-byte errors), and how sometimes, hangs/crashes occur.Debug Log as txt file (LOG/CFG_TUSB_DEBUG=2)
This gist contains three log files:
log-vkart-rp2040.log
: RP2040, working correctlylog-vkart-ch32v307.log
: CH32V307, showing erratic behavior, withCFG_TUSB_DEBUG
=0log-vkart-ch32v307.2.log
: CH32V307, withCFG_TUSB_DEBUG
=2, showing wrong but repeatable outputScreenshots
No response
I have checked existing issues, dicussion and documentation
The text was updated successfully, but these errors were encountered: