“Illegal Hall State” Error on M0 Despite Valid Hall Signals

Hello ODrive Support Team,

I’m encountering a persistent “Illegal Hall State” error on axis M0 during the full calibration sequence, and I would greatly appreciate your guidance.


System Overview

ODrive Firmware: v0.5.3 (built from source)
Hardware:ODrive v3.6 running at 48 V bus voltage, 12 V logic supply
Axis M0: Custom BLDC motor with three Hall sensors
Axis M1: No motor connected
*Control Interface: Python scripts leveraging the odrive library v0.5.3

Symptoms

  1. Full Calibration Sequence on M0 fails immediately with:

    Error: ILLEGAL_HALL_STATE (hall_state = 4)

  2. Motor Calibration and Encoder Calibration both complete successfully with no errors.

  3. Observing the Hall inputs with an oscilloscope confirms three clean, 0 V–5 V square-wave signals—no noise or undefined states.

  4. A simple Python loop reading axis.motor.hall_state during manual shaft rotation always returns valid states (0–7), never “illegal.”

  5. I have replaced the Hall sensors and wiring with new, identical components; the issue persists.

Troubleshooting Steps Taken

  • Verified Hall voltages on all three channels with a scope (clean square waves).
  • Monitored hall_state in real time via Python (always 0–7).
  • Tested operation in encoder-only mode (works reliably).
  • Performed Hall polarity and phase calibration manually.
  • Tried different Hall sensor modules and cables—no change.

Questions

  • Why does the full calibration sequence detect an illegal Hall state when individual calibrations and live readings are all valid?
  • Are there any hidden parameters or timing requirements in the Hall-based calibration routine that I might be missing?

Any insight or suggestions would be extremely helpful. Thank you very much for your time and assistance.

Best regards,
Diego Zumaquero

Hi Diego,

When the motor is operational (whether during calibration or closed loop control), the phases will be switching, which puts out some electromagnetic interferance. The ODrive v3.6 has some major signal integrity issues, which can cause issues with hall sensors. We recommend soldering 47nF capacitors to the board as so: Encoder error ERROR_ILLEGAL_HALL_STATE - #7 by madcowswe, and you can also use ferrite rings on the motor phases to further reduce EMI.