10.9 C
London
Friday, February 16, 2024

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 function 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 submit 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 understand 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 eternally extra. The Puya PY32 vary, against this, comes with true embedded flash — and a well-recognized Arm Cortex-M0+ core, fairly 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 components,” 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 fundamental watchdog timer, and one SPI, I2C, and USART peripheral. And since this can be a Cortex-M0+, you get an SWD debugging interface, a SysTick timer, and a nested vector interrupt controller (NVIC) bundled in.”

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

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

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

Latest news
Related news

LEAVE A REPLY

Please enter your comment!
Please enter your name here