Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 06:53 02 Aug 2025 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : Thinking about a very low power Micromite

     Page 1 of 3    
Author Message
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10315
Posted: 08:50am 30 Oct 2018
Copy link to clipboard 
Print this post

I've got an application which needs to be battery powered and unattended over long durations. The experts in ultra low power processing are STM so I'm considering a new port of MMBasic to one of their STM32L4 devices. Unfortunately they have no PDIP devices in their portfolio but they do have 32, 48, and 64 pin LQFP on 0.5mm pitch which are easy enough to solder. For a basic MM2 equivalent with some MM+ capability the 48-pin STM32L431CC (details below) seems an interesting proposition. Note the power consumption of 280nA in standby mode with RTC. This mode could be used to wake the micromite at pre-programmed times to do something and then wait, consuming almost no power until the next processing cycle.

Is this something that would be of general interest? The port shouldn't be too difficult given the work on the STM32H7. The "new" functionality would be around making use of the low power modes.

Ultra-low-power with FlexPowerControl
1.71 V to 3.6 V power supply
-40 °C to 85/105/125 °C temperature range
200 nA in VBAT mode: supply for RTC and 32x32-bit backup registers
8 nA Shutdown mode (5 wakeup pins)
28 nA Standby mode (5 wakeup pins)
280 nA Standby mode with RTC
1.0 μA Stop 2 mode, 1.28 μA with RTC
84 μA/MHz run mode
Batch acquisition mode (BAM)
4 μs wakeup from Stop mode
Brown out reset (BOR)
Interconnect matrix
Core: Arm® 32-bit Cortex®-M4 CPU with FPU, Adaptive real-time accelerator (ART Accelerator™) allowing 0-wait-state execution from Flash memory, frequency up to 80 MHz, MPU, 100DMIPS and DSP instructions
Performance benchmark
1.25 DMIPS/MHz (Drystone 2.1)
273.55 CoreMark® (3.42 CoreMark/MHz @ 80 MHz)
Energy benchmark
176.7 ULPBench® score
Clock Sources
4 to 48 MHz crystal oscillator
32 kHz crystal oscillator for RTC (LSE)
Internal 16 MHz factory-trimmed RC (±1%)
Internal low-power 32 kHz RC (±5%)
Internal multispeed 100 kHz to 48 MHz oscillator, auto-trimmed by LSE (better than ±0.25 % accuracy)
Internal 48 MHz with clock recovery
2 PLLs for system clock, audio, ADC
Up to 83 fast I/Os, most 5 V-tolerant
RTC with HW calendar, alarms and calibration
Up to 21 capacitive sensing channels: support touchkey, linear and rotary touch sensors
11x timers: 1x 16-bit advanced motor-control, 1x 32-bit and 2x 16-bit general purpose, 2x 16-bit basic, 2x low-power 16-bit timers (available in Stop mode), 2x watchdogs, SysTick timer
Memories
Up to 256 KB single bank Flash, proprietary code readout protection
64 KB of SRAM including 16 KB with hardware parity check
Quad SPI memory interface
Rich analog peripherals (independent supply)
1x 12-bit ADC 5 Msps, up to 16-bit with hardware oversampling, 200 μA/Msps
2x 12-bit DAC output channels, low-power sample and hold
1x operational amplifier with built-in PGA
2x ultra-low-power comparators
16x communication interfaces
1x SAI (serial audio interface)
3x I2C FM+(1 Mbit/s), SMBus/PMBus
4x USARTs (ISO 7816, LIN, IrDA, modem)
1x LPUART (Stop 2 wake-up)
3x SPIs (and 1x Quad SPI)
CAN (2.0B Active) and SDMMC interface
SWPMI single wire protocol master I/F
IRTIM (Infrared interface)
14-channel DMA controller


 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9610
Posted: 09:08am 30 Oct 2018
Copy link to clipboard 
Print this post

YES. Interested.
I currently use MM2 chips with sleep mode to save battery power.
Any new development that would use MMBASIC and extend battery life in standby I could use.
Smoke makes things work. When the smoke gets out, it stops!
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 4044
Posted: 09:21am 30 Oct 2018
Copy link to clipboard 
Print this post

I can see why it would be of real interest.

One thing that caught my eye (besides the 280nA) was:
84 μA/MHz run mode

