pyswd icon indicating copy to clipboard operation
pyswd copied to clipboard

IDCODE confusing

Open schneidersoft opened this issue 2 years ago • 2 comments

CortexM(sdw.Swd()).get_idcode() gets the Stlinks IDCODE(or some other value from it) rather than the target IDCODE. To get the target IDCODE you must use: sdw.Swd().get_mem32(0xE0042000)

Consider changing the function name?

example get_idcode() = 2BA01477 (corresponding to Cortex ®-M4 with FPU r0p1) STM32F446xx example swd.get_mem32(0xE0042000) = 10006430 (F103 XL REV.A)

schneidersoft avatar Mar 04 '22 10:03 schneidersoft