Repository navigation
Conversation
The unique ID is 96 bits (CH32V407RM 31.1, ESIG_UNIID1-3); 8 bytes dropped UNIID3, so uniqueness was no longer guaranteed. Matches ch32v20x and the Arduino TinyUSB port.
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 5 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
[Low impact] The PR appears safe to merge; no blocking issues were found.
|
Hardware-in-the-loop (HIL) Test Reportci.json (ci.lan)PR head Every roster board: the HIL runner or a roster changed (8 boards). ✅ 8 passed · HIL driver elapsed 11m7s
✅ passed · ❌ failed · blank not run · — not in this board's run · run time includes lock wait and blinky Not covered on this rig:
|
Dismissed because a newer commit was pushed; Greptile will re-review the current head.
Problem
board_usb_get_serial()inports/ch32v4x7/boards.c(from #639) copies only the first 8 bytes of the unique ID. The CH32V407/V467 UID is 96 bits (ESIG_UNIID1-3at0x1FFFF7E8,…EC,…F0; CH32V407RM Rev 1.3 §31.1–31.2), and WCH guarantees uniqueness only for all 96 bits, so two boards could report the same USB serial.ch32v20x, tinyusb's ownch32v4x7BSP and the Adafruit TinyUSB Arduino CH32 port all use 12 bytes.Solution
Copy all 12 bytes. #639 is not in a release yet, so no shipped bootloader reports the 8-byte serial. adafruit/Adafruit_TinyUSB_Arduino#618 drops its matching 8-byte special case, so bootloader and sketch report the same 24-character serial.
Evidence:
check_build.py --base origin/masterbuildsch32v407_r0,metro_ch32v407andmetro_ch32v467;metro_ch32v467+12 B flash;pre-commit run --all-filespasses. Not run on hardware: no Metro CH32V4x7 is available.