electrodyssey.net

Odyssey of Electronics and Computers

NASR-M board bring-up, Zephyr driver for TCA6416 GPIO

March 08, 2026 — Nazim

My love for Zephyr OS grew bigger after the successful driver adventure. A few days ago, I realized that the TCA6416 I2C GPIO expander isn’t supported by Zephyr, which was a setback. The TCA6416 GPIO controls the PLL clock on the NASR-M board. I need it to configure the clock. The good news was that Zephyr supports its bigger brother, TCA6424, which has 3 GPIO cells and 24 IO’s.


After reviewing the datasheets, I realized the driver rewrite would be trivial, so I did it by reducing the GPIO cells count and rewriting the chip IDs. It didn’t work right away, and I caught some bugs with a serial analyzer, but it was surprisingly easy. No additional SDK disks, no dark sorcery or cursing. The Zephyr code is very clear, and the APIs are described in a short yet concise way. To celebrate, I’ve got myself a box of Зефір (Zefir) candies from a Ukrainian shop. Teh codez are here:NASR-M-ZFW.

Tags: nasr-m, zephyr, embedded