STM32WL and Flash memory usage in a LoRaWan / Sigfox use-case

The choice of an STM32WL microcontroller precludes the use of internal EEPROM, requiring the use of either an external EEPROM or the internal Flash memory for storing persistent data. The latter option is often favored in many designs (and modems) for cost reasons, though it comes with certain implications.

Using networks like LoRaWAN and Sigfox involves regular persistent writes. In the case of LoRaWAN, using OTAA (Over-The-Air Activation) mode, the devNonce must be recorded during each join procedure to ensure its uniqueness over network connections. Here, the number of persistent memory writes will theoretically be low (except for the battery end-of-life scenario discussed later). For an ABP (Activation By Personalization) connection, the situation differs significantly; the frame counter (FCnt) must be recorded so that it does not reset to zero in the event of a reboot. The same applies to Sigfox and its SeqId, which must increment with each communication. Without specific logic, LoRaWAN ABP and Sigfox will write to persistent memory with each data transmission.

While an EEPROM memory area has a lifespan of about 100,000 to 1,000,000 cycles (still potentially lower than the number of messages sent during the object’s lifecycle), a Flash memory area lasts only 10,000 writes, a number quickly reached in IoT communications. Therefore, using Flash as persistent storage requires a different approach compared to EEPROM in this context.

Continue reading

BalenaFin – compute module motherboard

The BalenaFin board, made by balena.io is a compact Raspberry Pi compute module 3 mother board.

This kind of setup is really useful when making industrial embedded systems in small to average volume like I did and described in a previous post presenting my solution on waveshare system.

I thank you Balena.io, especially Marc, for giving me the opportunity to test this product. So you understand I did not payed to get that one, but as usual, I’m totally free about what I’m writing about it.

The BalenaFin costs $129 w/o taxes and can be ordered on the balena shop. So, let’s how to use it and get benefit of the balena.io platform.

Continue reading

Embedded product with Raspberry Pi Compute Module

Raspberry Pi is a good solution for creating low-cost, powerful embedded devices when you have no need of self powered solution.

I had to create a such device recently to make a programming machine for my IoT devices. I was looking for a compact solution, powered with PoE, industrial grade, able to run a Java program and host a custom HAT with my home-made chip programmer.

Here you see a picture of the first prototype of this product with the different components visible: The green board is a Rapsberry Pi compute module CM3+ with 16GB eMMc flash drive. The blue motherboard is a Waveshare PoE board for CM3+. The Black board is my custom HAT hosting the programming solution based on a STM32.

In this post, I’ll detail a bit these different components and the way they are configured to illustrate how to easily make a such system alive.

Continue reading

10 things you can’t ignore when writing a Firmware

When you write an IoT firmware, there are different things you may never forget to think about… The coming 10 things you can’t ignore are coming from my experience of smart object creation and the associated field experience.

The field experience is unfortunately the real step where you will improve your firmware and discover all you have forgotten when you have written the firmware and tested it in your laboratory. In laboratory everything is perfect.

The following 10 things you can’t ignore when writing a Firmware is a non exhaustive checklist of points to verify before pushing your code to the field. It is also a list of  test conditions you can execute to validate a Firmware / device made by a third party.

Continue reading

Get computers for less than $15

domino.io

domino.io

Announced in 2015 and mostly delivered in 2016, the 9$+ computers are now a reality. The first one  to be delivered was Domino.io with a price of 14$ it is actually the most expensive device but also one with a nice list of addon. The kickstarter campain was a success even if it raised only 46K$.

CHIP was in the same period of time a great success with 2M$ raised on Kickstarter for 50K requested. And actually it still incredible to me to reach a such cheap price for a device with a such complexity.

Last but not least, the famous RaspberryPI zero is just starting to be distributed at the incredible price of $5 and is actually impossible to obtained under $20 on ebay auctions.

As a owner of these 3 different platform, I will publish in this post the difference we have between them and what we can expect from them.

Continue reading

Silabs EFM8 a low cost microcontroller based on 8051 core

EFM8 chip

EFM8 chip

If you my blog and the lesson section you may notice my interest for 80×51 micro-controller family. Silicon Labs has recently launch a new 8b family based on this core.

With price less than 1 euros, they are interesting candidates for low cost hacking and hardware design. Even the programming cable is not really expensive ( $35 + port + Tax ) and the development environment is free.

EFM8 provides a 50MHz core with all the usual I/O – Serial, I2C, SPI. Plus 12 bit ADC, voltage regulator, oscillator…

Continue reading

Backed Domino IO project !

Domino IO - IoT enabler

Domino IO – IoT enabler

I do not usually post more than a tweet when backing on a KickStarter project but as for this time there is a French guy included  in the project, it is a good opportunity to do it !

The Domino IO project is an interesting platform to connect one of your home stuff ! It contains a powerful CPU, the network connectivity and all what you need to quickly make your own design.

This platform is really looking like the SparkCore under steroïd having eaten a Carambola engine. The chip is provided for $10 on Kickstarter ; this is 2.5 time less than carambola and 2 times less than Sparkcore. Sound like the missing element between RaspberryPi and Arduino.

Continue reading

Arduino AtMega328p low power consumption

For one of my projects, I want to have a really low power consumption device to be able to use a battery for many month. For this I implemented a low power solution as described here. I’ll try to simplify it a little bit and document it a little more …

Continue reading