Hi all! I wanted to share a new project that I’ve been working on lately, and potentially see if anyone’s interested in helping out with it going forward.
Several years ago, Mbed released the CI Test Shield, also known as (part of) the Mbed HDK. This shield is a very clever idea: it allows manufacturers implementing Mbed boards to test hardware features of the board (e.g. SPI, I2C, and PWM) by having their board talk to different ICs. While it’s not as comprehensive a test as the FPGA-based test shield currently used by ARM, it is very cheap and easy to manufacture. So, it’s a lot more feasible to set this board up for a large fleet of Mbed devices, compared to the FPGA CI shield that’s so expensive that it’s only implemented for a small percentage of devices.
I’m interested in trying to set up a community-run CI server that will be able to test pull requests for Mbed in the event where support from ARM goes away completely, and I want to use this board for it. However, rather than just redraw the board as-is and order it, I also wanted to make a design revision that adds some extra test functionality. Without further ado, I present the new Mbed CI Test Shield:
It’s similar in spirit to the original, but features the following improvements:
- Swapped the AT24LC EEPROM for an 24FC02-I/SN. In addition to actually being in stock, this EEPROM supports Fast Mode Plus I2C (1MHz) so can be used to test at the faster speed for MCUs that support it
- Added an analog averaging circuit that averages the PWM out and feeds it back in to the Mbed board as an analog input. This can be used to test the PWM and AnalogIn implementations.
- Added a header for a Bus Pirate, an inexpensive hobby logic analyzer. This does multiple things:
- Spies on all SPI and I2C traffic and generates logs that can be saved from the CI job. This should help when troubleshooting bus issues on CI.
- Can act as an SPI and I2C master, allowing the Mbed device’s SPI and I2C slave implementations to be tested
- Can perform frequency measurement for testing PWM frequency
- Can perform analog voltage measurement for testing the DAC output and PWM duty cycle
With these changes, the number of tests that can be performed with this single board should increase by a lot! The schematics and planned test cases are available on the GitHub page here, and I am in the process of ordering the first few boards for fabrication right now.
Going forward, I will attempt to update the original Mbed OS test cases to work with my new hardware and the latest Mbed OS. Let me know if you are interested in helping out, and I can send you one of the boards!