IoT Zephyr

Zephyr Weekly Update – May 12, 2023

Happy Friday! Another week, another round of new features, drivers, and more. Before jumping into the actual news, I want to mention that I will soon be launching a recurring series of Virtual Zephyr Talks. These will be video interviews and presentations with guests from the embedded and IoT community at large, where we will discuss best practices, tech news, and maybe more importantly answer all the questions you may have, live!

I encourage everyone to subscribe to the Zephyr YouTube channel, if you haven’t already, as this will allow you to not miss upcoming notifications and live streams when we go live with this in the next few weeks. Also, if you are reading this and feel like you would have something cool to show off during an upcoming episode, please shoot me a message!

AWS IoT Core Sample

Lucas Dietrich contributed a comprehensive code sample that demonstrates how to publish messages to AWS IoT Core from a Zephyr application using the MQTT protocol. It includes key concepts such as establishing a TLS 1.2 connection, subscribing to a topic, and of course publishing data.

“This sample can be used as a starting point for developers who are interested in building their own IoT solutions using Zephyr RTOS and AWS IoT Core.”

Lucas Dietrich

Head over to the sample documentation page to get all the info you need to run it on your own device! 🙂

New boards, shields & SOCs

Infineon Technologies PSoC™ 6 BLE Prototyping Board
  • The PSoC™ 6 BLE Prototyping Board is a low-cost development board for designing and debugging solutions based on the PSoC 6 MCU from Infineon Technologies. As you can see in the picture, the PCB is split in two halves — you can just snap away the programmer and debugger module from the main board as you’re getting to the final stages of your prototyping phase!
    PR #56169 added the board definition to Zephyr, with lots of on-board features being supported out-of-the-box, including of course Bluetooth.
  • NXP’s RT1040 EVK is now supported in Zephyr! This devkit comes with the i.MX RT1040 MCU (Cortex-M7, 600 MHz), 256MB of RAM, 64MB of QSPI Flash, Ethernet, a CAN transceiver, …
  • The board definition for NXP i.MX8’s Audio DSP core has been updated (PR #57084) and now supports UART.
  • The board definition for NXP MIMXRT1010-EVK evaluation kit now contains a description of its Arduino headers making it easier to use Arduino shields more transparently, i.e. you can simply mount the shield’s sensors and peripherals on arduino_i2c or arduino_spi and they will just work (PR #57433).
  • Single-threading support has been added for the RISC-V architecture (PR #53346). When in single threaded mode, only the main thread is enabled and as such, Zephyr will look for a main() function to execute.
  • GDMA (General Direct Memory Access) support has been added for ESP32S3 SoCs (PR #57495). GDMA is a feature that allows peripheral-to-memory, memory-to-peripheral, and memory-to-memory data transfer at a high speed. The CPU is not involved in the GDMA transfer, and therefore it becomes more efficient with less workload.


I really enjoy keeping an eye on the changes on the sensor driver front, as it is a good opportunity to learn about potentially lesser known types of sensors, so I’m glad this week has been pretty active for all things drivers!

IMU Sensors

  • The BMI323 from Bosch Sensortec is an IMU (Inertial Measurement Unit) that provide acceleration and angular rate measurement. It can be used for motion detection, fitness tracking, … Bjarki added support for it this week via PR #56594, and it features lots of Zephyr goodness.
    One thing that I particularly like is that the driver leverage’s Zephyr power management capabilities to allow the sensor to achieve the lowest possible power consumption until it’s effectively resumed.
  • Another IMU sensor to join the hundreds of already supported ones is the LSM6DSO16IS from STMicroElectronics. The interesting thing with this one is its ISPU (Intelligent Sensor Processing Unit) which allows to run advanced signal processing and AI algorithms right on the sensor. The sensor can also act as a sensor hub for sensor fusion scenarios, and it can collect data from up to 4 external sensors attached to it.
    The new driver supports fetching accelerometer and gyroscope data, as well as fetching data from the “companion” sensors that may be connected to the hub.


  • Support has been added for the SSD1680 electronic paper display chip (commit #daf9030f).
  • Related: the generic SSD16xx display driver has seen a significant improvement that now allows to get much better control on partial refreshes (PR #48163). Board and shields featuring e-ink displays have been updated to use the newly added refresh profiles.


  • The recently added driver for Texas Instruments ADS114S0x ADC now allows access to the port expander (PR #55789).
  • ADC driver has been added for the i.MX 6SoloX Processors (PR #40355).
  • As part of ongoing housekeeping efforts, the ADC driver for STM32 has been updated to allow setting sampling time directly through the Devicetree (PR #57342).


  • OpenTitan is an open source silicon Root of Trust (RoT) project that uses the LowRISC RISC-V core. A driver for OpenTitan SPI host has been added (PR #54639).
  • The driver for NOR Octo-SPI flash on STM32 has been improved to wait for the erase operation to complete before returning (PR #56472). This fixes potential issues when one would try to access the chip while a (typically long) erase operation was still in progress.
  • An initial version of Infineon CAT1 flash driver has been contributed (PR #56667).


  • One of the Wi-Fi power saving features consists in advertising a listening interval (“I will be sleeping–to save power–and only waking up every X beacon intervals. #kthxbai”). Thanks to PR #57116, the Wi-Fi API and shell commands make it possible to configure the “Listen Interval” power save mode
  • It is now possible to access raw Wi-Fi scan data. The wifi scan shell command has also been updated to output the raw scan data should the feature be enabled (PR #57699).
  • If you are using Wi-Fi on ESP32, you will be interested in learning that you can now use the wifi scan and wifi status shell commands, thanks to the fix in PR #57627.


  • The USB Battery Charging (BC) v1.2 specification defines limits and detection mechanisms for USB devices to draw current exceeding the USB 2.0 specification limit of 0.5A, 2.5W.
    Support for allowing BC1.2 peripherals to act as a charging device–a capability often provided on USB Type-C ports–has been added to Zephyr with PR #57101).
  • USB Communications Device Class (CDC) Ethernet Control Model (ECM) class has been added to the new experimental USB device support.
    The USB CDC-ECM specification allows devices to use a USB interface to emulate an Ethernet network connection. In simpler terms, it allows a device to connect to a network (like the internet) through a USB connection instead of a traditional network cable. See PR #54448.


  • Several notable Bluetooth bug fixes:
    • #56034 Bluetooth: Audio: CSIP set member register fix.
    • #57650 Bluetooth: Controller: Fix incorrect use of rx buffer in Tx ISR.

As always please feel free to jump in with your thoughts or questions in the comments below. See you next week!

If you enjoyed this article, don’t forget to subscribe to this blog to be notified of upcoming publications! And of course, you can also always find me on Twitter and Mastodon.

Catch up on all the editions of the Zephyr Weekly Update:

IoT Zephyr

Zephyr Weekly Update – Yes we CAN

As we’re entering a new month, I would like to start this week’s update with a quick look at some interesting metrics for the month of April, taken from the GitHub repository. And we are getting dangerously close to 500 boards supported upstream!

While I have your attention, I would also like to encourage you to take the Eclipse IoT Developer Survey and take some time to provide your input with regards to your embedded and IoT practices (which programming language or RTOS you use–hint, hint!–to hardware architectures, software supply chain management practices, etc).

And without further ado, let’s dive into this week’s noteworthy Zephyr contributions!

New boards, shields & SOCs

XMC4700 relax kit from Infineon.
  • XMC4700 relax kit board (#55435): Zephyr now supports the XMC4700 relax kit from Infineon. This evaluation board sports an XMC4700 micro-controller, based on an Arm Cortex-M4 @ 144MHz, with 2MB Flash and 352KB of RAM.
    This MCU is well-suited for applications that require motor control (ex: toys, power tools, industrial pumps, …) and for EV-charging scenarios.
  • ARC HS4xD support (#56683): Support for the ARC HS4x processor family has been added, including the board definition for the HS4xD development kit. Since some of you, just like me until a few weeks ago, might not be familiar with ARC processors, I recommend you have a look at the dedicated Wikipedia entry.
  • Many developer kits from ST Microelectronics feature a so-called Morpho connector. As opposed to the common “Arduino shield” type of connector, Morpho aims at exposing *all* the pins of the MCU, which can be really convenient to really make the most of the available peripherals.
    Thanks to Gerald and pull request #57468, ST Morpho connector nexus nodes are now supported and the pins mappings for Nucleo G431RB and Nucleo F302R8 boards have been contributed as examples.


  • NXP’s S32 family of microcontrollers are dedicated to automotive and industrial applications. As such, they support CAN XL, a variant of CAN that supports data rates up to 20MBit/s.
    With PR #52450, support has been added for NXP S32 CANEXCEL, and the board definition of the X-S32Z27X-DC has been updated accordingly.
  • The ADS114S08 from Texas Instruments is a low-power/low-noise 16-bit ADC. And of course, you’ve guessed correctly: it’s now supported 🙂 (#54911).
  • You might remember the Nordic nPM1300 Power Management Integrated Circuit (PMIC) from previous weeks, and the associated nPM1300-EK evaluation kit. PR #56929 added a driver for the charging module. The code sample for the evaluation kit has been updated accordingly.

Shell improvements

The Zephyr shell is definitely one of my favorite features. Its extensibility and ease-of-use to quickly expose “helpers” that help monitoring and troubleshooting an application are super convenient, and it’s great to see it got some love this week.

The Zephyr shell has been enhanced to allow capturing and retrieving return values from executed commands, making it easier for developers to diagnose issues and understand the outcomes of shell commands. Just use the retval command to get the return code of the command that was executed last.

uart:~$ sensor info
device name: hts221@5f, vendor: STMicroelectronics, model: hts221, friendly name: (null)
device name: lis2mdl@1e, vendor: STMicroelectronics, model: lis2mdl, friendly name: (null)
device name: lps22hb-press@5c, vendor: STMicroelectronics, model: lps22hb-press, friendly name: (null)
device name: lsm6dsl@6a, vendor: STMicroelectronics, model: lsm6dsl, friendly name: (null)
uart:~$ helpp
helpp: command not found
uart:~$ retval

Debugging and Testing updates

  • As of version 0.12.0, OpenOCD supports Espressif’s USB JTAG Programmer. Therefore, there’s no need for a custom OpenOCD anymore if you want to debug for ESP-32. Very cool! The instructions for all the supported ESP32 devkits have been updated accordingly (#56935).
  • When using the flash simulator, ex. when targeting QEMU or native posix, one can now use a memory region as the storage area. This allows the flash simulator to keep its contents over a device reboot (#57380). See an example here.
  • Twister now (#57121) includes an option to shuffle tests across subsets, providing a more efficient and randomized testing environmentZephyr Weekly Update – May 5, 2023. This can help detect unwanted dependencies in test execution order, as well as distributing better tests among subsets (i.e. make sure tests that run longer are distributed more evenly).


  • New flags for disabling Neighbor Discovery/Multicast Listener Discovery per network interface (#57377): New network interface flags have been added to disable Neighbor Discovery (ND) and Multicast Listener Discovery (MLD) per network interface. This allows interfaces that do not support ND/MLD (like OpenThread) to coexist with other IPv6 interfaces.

As always please feel free to jump in with your thoughts or questions in the comments below. See you next week!

If you enjoyed this article, don’t forget to subscribe to this blog to be notified of upcoming publications! And of course, you can also always find me on Twitter and Mastodon.

Catch up on all the editions of the Zephyr Weekly Update:

IoT Zephyr

Zephyr Weekly Update – I won’t retain you too long!

Welcome back to what I hope is starting to become part of a weekly routine for some of you. It certainly is for me 🙂 There are some very cool news this week, with the addition of a new retention mechanism, which I’ll explain in more details below.

I am also really excited to see that the popular AZ3166 MXChip IoT DevKit is now supported in Zephyr. It’s a developer kit that people familiar with Microsoft Azure IoT will certainly recognize, and I am looking forward to seeing what people will do with it now that it can be used with Zephyr!

Finally, a big shout-out to this week’s first time contributors: Andreas, Balthazar, Bill, Christian, Daniel, Katherine, Matthew, Sihyun, and Tarun.

New Retention Subsytem

The new retention system provides a robust and efficient way for applications to manage data that must be retained while the device is powered, without having to rely on non-volatile storage (64f4404).

The retention system API enables applications to read and write data to memory areas or devices that retain information while the device is powered. This functionality allows sharing information between different applications, or within a single application without losing state information upon device reboot.

Data Integrity

To ensure the validity of retained data, the retention system offers the option to use a magic header that can be used to verify if the front of the retained data memory section contains a specific value. An optional checksum of the stored data can also be appended to the end of the data, providing further validation.

Retained Data Partitioning

Data stored through the retention system can be partitioned into multiple distinct areas, making it easier to manipulate only the fields you need instead of a large binary blob.

There is extensive documentation about this new feature, so I definitely encourage you to check it out. Thanks Jamie for all the hard work on this!

New boards & shields

MXChip AZ3166 IoT DevKit
MXChip AZ3166 IoT DevKit
  • Like I mentioned in the intro, the MXChip AZ3166 IoT DevKit is now supported (ce339e3).
    It’s a board that many people familiar with the Microsoft Azure IoT ecosystem will not only recognize, but also likely already have somewhere in a drawer. If that sounds like you, I would definitely like to encourage you to give Zephyr a try, the Getting Started Guide is the best way.
    I am working on a short video that should make things even easier for you. Please let me know about your experience in the comments, if you give it a try!

    Note: the Wi-Fi module is not supported at this point, but contributions are welcome to propose an integration of the proprietary driver.
  • Adafruit’s Data Logger Shield is now supported (d4d8580). This shield provides an SD card slot and a real-time clock (RTC) for Arduino-compatible boards. The RTC chip it contains is the NXP PCF8523, for which a driver was contributed this week too.
  • Incremental ADC support (IADC) support has been added for Silicon Labs EFR32BG27 SoC (0417d38).
  • Added support for STM32U595 and STM32U599 with basic peripherals (a0ad7b7).


PAwR Advertiser and Sync Support

A typical application for BLE PAwR is electronic shelf labels (ESL)
A typical application for BLE PAwR is electronic shelf labels (ESL). Image credit: Dominic Alves.

The recently released Bluetooth 5.4 specification introduced the notion of Periodic Advertising with Responses (PAwR), a feature that allows Bluetooth Low Energy devices to perform energy-efficient, bi-directional, communication in a large-scale one-to-many topology. A typical application is electronic shelf labels (ESL).

As of this week, it’s now possible to use the PAwR Advertiser and Synchronization features (9021e2f, 95bc5cf). Support for Periodic Advertising Connection Procedure has also been added (PR 56374).

I encourage you to look at the codes samples (one for advertising, one for synchronizing, and the connection procedure too) to get more familiar with the functionality and how to use it in Zephyr.


  • A new driver for the Raspberry Pi Pico’s Programmable I/O (PIO) has been added (5abb1b1).
    PIOs can be used to implement custom peripheral interfaces or offload real-time tasks from the main processor. I like to think of it as a tiny FPGA that you can program using an assembly language, which describes the state machine dictating the behavior of your I/O pin. This, for example, would blink an LED attached to the pin:
.program hello
set pindirs, 1
  set pins, 1 [31]
  set pins, 0 [31]
  jmp loop

In order to illustrate how to use PIO for more complex/useful scenarios, a sample has been created that shows how to implement UART RX and UART TX pins over PIO. See example here, and driver here.

Vishay VEML7700 Ambient Light Sensor
  • The Vishay VEML7700 Ambient Light Sensor is a high accuracy ambient light sensor with an I²C interface (a665fc0). It has 16-bit of dynamic range and can perform ambient light detection from 0 to 120 klx.
  • New Incremental ADC (IADC) driver for SiLabs Gecko (0417d38). The incremental architecture uses oversampling to allow applications to trade speed for higher resolution (but it doesn’t look like oversampling is supported in the current implementation of the driver).
  • New driver for the NXP PCF8523 Real-Time Clock (RTC) (11fc5d0). The PCF8523 is a CMOS Real-Time Clock (RTC) and calendar optimized for low power consumption.
  • New driver for the Motorola MC146818B RTC (bfeb5043ac).
  • New Infineon CAT1 ADC driver (3e02d48e4e)
  • Texas Instruments INA3221 Current/Voltage Monitor (3746074). The INA3221 can sense current on up to 3 channels in a 0-26V range.

Updates to existing drivers

  • The SDHC driver has been updated to support different CPOL/CPHA SPI clock modes (1929eb3). This helps deal with SD Cards that require the clock to switch to low when not active.
  • The Semtech SX126x LoRa driver has been updated to support fine-grained Power Amplifier (PA) configuration for the STM32WL series (e78e8d7).
  • The hwinfo driver for all ESP32 boards has been updated to implement the get_reset_cause function (9eef799).

Miscellaneous Updates

  • Added Power Delivery (PD) Source Support to the USB-C Stack (see documentation).
  • A new MCUboot shell command (serial_recovery) has been added. It allows entering MCUboot’s serial recovery mode when the retention subsystem is used.
  • A new script has been added to generate coverage reports for the Zephyr’s BabbleSim-based tests (ad3c390).
  • New DT_ANY_INST_HAS_PROP_STATUS_OKAY macro. Given a Devicetree property name, it evaluates to 1 if any enabled instance of DT_DRV_COMPAT has the property or to zero if it hasn’t. (44ec128e8b)
  • To make first-time contributors feel welcome and encourage their continued involvement in the Zephyr project, a new GitHub action has been added that sends a greeting message to users when they open their first pull request or issue.
    I certainly encourage you to try it out by taking the plunge of doing your first contribution, if you’ve never contributed to the project!

As always please feel free to jump in with your thoughts or questions in the comments below. See you next week!

If you enjoyed this article, don’t forget to subscribe to this blog to be notified of upcoming publications! And of course, you can also always find me on Twitter and Mastodon.

Catch up on all the editions of the Zephyr Weekly Update: