Skip to main content
Firmware Stable

Changelog

For ESC module For ESC driver and common block for controllers

[6.0.0] - unreleased

DRIVER:

  • [esc3/esc5] New blhs driver: sensorless block commutation with hall / ZC detection (experimental, low-cost controllers)
  • [esc3/esc5] Angle predict/retrodict timing rework to support >100k ERPM. NOTE: edc now trims on top of a built-in 40us offset — re-check tuned values
  • [esc3/esc5] MTPA d-axis overhaul: dxc is now the d-current limit/side-selector, full MTPA applied; fix magnetizing (dxc<0) clamp. NOTE: behavior change for PMSM tuned with dxc<1
  • [esc3/esc5] Add experimental xro MTPA saliency override (param 42) and assf auto-sensorless flags (param 44). NOTE: assf adds a param (binary-config breaking)
  • [esc3/esc5] Back-port LFI sensorless aid to esc3; rename LFI -> SENSORLESS_LFI; add lfamp/lfreq (params 48/49)
  • [esc3/esc5] Add ppr auto-identification for encoder/resolver; fix encoder ppr on second-time init
  • [esc3/esc5] Fix inductance measurement noise for high-inductance motors (OLS estimator)
  • [esc3/esc5] Sensorless: fix sgnspeed seeding, NaN-poisoning immunity, simplify sensorless_simple
  • [esc5] Fix assumed sample-latch timing of analog sensors
  • [esc3/esc5] Rework idle-state back-current detection; add idle over-speed detection
  • [esc3/esc5] Prime DMA buffer at driver_start to avoid initial voltage-measurement glitch
  • Expose PID params in the vmt table (MAX_PRMS 128 -> 140). NOTE: param-table layout change
  • [esc3/esc6] Standalone softfloat_f2d (flash optimization); rename psi -> psi_pm
  • [ident] Disallow negative da, dc
  • [limiter] Prevent zero division with rdec
  • Add beep mechanism

CMIO:

  • Amp-expander overcurrent threshold and dout PWM period settable at runtime
  • Contactor PWM period settable at runtime; add contactor low-level override APIs
  • Invalidate ptc reading on amp-expander timeout (no stale motor temperature)

BOARD:

  • New esc7 platform: gx0, bh0 (blackhawk), poc boards; external-SAR/DFSDM delta-sigma current sampling; bldc port
  • [esc6] Rename board bx0 -> rt1; make CM_CTR (center-tap) current measurement work
  • [esc6] Add NO_HSE option for crystal-less boards
  • [esc3] Add sl2 board

BUILD:

  • CMSIS-macro refactor of pwm.h/adc.h/dma.h (esc3/5/6/7); decouple hal/adc from pwm.h
  • Makefile improvements (Windows performance, build-mirror layout); emulator-compilable esc3/bldc

[5.3.1]

CMIO:

  • Fix contactor indexing bugs: tick loop now init/set/ticks each contactor (contactor[i]) instead of only contactor[0]; fix CCNT1 reading contactor[0] current instead of contactor[1]

[5.3.0]

  • Add over-speed detection while idle
  • Reduced flash footprint
  • Add esc3 sl2 board
  • Contactor overcurrent threshold and PWM period are now adjustable at runtime (enables embedded fan control)
  • On SL/SC, invalidate the ptc temp value on expander timeout

DRIVER:

  • [esc3/esc5] Add over-speed detection in idle state (by checking idle voltage)
  • [esc3/esc5] Rework idle-state back-current detection
  • [esc3/esc5] Fix encoder ppr effect on second-time init
  • [esc3/esc6] Use standalone softfloat_f2d for float-to-double promotion (flash space optimization)
  • [esc5/esc6] Make sensorless observer immune to NaN poisoning
  • [ident] Disallow negative da, dc

