Skip to main content

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 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).
Usage: puyaisp [-h] [-u] [-l] [-e] [-o] [-G] [-R] [-f FLASH]

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
  -f FLASH, --flash FLASH   write BIN file to flash and verify

Example:
puyaisp -f firmware.bin

Metadata

Release files for puyaisp 1.4.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for puyaisp 1.4.1
File Size Uploaded
puyaisp-1.4.1.tar.gz 7.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for puyaisp 1.4.1
File Interpreter ABI Platform
puyaisp-1.4.1-py3-none-any.whl Python 3 none any Details

Total release size: 15.0 kB

Release files / puyaisp-1.4.1.tar.gz

Download URL puyaisp-1.4.1.tar.gz
Size 7.0 kB
Tags Source
SHA-256 checksum
How to use checksums
a2abee5f593e6dbe05988c0047fe9cb9a9db69a6f44efb421046a984624ae5b7
BLAKE2b-256 checksum
How to use checksums
62f9dbd40264030b8bd113afbdd991015ee29bd8df0f8f8b7d87a4e0c933b857
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.10.12

Release files / puyaisp-1.4.1-py3-none-any.whl

Download URL puyaisp-1.4.1-py3-none-any.whl
Size 8.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4877e85202a3d1e1e6cba4ffedce5c7998755dad3a8f27d95b990b39f7b8028f
BLAKE2b-256 checksum
How to use checksums
6c75e845184eb7bbd964cd953f220c6b242e6df118c7f26b313201a8bbfa26f4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.10.12

Release history Release notifications | RSS feed

This release

1.4.1 This release

2 release files

1.4.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page