which might also help with extended low power use.

John
 
Frank N. Furter
Guru

Joined: 28/05/2012
Location: Germany
Posts: 949
Posted: 10:30am 30 Oct 2018
Copy link to clipboard 
Print this post

Hi,

I am also very interested in a Micromite with very low power. I've been planning for several years to build a wristwatch with a Micromite and an LS013B4DN04 Sharp Memory Display in a MetaWatch case.

My previous plan was to switch off a "normal" Micromite completely and to supply it with power via an RTC at pre-programmed times (or keystrokes).

A low power Micromite would be very usefull!

Frank
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10315
Posted: 11:08am 30 Oct 2018
Copy link to clipboard 
Print this post

I've done some more research and I think I'll base the port on the STM32L432KCU6. This has the advantage that there is a very cheap Nucleo board available complete with onboard programmer (NUCLEO-L432KC)




It is a 32-pin chip, unfortunately only available as a UFQFPN-32, but these are still hand solderable (just) and given the availability of the Nucleo it seems a logical choice - thoughts?


 
viscomjim
Guru

Joined: 08/01/2014
Location: United States
Posts: 925
Posted: 11:23am 30 Oct 2018
Copy link to clipboard 
Print this post

I REALLY like this idea also. The small dev board is nice too. Just out of curiosity, how difficult is it to port to different pincout STM32 chips overall once this port is complete?
 
PicFan
Senior Member

Joined: 18/03/2014
Location: Austria
Posts: 133
Posted: 11:34am 30 Oct 2018
Copy link to clipboard 
Print this post

I am also very interested in a Micromite with very low power.

Wolfgang
 
twofingers

Guru

Joined: 02/06/2014
Location: Germany
Posts: 1593
Posted: 01:03pm 30 Oct 2018
Copy link to clipboard 
Print this post

I am also interested. The price for the Nucleo board seems also good.

But I'm worried about the sheer number of micromites.
Who cares about support and documentation?
This is something that Peter (and Geoff?) alone can not handle in the long run. - IMHO.

The main reason for the success of the MMs lies in their excellent documentation and support. Both very time consuming I think.

Michael
causality ≠ correlation ≠ coincidence
 
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 3378
Posted: 02:03pm 30 Oct 2018
Copy link to clipboard 
Print this post

+1 for low power STM micromite with dev module currently available at a reasonable price.

I appreciate the great work of Peter and Geoff, and especially the continuing eye for expansion of Micromite capabilities.


PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 4044
Posted: 04:04pm 30 Oct 2018
Copy link to clipboard 
Print this post

Just wondering, but why that particular STM32L4 board/chip?

Why not, for example, the NUCLEO-L433RC ?

John
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9610
Posted: 11:24pm 30 Oct 2018
Copy link to clipboard 
Print this post

  matherp said  It is a 32-pin chip, unfortunately only available as a UFQFPN-32, but these are still hand solderable (just) and given the availability of the Nucleo it seems a logical choice - thoughts?


What's the pin-pitch on this chip?
0.4mm?
Smoke makes things work. When the smoke gets out, it stops!
 
sawasdee01
Newbie

Joined: 23/12/2016
Location: United Kingdom
Posts: 33
Posted: 01:01am 31 Oct 2018
Copy link to clipboard 
Print this post

Hi,

I think that it would be a wonderful addition - although, I wonder whether using the (nearly identical) STM32L47xxx series might have a much wider appeal to 'smart wear' and other very low power apps, which need plenty of code space for the fantastic MMBASIC graphical abilities.

This would come in a 64 pin LQFP and have 512k Flash and 128k RAM, making it very similar to the MM+, albeit with a much lower power utilisation profile and the potential to have the various, super useful MM+ SPI, I2C, and COM ports fully available.

Cheers all.

Sawasdee



 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10315
Posted: 08:24am 31 Oct 2018
Copy link to clipboard 
Print this post

  Quote  Why not, for example, the NUCLEO-L433RC ?

  Quote  What's the pin-pitch on this chip?

  Quote  I wonder whether using the (nearly identical) STM32L47xxx series might have a much wider appeal to 'smart wear' and other very low power apps, which need plenty of code space for the fantastic MMBASIC graphical abilities.

  Quote  Just out of curiosity, how difficult is it to port to different pincout STM32 chips overall once this port is complete?


