Host Adapter Firmware Implementation with CircuitPython
Ahola, Tomi (2023)
Ahola, Tomi
2023
All rights reserved. This publication is copyrighted. You may download, display and print it for Your own personal use. Commercial use is prohibited.
Julkaisun pysyvä osoite on
https://urn.fi/URN:NBN:fi:amk-2023052915184
https://urn.fi/URN:NBN:fi:amk-2023052915184
Tiivistelmä
Semiconductor manufacturer ROHM CO., Ltd was exploring alternative host adapter options for their evaluation kit platform. This evaluation kit platform consists of software, hardware, and firmware, and is utilized for evaluating ROHM products such as sensors. The microcontroller-based host adapter runs ROHM’s proprietary firmware written in C and bridges the PC software to the ROHM product. The currently used microcontroller boards face limitations such as hardware’s high cost and low availability, restricted I/O voltages, and difficulties with the firmware’s updating procedure. Commissioned by ROHM Semiconductor GmbH, the aim of this thesis was to address these limitations by implementing a new cross-platform compatible host adapter firmware for microcontroller boards using CircuitPython programming language.
ROHM had developed an emulator software in Python that emulates their products and is primarily used for evaluation kit software testing purposes. This emulator had been ported to CircuitPython and was running on the Raspberry Pi Pico microcontroller board prior to the start of this project. It formed the foundation for this project, as it provided a lot of the required message handling functionality. The project began by researching the primary communication methods to be incorporated, such as SPI, I2C, ADC, and PWM. Then the existing emulator software was refactored to allow the addition of new features, while also preserving its original functionality. Other microcontroller boards used during the development were Adafruit’s Metro M4 Express and Feather Bluefruit Sense.
A new host adapter firmware was developed that addressed the previous limitations as CircuitPython provided access to a wide range of microcontroller boards and offered a uniform API that enabled the firmware’s cross-platform compatibility. However, using an interpreted programming language like CircuitPython comes at the cost of decreased performance compared to the compiled C language. Therefore, the previous C implementation will be used for tasks that require higher performance. Both manual and automated tests were incorporated to ensure the functionality of the new firmware.
ROHM had developed an emulator software in Python that emulates their products and is primarily used for evaluation kit software testing purposes. This emulator had been ported to CircuitPython and was running on the Raspberry Pi Pico microcontroller board prior to the start of this project. It formed the foundation for this project, as it provided a lot of the required message handling functionality. The project began by researching the primary communication methods to be incorporated, such as SPI, I2C, ADC, and PWM. Then the existing emulator software was refactored to allow the addition of new features, while also preserving its original functionality. Other microcontroller boards used during the development were Adafruit’s Metro M4 Express and Feather Bluefruit Sense.
A new host adapter firmware was developed that addressed the previous limitations as CircuitPython provided access to a wide range of microcontroller boards and offered a uniform API that enabled the firmware’s cross-platform compatibility. However, using an interpreted programming language like CircuitPython comes at the cost of decreased performance compared to the compiled C language. Therefore, the previous C implementation will be used for tasks that require higher performance. Both manual and automated tests were incorporated to ensure the functionality of the new firmware.