Page 1 of 2

Smallest MCU for micropython

Posted: Sun Mar 15, 2020 4:50 pm
by sim222
Hi guys,

I am looking for the smallest mcu for runing micropython.
I only need one or two uart and one I2C.
plz guide me.

Thanks in advance~

Re: Smallest MCU for micropython

Posted: Sun Mar 15, 2020 7:33 pm
by deshipu
Do you need it to be small in physical dimensions, or by any other criteria, like simplicity of the minimal working circuit, or unit price?

The NRF51822 that is used to run MicroPython on Micro:bit is both small physically (a 32-pin QFN package, IIRC), small in terms of available flash and RAM, and relatively cheap, for example.

Re: Smallest MCU for micropython

Posted: Tue Mar 24, 2020 9:07 am
by sim222
I need the smallest platform and robust stability and price isn't my concern.

How can I install Micropython to the MCU if I select that MCU you mentioned?

Re: Smallest MCU for micropython

Posted: Thu Mar 26, 2020 11:08 pm
by deshipu
Same as you would flash any other firmware on that particular MCU—usually using a programmer device supporting the particular protocol that MCU uses. In case of NRF51 I think it's the SWIM protocol, so any programmer that handles that should work.

If you don't care about price and stability, only physical size, then I would look at the STM32 and SAMD chips in QFN packages. For example ATSAMD21E18A-MU is pretty small and only requires two capacitors as extra components.

Re: Smallest MCU for micropython

Posted: Sat Mar 28, 2020 1:44 am
by chrismas9
The STM32L432 in QFN32 is supported via the NUCLEO_L432KC port. It should be well supported because it is derived from the Pyboard port.

Re: Smallest MCU for micropython

Posted: Sat Mar 28, 2020 1:51 am
by chrismas9
Also the STM32L072. Use the L073 port. This chip is memory limited (192k flash) and sometimes gets broken when new features are added. If cost is more important than size I have MicroPython running on STM32F030. It's just over $US1 in volume.

Re: Smallest MCU for micropython

Posted: Thu Apr 02, 2020 2:44 am
by sim222
chrismas9 wrote:
Sat Mar 28, 2020 1:51 am
Also the STM32L072. Use the L073 port. This chip is memory limited (192k flash) and sometimes gets broken when new features are added. If cost is more important than size I have MicroPython running on STM32F030. It's just over $US1 in volume.
Thanks for your reply!!
I am so curious STM32F030 which has various packages.
In my lack of knowledge, if I need to change the package for the MCU then, should comply with the source code which I can get from Github, am I right?

Sorry for bothering you since my limited information in terms of the embedded software.

Best regards,

Re: Smallest MCU for micropython

Posted: Thu Apr 02, 2020 3:02 am
by jimmo
sim222 wrote:
Thu Apr 02, 2020 2:44 am
I am so curious STM32F030 which has various packages.
Only the 48- and 64-pin LQFPs have enough RAM/ROM to run MicroPython though. (i.e. the F030CC and F030RC)
sim222 wrote:
Thu Apr 02, 2020 2:44 am
In my lack of knowledge, if I need to change the package for the MCU then, should comply with the source code which I can get from Github, am I right?
Yes. You should be able to adapt the Nucleo F091 board.
sim222 wrote:
Thu Apr 02, 2020 2:44 am
Sorry for bothering you since my limited information in terms of the embedded software.
But I'm not sure I would recommend this course if you're new to this. I would strongly recommend starting with a chip that is already well-supported in MicroPython, and definitely not one that is at this really small end because you'll waste time worrying about how to make everything fit and work well.

Get a prototype working first with a slightly more expensive F4 series part or something (pick something that already has a board definition in MicroPython), then optimise for cost later.

Re: Smallest MCU for micropython

Posted: Thu Apr 02, 2020 2:38 pm
by chrismas9
If you are new to MicroPython and don't want to learn how to port it yet you should be able to use the NUCLEO_L432KC port without modification on the QFN STM32L432KC chip. You will have to compile it as the binary is not in the downloads. It reserves 26k flash for the file system, not all of which will be available for scripts. If that is not enough you will have to use frozen code.

Re: Smallest MCU for micropython

Posted: Tue Apr 07, 2020 6:29 pm
by tve
On the topic of small MCUs... I have a bunch of small sensors boards with STM32L082 and L072 and I'm wondering whether I can ditch C++... These only have 192KB flash, is it at all realistic to use these boards? There's no filesystem, right? So all code has to go into RAM and once working into frozen modules? I don't mind making my own board definition and ditching peripheral support I don't need, etc, but I'm wondering whether this is just all wasted effort...