Safety-Critical Firmware Automated Tests for Smart Brain Implants

From Dipl.-Ing. (FH) Hendrik Härter | Translated by AI 4 min Reading Time

Related Vendors

To counteract a dangerous increase in brain pressure in time, it must be monitored precisely. For this, Kitea Health has developed a system consisting of a brain pressure sensor and a mobile reading device. However, verifying the safety-critical firmware is associated with complex challenges.

Miniaturization: The implantable brain pressure sensor (Kitea sensor) weighs only about 0.3 grams (approx. 0.01 ounces). The safety-critical electronics are hermetically sealed in a biocompatible glass casing.(Image:  Parasoft)
Miniaturization: The implantable brain pressure sensor (Kitea sensor) weighs only about 0.3 grams (approx. 0.01 ounces). The safety-critical electronics are hermetically sealed in a biocompatible glass casing.
(Image: Parasoft)

Until now, doctors have been unable to objectively measure intracranial pressure outside of a clinic and often had to make therapy decisions based solely on symptoms. The medical technology company Kitea Health has therefore developed a new system: it consists of an implantable intracranial pressure sensor (Kitea Sensor) and a mobile reader device (Kitea Wand). This provides the treating physician with real-time data directly from the patient's brain. Since the system directly influences therapy decisions, it must be inherently safe. This posed enormous challenges, particularly in firmware development.

Hurdles in Firmware Development

When programming the software for the implantable sensor and the mobile handheld device, three key challenges were central:

  • Systematic risk control: Strict compliance with the IEC 62304 standard (software safety class B) was mandatory to demonstrate reliability and eliminate any patient risks caused by software errors.
  • High manual testing effort: The manual creation, management, and execution of over 1,000 unit test cases for more than 35,000 lines of C code proved to be error-prone and hardly scalable.
  • Limits of open-source tools: Free testing tools failed to handle the hardware-related system calls and library dependencies of the firmware. This repeatedly led to configuration errors and delays during the project.

High Demands on the Tools

A robust, automated testing solution was therefore needed, one that could seamlessly integrate into the company's development environment. The requirement was for a unified tool for comprehensive unit testing and static code analysis that supports programming standards for medical devices and achieves the high code coverage metrics essential for regulatory submissions. Additionally, professional support for quickly overcoming technical challenges had to be ensured.

The Kitea system at a glance

  • The implant (Kitea sensor): A wireless, battery-less micro-implant (weight approx. 0.3 g). Electronics and pressure sensors are hermetically sealed and adhesive-free in a biocompatible glass casing (Schott Proteon).

  • Communication and energy: Since the implant does not have a traditional battery, power supply and data exchange are conducted wirelessly through the skull using an external reading device (Kitea stick).

  • Firmware scope: More than 35,000 lines of C code for the sensor node and handheld device.

  • Regulations and standards: Development according to IEC 62304 (software safety class B) as well as compliance with programming guidelines such as MISRA C, CERT, and CWE for the planned FDA approval.

  • Testing metrics: Fully automated test suite with over 1,000 unit tests (runtime: < 30 minutes). Achieved code coverage: 99 to 100 percent statement coverage, > 90 percent branch coverage, and 80 to 90 percent MC/DC.

Certified Tools for Medicine

Image 1: The mobile handheld device (Kitea stick) wirelessly reads the real-time data from the sensor node through the skull.(Image: Parasoft)
Image 1: The mobile handheld device (Kitea stick) wirelessly reads the real-time data from the sensor node through the skull.
(Image: Parasoft)

After a thorough evaluation, Kitea Health chose the tool C/C++test from Parasoft. The deciding factors were not only the range of features and the price-performance ratio but also its suitability for the medical technology sector. For the development of safety-critical real-time embedded applications, the software aids in compliance with programming guidelines such as MISRA, CERT, and CWE.

Additionally, the test solution is certified by TÜV SÜD for functional safety according to the standards IEC 61508, IEC 62304, ISO 26262, and EN 50128/EN 50716. This helps development teams achieve the desired safety integrity level (SIL/ASIL).

Stubs and Metrics in One Environment

Image 2: By using the automated testing environment, Kitea Health was able to maximize code coverage, execute 1,000 test cases in under 30 minutes, and reduce firmware development time by 25 percent.(Image: Parasoft)
Image 2: By using the automated testing environment, Kitea Health was able to maximize code coverage, execute 1,000 test cases in under 30 minutes, and reduce firmware development time by 25 percent.
(Image: Parasoft)

Since unit tests and static code analyses are performed within the same environment, proving industry-specific standards has become significantly easier for developers at Kitea. Efficiency improvements have also been achieved: the test case editor allows for simple configuration of hardware stubs and parameterization of values, significantly accelerating the creation and maintenance of tests. The integration of the automated testing solution has fundamentally transformed Kitea Health's firmware development process and delivered measurable results for the project:

  • Accelerated development: The market launch could be brought forward by more than a month. The shortened development cycle ensured that the project remained on schedule for clinical trials and the future submission to the FDA.
  • High test speed: The entire suite with over 1,000 test cases now runs in just 30 minutes. This enables continuous test-driven development in practice.
  • Verifiable code coverage: The team consistently validates its firmware for high coverage and delivers the metrics required for regulatory audits: 99 to 100 percent statement coverage, more than 90 percent branch coverage, and 80 to 90 percent MC/DC (Modified Condition/Decision Coverage).
  • Automated proofs: The system automatically generates the required pass/fail reports as well as traceability evidence, providing convincing arguments for the FDA and other regulatory authorities.
  • High reliability: This thorough approach has led to no firmware-related errors being found in the field so far.

This is also confirmed by Masahiro Kondo, lead engineer for embedded systems at Kitea Health: "Managing test suites and running tests at the rigorous level required for medical devices was simply not feasible with free unit testing tools. Running our entire suite with over 1,000 test cases in just 30 minutes makes the use of C/C++test invaluable for us."

The article is based on a case study by Parasoft. 

Subscribe to the newsletter now

Don't Miss out on Our Best Content

By clicking on „Subscribe to Newsletter“ I agree to the processing and use of my data according to the consent form (please expand for details) and accept the Terms of Use. For more information, please see our Privacy Policy. The consent declaration relates, among other things, to the sending of editorial newsletters by email and to data matching for marketing purposes with selected advertising partners (e.g., LinkedIn, Google, Meta)

Unfold for details of your consent