Close

Hardware testing

A project log for Open-source GreenPAK CLI tool + GSD driver

This is a feature creep that wouldn't just go away. This project is a CLI tool for GreenPAKs using the offical GreenPAK Serial Debugger.

anders-helgessonAnders Helgesson • 03/17/2026 at 21:24•0 Comments

I've wired up a 1Mbit eeprom on a breadboard to use for testing. It can be powered with 5 volts so it can endure the power output and ADC test sweep each hardware test cycle.

The test setup looks like this.

One of the LED's in the LED array lights up on power output from the GSD.

I've implemented support for embedded hal i2c. I managed to find some bugs that have to be fixed. 
There is a bug in the i2c write read transaction function which does not check for nack which returns the wrong error message, it times out instead with a waiting for the read to complete instead of error on nack. 
I didn't reimplement nack check test for it when I moved onto using the API layer for testing. Then I refactored some code and missed it.

With that bug fixed and the others marked with FIXME's for now as i've not implemented a good test for them. I clearly see the reason now why to do mocking. Setting hardware to do the error testing for all different types of failures is way more difficult and time consuming.

I'm testing the I2C code using the eeprom but I can do the I2C tests on the powerpak instead. I guess I'll have to make the muxing a hidden part of the API or something. I could then use that instead of the eeprom. This would make it possible for anyone with a GSD to just plug it in and run all the hardware tests.

Discussions