

There was already an ARM for 16 cents , now we have ARM for 8 cents. Yes, eight.

PY32F002/PY32F003 from PUYA are microcontrollers with ARM Cortex M0+ core clocked at 24/32MHz.
PY32F002 have 20kB FLASH, 3kB RAM, SPI, USART, I2C, ADC, timers... nothing to complain about.
PY32F003 additionally DMA and a few more timers, there is also a larger choice of memory.
There is an SWD interface, so you don't need some exotic programmer.
Power supply 1.7V...5.5V.
Packages from standard SOPs, through TSSOPs, to small QFNs or DFNs.
Downloadable PDFs on the Chinese version of the site:
https://www.puyasemi.com/cpzx3/info_267_aid_242_kid_235.html
Click on the orange folder. Each has the same RAR with a bunch of PDFs and other aids. Some in Chinese, some in English.
PY32F002:

PY32F003:

Examples of enclosures:




Hello world (sources attached):

Flashing LEDs and text on UART (9600 bps)
Tests:
From what I've noticed there are a few issues with the reset.
1. When connecting a button to the RESET pin sometimes a HardFault interrupt appears after pressing it.
The external reset can be disabled so that the problem is rather small. I haven't used an external reset in a long time.
2. The system can be overclocked about 2 times by setting the "wait state" of the flash to 1 and changing the calibration of the generator.
The only problem is that the reset resets the "wait state" of the flash, not resets the generator calibration.
If someone wants to overclock, don't reset.
The current consumption in sleep mode is about 5uA, so I wouldn't call it an 8-bit killer. Comparing the prices...

Programming:
To add support for PUYA chips to J-Link, upload the ".FLM" files from the attachment to the "/opt/SEGGER/JLink/Devices/Puya/" directory and add the following to the "JLinkDevices.xml" file:
Quote:<!-- -->
<!-- Puya -->
<!-- -->
<Device>
<ChipInfo Vendor="ST" Name="PY32F002Ax5" WorkRAMAddr="0x20000000" WorkRAMSize="0xC00" Core="JLINK_CORE_CORTEX_M0"/>
<FlashBankInfo Name="FLASH" BaseAddr="0x08000000" MaxSize="0x5000" Loader="Devices/Puya/PY32F0xx_20.FLM" LoaderType="FLASH_ALGO_TYPE_OPEN" AlwaysPresent="1"/>
<FlashBankInfo Name="OPT" BaseAddr="0x1FFF0E80" MaxSize="0x10" Loader="Devices/Puya/PY32F0xx_OPT.FLM" LoaderType="FLASH_ALGO_TYPE_OPEN" AlwaysPresent="1"/>
</Device>
<Device>
<ChipInfo Vendor="ST" Name="PY32F003x4" WorkRAMAddr="0x20000000" WorkRAMSize="0x800" Core="JLINK_CORE_CORTEX_M0"/>
<FlashBankInfo Name="FLASH" BaseAddr="0x08000000" MaxSize="0x4000" Loader="Devices/Puya/PY32F0xx_16.FLM" LoaderType="FLASH_ALGO_TYPE_OPEN" AlwaysPresent="1"/>
<FlashBankInfo Name="OPT" BaseAddr="0x1FFF0E80" MaxSize="0x10" Loader="Devices/Puya/PY32F0xx_OPT.FLM" LoaderType="FLASH_ALGO_TYPE_OPEN" AlwaysPresent="1"/>
</Device>
<Device>
<ChipInfo Vendor="ST" Name="PY32F003x6" WorkRAMAddr="0x20000000" WorkRAMSize="0x1000" Core="JLINK_CORE_CORTEX_M0"/>
<FlashBankInfo Name="FLASH" BaseAddr="0x08000000" MaxSize="0x8000" Loader="Devices/Puya/PY32F0xx_32.FLM" LoaderType="FLASH_ALGO_TYPE_OPEN" AlwaysPresent="1"/>
<FlashBankInfo Name="OPT" BaseAddr="0x1FFF0E80" MaxSize="0x10" Loader="Devices/Puya/PY32F0xx_OPT.FLM" LoaderType="FLASH_ALGO_TYPE_OPEN" AlwaysPresent="1"/>
</Device>
<Device>
<ChipInfo Vendor="ST" Name="PY32F003x8" WorkRAMAddr="0x20000000" WorkRAMSize="0x2000" Core="JLINK_CORE_CORTEX_M0"/>
<FlashBankInfo Name="FLASH" BaseAddr="0x08000000" MaxSize="0x10000" Loader="Devices/Puya/PY32F0xx_64.FLM" LoaderType="FLASH_ALGO_TYPE_OPEN" AlwaysPresent="1"/>
<FlashBankInfo Name="OPT" BaseAddr="0x1FFF0E80" MaxSize="0x10" Loader="Devices/Puya/PY32F0xx_OPT.FLM" LoaderType="FLASH_ALGO_TYPE_OPEN" AlwaysPresent="1"/>
</Device>
Cool? Ranking DIY