Puya Semiconductor (Shanghai) PY32 Arm Cortex-M0+ microcontroller family may be the world’s cheapest 32-bit Arm MCUs with one of the parts – PY32F002AL15S6TU – selling for under 8 cents per unit in 5K+ orders with 3KB SRAM, 20KB flash in an 8-pin SOP-8 package.
Back in 2016, when I searched for the world’s cheapest MCU, I found Holtek HT48R002 8-bit microcontroller, and a few years later (2019), Padauk PMS150C “3 Cents” MCU came to my attention. However, both are 8-bit microcontrollers that come with OTG (One-Time Programming) ROM, meaning they can’t be easily used for development or updated. The Puya PY32 microcontrollers are in the same price range but offer a 32-bit Arm Cortex-M0+ core clocked at 24 to 48MHz, 16KB to 64KB flash storage, and 2KB to 8KB SRAM.
There are three PY32 sub-families, but let’s check out the PY32F002 family in detail since those are the cheapest parts.
PY32F002A key features and specifications:
- MCU Core – 32-bit Arm Cortex-M0+ @ 24 MHz
- Memory – 3KB SRAM
- Storage – 20KB flash
- Peripherals
- Up to 18x GPIOs
- 1x USART
- 1x I2C, 1x SPI, PWM
- Up to 9-channel 12-bit ADC
- Timers
- 1x general-purpose 16-bit timers
- 1x 16-bit advanced control timer
- 1x low-power timer (LPTIM) to support wake-up from stop mode
- 1x SysTick timer
- 1x watchdog timers (IWDT)
- Clocks
- 4/24MHz RC (HSI)
- 32.768KHz RC (LSI)
- 4~24MHz HSE (External crystal oscillator)
- Supply Voltage – 1.7V to 5.5V DC
- Packages – SOP8 (4.9×3.7×1.75 mm), SOP16, ESSOP10, TSSOP20
- Temperature Range – – 40°C to +85°C
The PY32F003 family adds DMA, up to 8KB SRAM, up to 64KB flash, a wider range of peripherals, a few more timers, and can run at up to 32 MHz, but somehow lacks the HSE interface for an external crystal oscillator.
The PY32F030 further builds on that with up to a 48 MHz clock, even more peripherals (2x SPI, 2x USART…), a PLL, and an LED display controller.
Puya Semiconductor says the PY32 family can be used in controllers, handheld devices, PC peripherals, game GPS platforms, industrial applications, toys, Smart Home devices, cooling fans, chargers, smart appliances, battery management, and healthcare products.
The datasheets, documentation, and development tools can be found on the product page (scroll to the right in the products matrix), and we can also find two more sub-family with the PY32F072 Arm Cortex-M0+ MCU clocked at 72 MHz, and the PY32F403 Arm Cortex-M4 microcontroller at up to 160 MHz, which may or may not be compatible with STM32 parts. The PY32 microcontrollers can be programmed with IAR Embedded Workbench or the Arm Keil MDK.
The company also provides the PUYA003 and PUYA030 development boards with a USB Type-C port, a button, and headers for the I/Os. I did not have the opportunity to test any of those myself, but Jay Carlon did. He built some sample code with VSCode, managed to flash the firmware through Segger’s J-Link GDB and pyOCD servers, and was surprised by how it was easy to debug the board with those tools.
You’ll find a range of PY32 microcontrollers for sale on LCSC with the cheapest being the PY32F002AL15S6TU as mentioned in the introduction.
The development boards are not dirt cheap yet, with the PUYA003 and PUYA030 going for around $4.92.
Thanks to Claude1079 for the tip.
Jean-Luc started CNX Software in 2010 as a part-time endeavor, before quitting his job as a software engineering manager, and starting to write daily news, and reviews full time later in 2011.
Support CNX Software! Donate via cryptocurrencies, become a Patron on Patreon, or purchase goods on Amazon or Aliexpress
Why exactly do they have an extra Interrupt Controller when the NVIC of the Cortex M0+ is already more than enough? It supports up to 32 interrupt lines + NMI, which should be enough for a MCU of this size.
The ones with more peripherals might need it to aggregate their higher quantity of peripherals and etc into 32, but the smaller one really shouldn’t.
The current consumption sounds good
https://silicognition.com/Electronics/PuyaCharge/py32f003-undervoltage-run-mode/
PY32F002A might have 32kB FLASH and 4kB RAM
https://www.elektroda.com/rtvforum/topic3946116.html
And a GCC SDK with LL lib
https://github.com/IOsetting/py32f0-template
Would be nice to have with a display out, and run some sort of DOS/C64-look-alike OS on.
Doesn’t even have to be a DOS clone. Could be it’s own kernel with a programming language like basic or something else.
Get internet on there, and browse on text based browsers, and it would be a marvel!
You mean something like this?
https://www.cnx-software.com/2022/12/15/olimex-agonlight2-8-bit-open-source-hardware-computer/
Or that?
https://www.olimex.com/Products/Duino/Duinomite/DUINOMITE-eMEGA/open-source-hardware
Or even that:
https://github.com/sergev/LiteBSD
Another STM clone. Another chinese thief…
Are they stm clones or just any generic arm mcus?
Are the peripherals identical?
Didn’t see any mention in that direction…
There’s no way that they’re paying Arm royalty fees for 8 cents. The Cortex-M0+ core is obviously stolen.
This is likely from the dispute over ARM China where the CEO of ARM China broke off from ARM, Inc without permission.
Well the question was copy of stm32 or not, not interested in knowing if its even a fake arm 😉
Its a rip-off from the STM32C011x4 MCU series
Serious? PY32F003 was released much earlier than STM32C0
Oow lovely, give so many ideas to spark off.
Just badly implemented for my aims .. yet so practical. Sadly my time so busy of late..🤔
The PUYA002 family is not listed on the PUYA website, only the PUYA003 is listed.
https://www.puyasemi.com/cpzx3/info_267_aid_242_kid_235.html
Anyone know what is going on? Are the PUYA002 so cheap because they are discontinued? The PUYA003 are much more expensive, around $0.35.
The PY32F072 and PY32F403 are also missing. If I had to guess I’d say they just didn’t update their website. Datasheets for all five sub-families are inside the rar file.
If these parts are due to the ARM China dispute, there is a risk in using them. They could suddenly stop being made due to legal action. Or they could suddenly increase a lot in price due to ARM, Inc applying royalties. I would love to see an under $0.10 Cortex-M0 in the market. The Ch32v003 is RISC based so there is no licensing risk. Downside with that chip is the crazy proprietary flash programming interface which complicates in-circuit updates. WCH’s solution is to write a two stage boot process. You program in the boot code using the proprietary tool.… Read more »
ARM China is a government run company and there are no laws that can be enforced to make them stop.
Sure there are, the WTO can ban the export of all goods containing the unlicensed chips. And then if you try to export the goods to a country honoring the WTO ban they destroy them at customs. You can still use them internally to China.
Funny how there is a market for cheap arms even noone knows how its done, and it sparks suspicion if ots illegal, then why not riscv or any other isa without royalties?
Maybe our intrepid reporter can ask Puya about the ARM China licensing dispute.
Wouldn’t expect an answer to such an enquiry…
Probably better to ask ARM, Inc if Puya has a license.
If I ask myself, I don’t think I’d get an answer. I don’t have a contact at Arm, so I’d just use the contact form on their website, and they probably know I’d make this information public. It’s better if a company who plans to use PY32 asks Arm and/or Puya about the license status.
Does it play nice with Arduino?
Someone has been working on it. https://github.com/Air-duino/Arduino-AirMCU (air001 is py32f002a relabeled).