pyOCD: Failures when testing programmers with pyocd and the puya py32
Summary
I recently bought a stack of puya py32 mcu’s after reading this article
I’ve been testing them out using the SDK here
I noticed that many of my daplinks and other probes fail to connect to this mcu with pyocd [and openocd, though I didn’t test it as thoroughly] when using the pack file provided by the vendor here
I have a stack of different probes and mcu’s running daplink firmwares, and only one of them works OK. Most of the daplinks fail with:
pyocd.core.exceptions.TransferError: Unexpected ACK value (5) returned by probe
Method
To ensure the probes are working OK, I tested each on an STM32F103C8 mcu, as well as with a Puya PY32F002AL15. I figured the STM should be a good control test, as it’s a very well supported and commonplace mature product.
I’m running pycod 0.34.3.dev36 – though I did also test .34.3 release as well with identical results.
My OS is Ubuntu lunar (dev), on linux 5.18.13
I prepared a firmware for each mcu, and programmed it with the following commands:
STM32:
$ pyocd erase --chip -t stm32f103c8; pyocd load -t stm32f103c8 ./miniblink.bin
PY32:
$ pyocd load ./Build/example-blink.hex -t py32f002x5 --config ./Misc/pyocd.yaml
(the config file simply loads the pack file from the vendor)
$ cat pyocd.yaml
pack:
\- Misc/Puya.PY32F0xx_DFP.1.1.3.pack
Results table
Probe | STM32 | PY32 |
DAPLinks | ||
jixin.pro DAPLINK | works | works |
rp2040 picoprobe-cmsis-v1.0.2 | works | Unexpected ACK value (5) |
rp2040 DapperMime | works | Unexpected ACK value (5) |
DAPLink clear | works | Unexpected ACK value (5) |
WCHLink | Unexpected ACK value (5) | Unexpected ACK value (5) |
CH552 CMSIS-DAP | works | TransferTimeoutError |
STLinks | ||
STLinkV2 – baite | STLink error (9): Get IDCODE error | STLink error (9): Get IDCODE error |
STLinkV2 - metal | works | STLink error (9): Get IDCODE error |
JLinks | ||
JlinkOB – baite | works | Memory transfer fault (Unspecified error.) |
JlinkOB 072 – baite | works | RecursionError: maximum recursion depth exceeded |
Details: Programmers.odt Details from each probe are in the comments below
About this issue
- Original URL
- State: open
- Created a year ago
- Reactions: 1
- Comments: 16
Something I just discovered: programming works better at 3V3 Vcc. At least some of the probes that weren’t working for me actually DO work, but only when running the PY32 at 3.3V. And all probes seem to work with more stability and reliability at 3.3V