Testing I2C and SPI communication

There are a number of driver variants in JeeH for external chips attached via I2C and SPI. To test these (on several different boards), I made a small circuit with both an I2C and an SPI memory chip on it. This way, automated tests can be set up to verify …

Running embedded tests on a µC

My, how time flies … again!

Unity and doctest#

Since I’m using PlatformIO, the obvious candidate for running embedded tests is Unity. It’s small, and well-supported with pio test. It’s also a far cry from what the native-only …

Interrupts

Interrupts can be very useful: as the name says, they signal when something has happened while you’re busy doing something else. In embedded systems they can tell you when a a timer expires, when a pin level changes, and when an I/O operation …

Sync mode drivers

As described in the previous article, JeeH’s “tasks” implement a limited form of concurrency. This includes “async” drivers to deal with interrupts. But asynchronous I/O requests are somewhat inconvenient: once such a request …

Multitasking

JeeH supports a limited form of multitasking. There is only a single stack: there are no threads to suspend or resume, but also no need to allocate separate stacks to each one. This single stack expands downwards with the rest of unused RAM available for …

It's been a while

How time flies … (and there’s a reason: we’ve moved to a new apartment).

I’ve started working on JeeH again (which is now at version 7). There have been several substantial changes, affecting all parts of the project:

Goodbye threads, hello workers

The big picture in JeeH is still not right: I don’t like the way device drivers run in an exception-centric “handler” mode, whereas the rest of the application uses “thread” mode. This distinction was needed to provide atomic …

JeeH 6.1.0

JeeH version 6.1.0 release notes and highlights:

This is a minor release. I’m pushing this release out to prepare for some new ideas - mostly aimed at reducing overhead and complexity, and at improving JeeH’s low-power capabilities.

The current …

JeeH 6.0.0

JeeH version 6.0.0 release notes and highlights:

This is a major new release of JeeH. A lot of things have changed:

  • Now you see them, now you don’t: tasks are gone again. The routing of task messages was too complex. Threads are unchanged. Messages …

Four ways to SPI

One of the problems I want to address in JeeH, is how to best interface with peripherals: built-in as well as connected via a common bus, e.g. I2C or SPI. There are two sides to this: talking to built-in hardware via device registers, and talking through …