CMIO:

  • [SL] Amp-expander overcurrent threshold is now settable at runtime via io_ioexp_ampboard_1_set_overcurr_thr() (was the compile-time CMIO_DEF_OVERCURR_THR)
  • [SL] Amp-expander dout (contactor) PWM period is now settable at runtime via io_ioexp_ampboard_1_set_dout_period(); dout duties are rescaled to the period
  • [esc3/esc5] Contactor PWM period is now settable at runtime via io_contactor_set_period(); IO_CONTACTOR_SET duty scaling now derives from the live timer ARR

BOARD:

  • [esc3] Add sl2 board (dual main-MCU contactors without current sensing)

[5.2.0]

DRIVER:

  • [bldc] fix seamless transition between modes - PID preset glitch by wrong measurement
  • [esc3/esc5] fix esc5 encoder clock
  • [esc5] encoder code - align check according to esc3
  • [esc3/esc5] fix PWM-based encoder homing (ENCODER_HOME_WITH_PWM), clear spurious EXTI13 after homing
  • [esc5] use EXTI13 reference latch (port from esc3) instead of polled HALLW for encoder reference-pulse detection
  • Fix detection of no margin (RANGE bit - overspeed)
  • Fix PTC temperature handling: set ptc_temp to -1 to indicate invalid state, do not fire STAT_ADC without valid readings, do not log maxmotortemp when sensor is in error
  • [esc6] remove variable description from vector.c to save flash memory
  • [PID position loop] when freewheel + position loop is used, the reference is maintained and PID computation is stoped (to prevent integration error)

CMIO:

  • Add more songs and compile flag to remove them
  • Increase precharge voltage to 120V for MV controllers

BOARD:

  • Add esc3-am2 board variant (with calibration)

[5.1.0]

DRIVER:

  • Add simplified sensorless mode (SENSORLESS_SIMPLE) - alternate BEMF estimation using alpha-beta frame directly, without per-phase linear regression (no zero-speed torque, but simpler computation)
  • Refactor sensorless observer input
  • Add redundant input states to the REST for alternative sensorless evaluation (prest mode 17)
  • Fix ACIM speed readout error in esc5
  • Fix run shell command: return negative value of release when driver in error (siliSpin compatibility), fix early return when no arguments

DRIVER ESC6:

  • Add BLDC driver port from esc5 (block commutation motor driver core, simplified - no chop, no DTC)

CMIO:

  • Contactor on main MCU now has adjustable period (during compile time)
  • Add CMIO_CONTACTOR_VOLTAGE_ERROR safety macro for global close in voltage control on driver errors
  • Improve contactor voltage control comments and documentation for precharge/non-precharge variants
  • [esc3] allow use of different timers for COM generation to free timer for PWM capture
  • Refine PWM input comments and help strings

[5.0.0]

DRIVER:

  • Major rework of ESCx driver/VECTOR to extend speed range to 150k ERPM, voltage to 120V and low inductances
  • Redesign of the peripheral interconnect to achieve hardware blanking (overall eficiency, less burden)
  • Silencing the ZC-related swithing noise by disabling DTCOMP feature (low inductance silence, vcf 64)
  • Overcurrent and over/under voltage protection acts within cycle with hardware trigger (MV / low inductance safety)
  • Sensorless observer uses esk, eak for high speed operation (solve sudden noise/harsh from certain speed)
  • Enable current loop PI coefficients automatic identification during identlin, non-linear mod is now default
  • Sync spin-up detects motor out-of-sync and proceeds to identification, default acceleration to 200 rad/s/s
  • Beep synth volume and limitation corresponds to the identified dynamics
  • Experimental 'LFI' feature for better sensorless startup (on request)
  • Sensored observer advancing correction, negative 'edc' parameter may not be needed (safety for IPM motors)
  • Init diagnostics better averaging for better reliability (solve ocassional diag false negatives)
  • Redo fet equalization control to quieten and consider overtemperature, speed, etc.
  • Add 'dcr' parameter to filter possible PID to DC coupling, current command decoupled from DC voltage fluctuation
  • Add negative 'esk' constant possibility for direct mapping of MxPx rference (faster response)
  • Better analog signal exposing in esc5: averaged gpios, correct temp, avcc and vcc measurement
  • Set default ipeak value to the current range
  • Fix reinit mctim dependency glitch
  • Short-circuit mode uses 'irefr' as a limiting reference for both axes
  • States for position control stream now synchronized in platformAPI
  • stop command now also disables beeping, run will re-enable it (use run 0 0 to stop motor but keep beeping)

