Programming Tool for PUYA PY32F0xx Microcontrollers
Description
With this tool, PUYA microcontrollers of the series PY32F0xx (and maybe other PY32) can be flashed via a simple USB-to-serial converter by utilizing the factory built-in embedded UART/HID bootloader.
Preparations
If necessary, a driver for the USB-to-serial converter used must be installed.
Installation
Ensure that the prerequisites for installing Python packages are met. Then execute the following command in the command line:
pip install puyaisp
Usage
Connect your USB-to-serial converter to your PY32F0xx MCU as follows:
USB2SERIAL PY32F0xx
+--------+ +-------------------+
| RXD| <--- |PA2 or PA9 or PA14|
| TXD| ---> |PA3 or PA10 or PA15|
| VDD| ---> |VDD |
| GND| ---> |GND |
+--------+ +-------------------+
Set your MCU to bootloader mode by using ONE of the following methods:
- Disconnect your USB-to-serial converter, pull BOOT0 pin (PF4) to VCC (or press and hold the BOOT button, if your board has one), then connect the converter to your USB port. BOOT0 pin (or BOOT button) can be released now.
- Connect your USB-to-serial converter to your USB port. Pull BOOT0 pin (PF4) to VCC, then pull nRST (PF2) shortly to GND (or press and hold the BOOT button, then press and release the RESET button and then release the BOOT button, if your board has them).
- If your microcontroller has USB, pull BOOT0 pin (PF4) to VCC (or press and hold the BOOT button, if your board has one), then connect it to your USB port. The default USB VID:PID is
ffff:0448.
Usage: puyaisp [-h] [-u] [-l] [-e] [-o] [-G] [-R] [-t {serial,hid}] [-f FLASH]
[--vid VID] [--pid PID] [--path PATH]
[--timeout TIMEOUT]
Optional arguments:
-h, --help show this help message and exit
-u, --unlock unlock chip (remove read protection)
-l, --lock lock chip (set read protection)
-e, --erase perform chip erase (implied with -f)
-o, --rstoption reset option bytes
-G, --nrstgpio make nRST pin a GPIO pin
-R, --nrstreset make nRST pin a RESET pin
-t, --transport {serial,hid} bootloader transport
-f FLASH, --flash FLASH write BIN file to flash and verify
--vid VID HID VID
--pid PID HID PID
--path PATH hidapi device path
--timeout TIMEOUT read timeout in ms
Examples:
puyaisp -f firmware.bin
puyaisp -t hid -f firmware.bin
Links
Metadata
Release files for puyaisp 1.4.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| puyaisp-1.4.2.tar.gz | 9.7 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| puyaisp-1.4.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 19.2 kB
Release files / puyaisp-1.4.2.tar.gz
| Download URL | puyaisp-1.4.2.tar.gz |
|---|---|
| Size | 9.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
524a6f5cbb4d66a8f77fc00032d352e27384092de0032a4623212938fae187c0
|
|
BLAKE2b-256 checksum How to use checksums |
e2ce13c2922e9084ef7a1a5dd8090f5b699eb7229e93dd832be1dc8ab04683d4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.8.10
|
Release files / puyaisp-1.4.2-py3-none-any.whl
| Download URL | puyaisp-1.4.2-py3-none-any.whl |
|---|---|
| Size | 9.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
936df1e1725665ccc52075e460bd0b2df79a1c32be9578286fbaa6b365bb7ad2
|
|
BLAKE2b-256 checksum How to use checksums |
2f4f692e627637bdf0d82afe22ab581ec91dc43a5efd504066abd67cf4db83a5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.8.10
|
Security for puyaisp 1.4.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.