Firmware for an endoscopic medical device, IEC 62304-ready
Audited and hardened AVR firmware of an endoscopic medical device, then prepared the software documentation required for device registration.
0compiler warnings with -Wall -Wextra
27host-run unit tests
1:1bit-for-bit reproducible build
Problem
The device occasionally raised a false “leak” alarm and could freeze on the I2C bus. Before registration, the manufacturer also needed formal software data: identification, version, safety class and resource usage.
What was done
- Code audit of the whole firmware, fixed the false leak detection logic.
- Added a 25 ms TWI timeout and bus recovery — no more I2C hangs.
- Clean build with -Wall -Wextra; RAM 31 %, Flash 60 % — headroom documented.
- 27 unit tests running on the host machine, no hardware needed for CI.
- Software description for technical specifications: safety class per IEC 62304, version scheme, checksum-based digital identifier, reproducible build.
- Tagged release with changelog.
Result
Stable firmware with a test suite and the documentation package needed to move the device to registration.