Unit Testing for India’s Two-Wheeler EV Industry: ISO 26262 for Motor Controller Firmware
India’s two-wheeler electric vehicle market is entering a new phase. The initial wave of EVs prioritized time-to-market, get the product out, capture early adopters, iterate on hardware and software simultaneously. That approach worked for the first generation. But as the industry matures, as fleet operators demand reliability guarantees, and as export markets impose safety certification requirements, the engineering rigour behind the firmware must catch up.
Motor controller firmware, inverter control algorithms, and battery management logic are safety-critical software. A firmware defect in the field of weakened torque limiting, uncontrolled regenerative braking, or thermal runaway mismanagement can injure the rider. ISO 26262, the automotive functional safety standard, applies to two-wheelers, and its unit testing requirements are the same whether the vehicle has two wheels or four.
Where the Safety Risk Lives
In a two-wheeler EV powertrain, the safety-critical firmware components include:
Inverter control. The firmware that switches the IGBT/MOSFET bridge to drive the BLDC or PMSM motor. Timing errors can cause shoot-through (simultaneous high-side and low-side conduction), destroying the power stage and potentially causing a fire. Dead-time management, overcurrent detection, and fault reaction logic are ASIL B or higher.
Motor control algorithms. Field-oriented control (FOC) and direct torque control (DTC) algorithms compute PWM duty cycles based on motor position, speed, and torque demand. Errors in the coordinate transformation (Clarke/Park) or PI controller tuning can produce unintended acceleration or loss of torque. For throttle-by-wire systems, this is ASIL C or D.
Battery management. Cell voltage monitoring, state-of-charge estimation, thermal management, and charge/discharge current limiting. Firmware errors can lead to overcharging, deep discharge, or operation outside the safe operating area, all of which pose fire or thermal runaway risk.
Regenerative braking. The algorithm that converts kinetic energy back to battery charge during deceleration. Incorrect regen torque calculation at high speed or on low-traction surfaces can cause rear-wheel lock-up.
Why Indian 2W EV Teams Need ISO 26262
Three forces are driving ISO 26262 adoption in India’s two-wheeler EV segment:
Export market access. European and Japanese markets require functional safety evidence for type approval. Indian OEMs targeting global markets need ISO 26262 compliance, not as a nice-to-have, but as a regulatory prerequisite.
Fleet operator requirements. Large fleet operators (delivery logistics, ride-sharing) are beginning to include safety certification in their procurement criteria. A fleet of thousands of vehicles amplifies the probability of encountering firmware defects.
Regulatory trajectory. India’s automotive safety regulation framework (AIS standards) is progressively aligning with international standards. While ISO 26262 compliance is not yet mandated for two-wheelers in India, the trajectory points toward mandatory functional safety requirements.
What ISO 26262 Requires for Unit Testing
ISO 26262 Part 6, Table 9 specifies structural coverage metrics for unit testing by ASIL level:
- ASIL A: Statement coverage (recommended)
- ASIL B: Branch coverage (highly recommended)
- ASIL C: Branch coverage + MC/DC (recommended)
- ASIL D: MC/DC coverage (highly recommended)
For motor controller and inverter firmware rated ASIL C or D, MC/DC coverage is the target metric. This means every atomic condition in every compound boolean expression must be demonstrated to independently affect the decision outcome.
Table 10 recommends systematic test case design methods (equivalence partitioning, boundary value analysis) for ASIL C and D, ad hoc testing is insufficient.
How TESSY Addresses 2W EV Testing
Razorcat TESSY provides the unit testing infrastructure that two-wheeler EV teams need:
MC/DC coverage measurement. TESSY measures MC/DC and MCC coverage on the compiled firmware, using the project’s actual cross-compiler (Arm Compiler 6 for Cortex-M, TASKING for AURIX). Coverage results reflect the production binary, not a host simulation.
Classification Tree Editor. The CTE enables systematic test design for complex motor control algorithms. Engineers define equivalence classes for motor speed, torque demand, temperature, and battery state-of-charge, then generate test vectors that systematically exercise boundary conditions and error scenarios.
On-target execution. Through SEGGER J-Link, TESSY executes tests on the actual microcontroller, STM32 Cortex-M, TI C2000, or Infineon AURIX, and collects coverage data from real hardware. Safety assessors accept this as evidence of target-based verification.
ReqIF traceability. TESSY links test cases to safety requirements via ReqIF import/export, providing the bidirectional traceability that ISO 26262 Part 6 mandates for ASIL C and D.
CI/CD integration. Automated regression testing in Jenkins or GitLab ensures that firmware changes do not break existing test coverage, critical for fast-moving 2W EV development cycles.
The Pune and Chennai Context
India’s two-wheeler EV development is concentrated in two cities:
Pune is the traditional hub for two-wheeler engineering. Established OEMs and new EV startups alike maintain R&D centres here, with proximity to automotive component suppliers and test tracks. Motor controller firmware development for two-wheeler EVs is a growing discipline in Pune’s embedded engineering community.
Chennai hosts significant two-wheeler manufacturing and R&D capacity. The city’s automotive ecosystem includes both OEM engineering centres and Tier-1 suppliers developing powertrain electronics for the EV transition. Chennai’s embedded teams are increasingly working on safety-critical firmware for inverter and BMS applications.
Both cities need access to safety-qualified unit testing tools with local technical support, tools that understand embedded cross-compilers, work on real target hardware, and produce the certification evidence that ISO 26262 assessors require.
Why Buy from GSAS
GSAS Micro Systems is India’s authorized Razorcat partner, providing TESSY licensing for two-wheeler EV and automotive projects with INR invoicing, onboarding training, and ISO 26262 tool qualification consulting. Our engineers in Bengaluru, Hyderabad, Chennai, Pune, Mumbai, and Delhi NCR help motor controller and BMS firmware teams deploy TESSY with the correct compiler integration, target hardware support, and CI/CD pipeline configuration. Whether your team is a two-wheeler OEM starting its ISO 26262 journey or a Tier-1 supplier deepening its safety verification capability, GSAS provides the tooling and local expertise to get your unit testing to certification standard.
Also appears in:
Interested in Razorcat tools?
Talk to our application engineers for personalized tool recommendations.
More from Razorcat
View all →