// This does not use standard response format:
// raw response: ffff00 20 aeb4abcd 16c6bc45 e339e339e339e339
// UID in wchisp: cd-ab-b4-ae-45-bc-c6-16
// e339e339e339e339 => inital value of erased flash
/// Chip UID, also reported by wchisp
For CH32V micros (and maybe also other variants) the first four response bytes FFFF0020 is actually contents of "Flash Capacity Register" - ignore leading FFFF, because the register is 16 bits only and contains flash size in KB, i.e. 0x20 = 32 KB.
I think the response is in fact just dump of the whole Electronic Signature info, as described for example in the CH32V003 Reference Manual Chapter 15 Electronic Signature (ESIG).
For CH32V micros (and maybe also other variants) the first four response bytes
FFFF0020
is actually contents of "Flash Capacity Register" - ignore leadingFFFF
, because the register is 16 bits only and contains flash size in KB, i.e. 0x20 = 32 KB.I think the response is in fact just dump of the whole Electronic Signature info, as described for example in the CH32V003 Reference Manual Chapter 15 Electronic Signature (ESIG).