DRIVER CALIB:

  • adjust and unify voltages in defcalib.c:
    • VOLTAGE_ABSMAX is always lower (all ecs5 and 150V esc3-sl) or equal (all esc3 except 150V sl) to transistors breakdown voltage
    • VOLTAGEHI_THRESHOLD was lowered for some esc3 and unified with esc5, where possible
    • VOLTAGE_OPMAX is always 1.02 times the maximum operating voltage given by the series cell count and 4.2V per cell. The 2% margin accounts for the measurement tolerance, to be always sure, that controller will run at maximum operating voltage without limiting power.
  • adjust lsb/V in defcalib.c for esc3-sl1 controller. New value will compensate for error caused by the SAR ADC current draw from the relatively high impedance voltage divider. esc3-sl1 controllers will no report battery voltage about 2.5% higher than before.

CMIO:

  • Refactor and optimize
  • SL fix contactor overcurrent report
  • better consistency in expander error reporting
  • PWM inputs (chX) are distributed alongside the pulse counter together (through CMIO API)
  • fix existing PWM inputs (init when timer not used by driver MSENS), extend PWM input channel count up to 6
  • add new isolated PWM capture on gpio4 - ch5 (needs custom HW variant for threshold at 5V)

[4.1.1]

Fixed

  • [esc5] discont function generating reset during metadata write because of wwdg

[4.1.0]

Changed

  • Driver override levels. From this version the run and stop commands override CAN API.

[4.0.2]

Fix

  • Refactor cmio code
  • Fix mctim glitch after driver error
  • Fix/add missing imult,umult for BLDC driver for esc3
  • Tune calib for ed1 board

[4.0.1]

Fix/Changed

  • ACIM odo calculation
  • beep modulation in VECTOR esc3/esc5: run-time compatible
  • Fix RC (PWM) input for esc3-sc1 and esc3-sl1

[4.0.0]

Added

  • Support for esc6 family
  • encoder msens with PWM homing and reference input

Changed

  • PPM_CAPT is removed from default build configuration
  • DRIVER_STAT_SPEED dropped and replaced by DRIVER_STAT_RANGE (signalizing that an operational range was exceeded)
  • Open contactor on driver error now exclude service mode and cmio error.

[3.3.0]

Fix/Changed

  • For esc5, fix problem with disconnected motor temperature sensor (power is limited)
  • Changed - Now doesnt matter if motor temp sensor is disconnected or shorted, power is limited always.

[3.2.1]

Fix

  • [auxiliary] refine plot set-up ordering to defeat missed features when using identXXX

Changed

  • [vector] cmd 0 disables DXC feed

[3.2.0]

Added

  • Getter for /permanents/err_counter

[3.1.1]

Added

  • [msgconf] enable umsg DMA reception fifo for all ESC3 controllers

Changed

  • [msg_pool] make fifo free space variable (if-dependent) to prioritize messages from ioexp's over CAN
  • [limiter] separate positive and negative battery current multipliers and corresponding api

[3.1.0]

Added

  • [CMIO] invalidate inputs for while, after ioconf is changed (only for ioexp)

Fix

  • [CMIO] fix ioexp problems - random cmio inputs invalid

[3.0.0]

Changed - BREAKING CHANGE

  • remove default support for HALL sensors and sensoreless mode. Now it is necessary to define HALL or SENSORLESS compile flag in application.
  • Some work on ioexp

