Zephyrnet Logo

Puya PY32: The Cheapest Flash Microcontroller You Can Buy Is Actually an ARM Cortex-M0+

Date:

There’s a bit of a contest going on when it comes to which is the cheapest microcontroller, yet most of the really cheap ones have one big trade-off in that they have one-time programmable (OTP) memory, generally requiring the use of an (expensive) device emulator during development. This raises the question of what the cheapest reprogrammable MCU is, which [Jay Carlson] postulates is found in the Puya PY32 ARM Cortex-M0+ based series.

Although [Jay] has previously mentioned that these cheap OTP (like the 3-cent Padauk PMS150) MCUs make sense for large volume production) it’s also easy to see that for small volumes and for hobbyists it’s much easier and cheaper to just reflash the firmware in the same cheap MCU rather than using an expensive in-circuit emulator. This is where the Puya PY32 comes into play, with parts ranging from 8 cents a pop (basic PY32F002A) to $0.74 for the more full-featured models on LCSC, and packages ranging from a miniscule DFN, to LQFP and hand soldering friendly SOIC.

In his blog post, [Jay] covers the major advantage of these Puya parts in that they come with Keil support, English documentation and can use the standard ARM MCU toolchains. The parts themselves share similarities with STM32 parts, although they’re not directly (pin or binary) compatible. The PY32F002A is the lowest end part, with 24 MHz clockspeed, 20 kB of Flash and 3 kB of SRAM. The F003 adds DMA and more RAM and Flash, and the top-end F030 hits 48 MHz, 30 GPIO pins and a smorgasbord of peripherals.

Although it’s been claimed that the WCH CH32V003 is the cheapest non-OTP MCU, this is a part that’s much harder to obtain, with WCH apparently having pulled the part, at least on their AliExpress store, leaving it on TaoBao available for about 25 cents a piece. This would seem to give the Puya parts a definite leg up, and it gives the STM32F030 a definite run for its money in this budget part of the MCU pool.

(Heading image: PY32F002A diagram)

spot_img

Latest Intelligence

spot_img