Benjamin Cabé

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

Zephyr Weekly Update - April 28, 2023

Zephyr Weekly Update - April 28, 2023

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

Bluetooth

PAwR Advertiser and Sync Support

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.

Drivers

.program hello
set pindirs, 1
loop:
  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

Updates to existing drivers

Miscellaneous Updates


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:

Exit mobile version