By far the most popular Micromite is the 28-pin which covers most peoples' requirements. The STM32L432KCU6 (0.5mm pin pitch) is very equivalent to the MX170 (although faster and with H/W FPU). The NUCLEO-L432KC can plug into a breadboard or be mounted on veroboard and the main processor can be powered separately from the ST-LINK to minimise power usage. This allows the Nucleo to be used as a PDIP chip something you can't do with the bigger versions which are also more expensive.

IMHO there is no point having things like GUI functionality in a low power device as TFT displays are incompatible with low power. I was intending to include support for displays like the NOKIA 5110, OLEDs and possibly the various e-ink versions in the firmware rather than things like the ILI9341/SSD1963

One downside of STM32 chips is that variants with different numbers of pins have the same device ID. This means that the code can't automatically configure itself for the number of pins making support for different version more difficult - separate executables.

In summary, I certainly don't want to limit the usefulness of the port by going with the smaller chip but my instinct is that the advantages outweigh the disadvantages. As always I'm interested and open to feedbackEdited by matherp 2018-11-01
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 4044
Posted: 08:51am 31 Oct 2018
Copy link to clipboard 
Print this post

It was mainly the number of pins I was wondering about - but just wondering, not overly worried or anything.

The chip/board cost is really good either way.

I suppose a downside of more pins would likely be more power, even if not much.

John
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10315
Posted: 08:18am 02 Nov 2018
Copy link to clipboard 
Print this post

MMBasic is up and running on the NUCLEO-L432KC - this thing is so cute - the same size as a 40-pin DIP and totally self-contained.
The code moved from the Armmite H7 pretty easily I2C, SPI, Digital-IO etc. all up and running. The big changes as always are in the memory model and the way flash memory is arranged.

I've got one issue with the console output occasionally dropping characters and haven't yet implemented any displays yet or played with the low power modes. The board labels the pins A0-A7 and D0-D13 so I have allowed this nomenclature as well as the normal pin number. Pin D13 is connected to LD3.




Edited by matherp 2018-11-03
 
CaptainBoing

Guru

Joined: 07/09/2016
Location: United Kingdom
Posts: 2170
Posted: 10:08am 02 Nov 2018
Copy link to clipboard 
Print this post

deletedEdited by CaptainBoing 2018-11-03
 
viscomjim
Guru

Joined: 08/01/2014
Location: United States
Posts: 925
Posted: 11:19am 02 Nov 2018
Copy link to clipboard 
Print this post

Wow Matherp! This is very cool. Will have to order a couple of these now for sure. Digikey carries these over here for $10.99 and has plenty in stock. Thanks for the effort!
 
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 3378
Posted: 12:55pm 02 Nov 2018
Copy link to clipboard 
Print this post

Wow. This is outstanding. Here's the Digikey link for U.S. buyers: NUCLEO-L432KC

The low-power stuff is great, but this also looks like a wonderful general-purpose Micromite board--I hope to see as many features as possible implemented.

Thanks, Peter (and Geoff) for this amazingly flexible piece of software fitted to ever-more powerful hardware.

PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
sagt3k

Guru

Joined: 01/02/2015
Location: Italy
Posts: 313
Posted: 04:56pm 02 Nov 2018
Copy link to clipboard 
Print this post

Hi matherp

Is it possible to have a pins resume and functionality?
and to download the firmware?

Thanks
Antonio
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10315
Posted: 05:06pm 02 Nov 2018
Copy link to clipboard 
Print this post

  Quote  and to download the firmware?

Too soon and I haven't yet asked Geoff for permission.

  Quote  Is it possible to have a pins resume and functionality?

Subject to change

{ NULL, 0, PUNUSED , NULL, 0,""}, // pin 0
{ NULL, 0, PUNUSED , NULL, 0,""}, // pin 1 VDD
{ NULL, 0, PUNUSED , NULL, 0,""}, // pin 2 OSC32_IN
{ NULL, 0, PUNUSED , NULL, 0,""}, // pin 3 OSC32_OUT
{ NULL, 0, PUNUSED , NULL, 0,""}, // pin 4 NRST
{ NULL, 0, PUNUSED , NULL, 0,""}, // pin 5 VDD
{ GPIOA, GPIO_PIN_0, DIGITAL_IN | DIGITAL_OUT | ANALOG_IN , ADC1, ADC_CHANNEL_5,"A0"}, // pin 6
{ GPIOA, GPIO_PIN_1, DIGITAL_IN | DIGITAL_OUT | ANALOG_IN , ADC1, ADC_CHANNEL_6,"A1"}, // pin 7 SPI-CLK
{ NULL, 0, PUNUSED , NULL, 0,""}, // pin 8 Console-TX

{ GPIOA, GPIO_PIN_3, DIGITAL_IN | DIGITAL_OUT | ANALOG_IN , ADC1, ADC_CHANNEL_8,"A2"}, // pin 9
{ GPIOA, GPIO_PIN_4, DIGITAL_IN | DIGITAL_OUT | ANALOG_IN , ADC1, ADC_CHANNEL_9,"A3"}, // pin 10 DAC1
{ GPIOA, GPIO_PIN_5, DIGITAL_IN | DIGITAL_OUT | ANALOG_IN , ADC1, ADC_CHANNEL_10,"A4"}, // pin 11 DAC2
{ GPIOA, GPIO_PIN_6, DIGITAL_IN | DIGITAL_OUT | ANALOG_IN , ADC1, ADC_CHANNEL_11,"A5"}, // pin 12 SPI-IN
{ GPIOA, GPIO_PIN_7, DIGITAL_IN | DIGITAL_OUT | ANALOG_IN , ADC1, ADC_CHANNEL_12,"A6"}, // pin 13 SPI-OUT
{ GPIOB, GPIO_PIN_0, DIGITAL_IN | DIGITAL_OUT | ANALOG_IN , ADC1, ADC_CHANNEL_15,"D3"}, // pin 14
{ GPIOB, GPIO_PIN_1, DIGITAL_IN | DIGITAL_OUT | ANALOG_IN , ADC1, ADC_CHANNEL_16,"D6"}, // pin 15
{ NULL, 0, PUNUSED , NULL, 0,""}, // pin 16 VSS

{ NULL, 0, PUNUSED , NULL, 0,""}, // pin 17 VDD
{ GPIOA, GPIO_PIN_8, DIGITAL_IN | DIGITAL_OUT , NULL, 0,"D9"}, // pin 18
{ GPIOA, GPIO_PIN_9, DIGITAL_IN | DIGITAL_OUT , NULL, 0,"D1"}, // pin 19 USART1-TX
{ GPIOA, GPIO_PIN_10, DIGITAL_IN | DIGITAL_OUT , NULL, 0,"D0"}, // pin 20 USART1-RX
{ GPIOA, GPIO_PIN_11, DIGITAL_IN | DIGITAL_OUT , NULL, 0,"D10"}, // pin 21
{ GPIOA, GPIO_PIN_12, DIGITAL_IN | DIGITAL_OUT , NULL, 0,"D2"}, // pin 22 USART1-DE
{ NULL, 0, PUNUSED , NULL, 0,""}, // pin 23 SWDIO
{ NULL, 0, PUNUSED , NULL, 0,""}, // pin 24 SWCLK

{ NULL, 0, PUNUSED , NULL, 0,""}, // pin 25 Console-RX
{ GPIOB, GPIO_PIN_3, DIGITAL_IN | DIGITAL_OUT , NULL, 0,"D13"}, // pin 26 Green-LED
{ GPIOB, GPIO_PIN_4, DIGITAL_IN | DIGITAL_OUT , NULL, 0,"D12"}, // pin 27
{ GPIOB, GPIO_PIN_5, DIGITAL_IN | DIGITAL_OUT , NULL, 0,"D11"}, // pin 28
{ GPIOB, GPIO_PIN_6, DIGITAL_IN | DIGITAL_OUT , NULL, 0,"D5"}, // pin 29 I2C-SCL
{ GPIOB, GPIO_PIN_7, DIGITAL_IN | DIGITAL_OUT , NULL, 0,"D4"}, // pin 30 I2C-SDA
{ NULL, 0, PUNUSED , NULL, 0,""}, // pin 31
{ NULL, 0, PUNUSED , NULL, 0,""}, // pin 32 VSS
Edited by matherp 2018-11-04
 
     Page 1 of 3    
Print this page
The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025