[2.3.0]

Added

  • add getters for imult, umult, rmult

Fixed

  • fix uabc_gain correction application (for psi calculaion)
  • add back scope scrolling flag reset during idents
  • fix sensor error reporting when duing sensorless identrun

[2.2.6]

Fixed

  • esc3 BLDC - fix RThermistor and VThermistor - move them to /driver/motor

[2.2.5]

Fixed

  • msgpool - limit print of rx fifo ovf

[2.2.4]

Fixed

  • OBD2:
    • Signal OBD2 support
    • Fix message lenght of extended messages (CALID, CVN,...)
  • fix emulator compilation for Linux
  • make emulator to support all controllers
  • ESC5/BLDC low speed commutation problem (late measurement in phase ON-state due to MCU ADC bug patch)
  • measure coeff and apply correction to phase voltage measurement (to better PSI measurement)

[2.2.3]

Fixed

  • Remove ioexp_tim state from common block

[2.2.0-2]

Added

  • phase imbalance API
  • IBNEG, IBPOS modesels
  • ioexp add ack from ioexp, after receive config
  • vcf 1 (extended d current priority)
  • motor sensor error reported from identrun
  • fix bcfq preload (now with filtered current)
  • mctim now remembers imult, umult and rmult
  • printout of the union module version
  • ioconf 104 for wheel magnet sensors

Changed

  • bcfq compensator is now preloaded with measured q current
  • identrun return -3 in case of HALL sensor err
  • [esc3] MCU temp is now using factory calibrated data (more precision of MCU temp reading)

Removed

  • some unnecessary driver debug outputs during init

Fixed

  • PARAM_ALIGNMENT 4 for driver params (VMS unaligned warning fix)
  • CCTL compensator in BLDC causing limiters not to work when motor backdriven
  • ioexp allow unexpected msg
  • identX fixes of crash, better scope control, shared identification data

[2.1.1]

Added

  • phase-specific i2r limiter in all controllers
  • motor mode 7: battery current control

Changed

  • a0 diag - motor state decission new thresholds
  • turn off mosfet equalization at CMD_SHORT
  • unify compile flags. SENSORED -> HALL
  • /driver/motor/odo is independent from application
  • change to real KV calculation in identrun output
  • set higher maxval for the tcc param
  • driver_aux_set_command() allow set imult to zero
  • GDIN treshold for -1 on AM/AX

Fixed

  • compilability with the emulator/SX
  • torque estimation calculation with IPM motors
  • DMA shutdown in process_safe callback - solve permanents saving problem
  • negative ipeak wrong behavior in BLDC
  • setprm_indirect() spurious behaviour caused by acceess rights
  • driver_get_epos() now works comparably in both BLDC and VECTOR
  • high priority limiter problem in BLDC
  • problem with DIN on SX
  • do not log IOvolt error from expander
  • ioexp message timeouts behavior revert back to original logic
  • fix fwc api when FW is not defined
  • shutdown() function doesn't force 100ms delay, aux api supports argument

[2.1.0]

Added

  • AX controller
  • Add support for new revision of AMP board
  • ebmult - external battery current multiplier

Changed

  • Removed warnings
  • Unify driver compile flags

[2.0.0]

  • Complete refactored. ESC3, ESC4 and ESC5 driver and common block unified.

Added

  • SX controller

Changed

  • Permanents changed to integer values, instead of float
  • RThermistor and VThermistor moved to /driver/motor
  • Default values:
    • By default all contactors are open on startup
  • /common folder:
    • States names and type is unified
    • ichg and uchg moved and renamed: /powerswitch/ps_curr and /powerswitch/ps_volt
  • Parameter rename:
    • gpio_thr [lsb] -> pulsethr [mV]
    • gpio_thr2 [lsb] -> adin_thr [10mV]
  • State rename:
    • ccnt1-3 -> contactor1-3/current

[1.2.0]

Init commit. Changelog starts.