Meet Puya PY32 – The 8-cent Arm Cortex-M0+ microcontroller

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.

PUYA PY32F002
PY32F002 block diagram

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.

PUYA PY32F003
PY32F003 block diagram

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.

PY32F030 datasheet
PY32F030 block diagram

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.

PY32 MCU development board
PUYA003 MCU development board

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.

PY32 price

The development boards are not dirt cheap yet, with the PUYA003 and PUYA030 going for around $4.92.

Thanks to Claude1079 for the tip.

Share this:
FacebookTwitterHacker NewsSlashdotRedditLinkedInPinterestFlipboardMeWeLineEmailShare

Support CNX Software! Donate via cryptocurrencies, become a Patron on Patreon, or purchase goods on Amazon or Aliexpress

ROCK Pi 4C Plus

24 Replies to “Meet Puya PY32 – The 8-cent Arm Cortex-M0+ microcontroller”

  1. 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.

  2. 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!

    1. Are they stm clones or just any generic arm mcus?
      Are the peripherals identical?

      Didn’t see any mention in that direction…

        1. This is likely from the dispute over ARM China where the CEO of ARM China broke off from ARM, Inc without permission.

  3. 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..🤔

    1. 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.

  4. 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. And then it can either boot the app or go into a mode where it can update the rest of the flash using an API. But they didn’t provide this boot loader, you have to write it yourself and I haven’t gotten around to doing that yet.

      1. 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.

    1. 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?

          1. 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.

Leave a Reply

Your email address will not be published. Required fields are marked *

Khadas VIM4 SBC
Khadas VIM4 SBC