-10.7 C
New York
Wednesday, January 22, 2025

Jay Carlson Hunts Down the Least expensive Flash-Outfitted Microcontroller: a Puya 32-Bit Arm Cortex-M0+



Embedded techniques engineer Jay Carlson has been on the hunt for the lowest-possible-cost microcontroller to characteristic on-board flash storage — and believes he is discovered it, within the type of a Puya chip that includes an Arm Cortex-M0+ core.

“Puya? They’re a flash reminiscence firm out of Shanghai that’s been round since 2012 — principally making actually low-cost SPI flash reminiscence for IoT [Internet of Things] devices,” Carlson explains in a weblog publish dropped at our consideration by Adafruit. “Whereas it could appear odd that the most cost effective MCU [Microcontroller Unit] is made by a flash reminiscence firm, if you recognize a factor or two about chip design (which I do not) you may know that it’s usually the flash reminiscence contained in the half that is the costliest IP within the design.”

It is this, Carlson explains, which causes many ultra-low-cost microcontrollers to be constructed with out on-board flash in any respect, providing as a substitute single-use electronically programmable read-only reminiscence (EPROM) that may solely be burned as soon as earlier than having its contents locked perpetually extra. The Puya PY32 vary, against this, comes with true embedded flash — and a well-recognized Arm Cortex-M0+ core, relatively than the free and open-source RISC-V structure seen in lots of its low-cost rivals.

“On the time of publication, costs have shot up fairly a bit in comparison with after I first ordered these elements,” Carlson notes, “however at present, the costs vary from lower than 8 cents as much as $0.74 relying on the precise half, configuration, and amount you’re shopping for. The F002A is the bottom mannequin: it clocks in at 24MHz, has 20k of flash, [and] 3k of SRAM [static RAM].

“It has one advanced-control timer with 4 outputs (plus two complementary pairs for driving H-bridges), 1 low-power timer, 1 general-purpose timer, a 1 MSPS 12-bit ADC with 6 exterior channels, two comparators, a primary watchdog timer, and one SPI, I2C, and USART peripheral. And since it is a Cortex-M0+, you get an SWD debugging interface, a SysTick timer, and a nested vector interrupt controller (NVIC) bundled in.”

That is lots of options in a sub-10¢ chip, however there’s extra to advocate the elements than simply value. Carlson describes the event expertise as comparatively easy, bar just a little fiddling to get the software program growth package configured for Visible Studio Code relatively than Kiel MDK. “Total, these elements are a lot simpler to make use of than different elements on this value vary,” Carlson says, “which frequently have poor English documentation, no code samples or peripheral libraries, or require vendor-provided IDEs and peculiar tooling.

“Backside line: the Puya PY32 ecosystem is simply plain boring — and that’s a great factor.”

Carlson’s full write-up is accessible on his web site; he has additionally printed a pattern undertaking on GitHub to function a quick-start for others adopting the identical chips.

Related Articles

Latest Articles