Skip to content

[1.17.0+] Possible regression: BiSS-C external encoder may skip auto-alignment on cold boot (TMC4671 ext) #191

Description

@tinyboxxx

Hello, Ultra! A user report suggests a startup/calibration regression in firmware v1.17.0 when using a TMC4671 base with an external BiSS-C encoder (reported setup: Delta 100 base, 23-bit BiSS-C). The same hardware reportedly works as expected on v1.16.6, v1.15.1, and v1.15.0.

I have not reproduced this locally (because I do not have a BiSS-C motor); this issue is based on user feedback and a preliminary code review (and manly assist by AI).


Reported behavior

Cold start (MCU reset):

  • After PC reboot or USB disconnect/reconnect, then applying 48V power, the wheel base does not appear to run the usual auto self-calibration (no audible/visible alignment sequence).
  • Force feedback may not work correctly until the user opens the configurator and runs manual calibration.
  • After manual calibration, operation is reportedly normal.

Warm restart (MCU stays powered):

  • With USB connected to a running PC: after 48V power-off (until low-voltage warning), then 48V back on:
    • Auto self-calibration may not run, but the base may recenter and work normally.

Firmware versions tested (per user):

Version Result
1.17.0 Issue reported
1.16.6 Reported OK
1.15.1 Reported OK
1.15.0 Reported OK

The user also reported reflashing v1.17.0 after a full chip erase + forced DFU; behavior was unchanged.


Configuration (as reported)

  • Base: Delta 100 (TMC4671)
  • Encoder: BiSS-C, 23-bit
  • Encoder forwarding: external encoder on TMC4671 (typical BiSS-C + TMC ext setup)
  • Issue seems limited to 1.17.0 in their tests

Possible cause (hypothesis — not confirmed)

Initial code review suggests this might be related to the TMC4671 external encoder startup path, not BiSS-C 23-bit specifically:

  1. externalEncoderPhieOffset may only live in RAM and might need to be recomputed on each cold boot via bangInitEnc() / encoder alignment.
  2. During early init, restoreFlash()setHwType()setEncoderType(ext) may run before the BiSS-C encoder instance is attached (drvEncoder still null).
  3. In that case, the firmware might set encoderAligned = true without completing alignment.
  4. Later, initializeWithPower() may skip encoder setup when encoderAligned is already true.
  5. That could match: works after warm 48V cycle (RAM retained), fails after cold boot (offset lost), fixed by manual calibration (forces full cal path).

Relevant changes between v1.16.6 and v1.17.0 that might affect this (needs verification):

  • TMC hw config refactor (setHwType() calling setEncoderType())
  • External encoder timer / setEncoder() init changes (06e73d2)
  • motor_type != NONE guard before encoder init (03dfdb1)
  • isEncSupported() check in setEncoderType()

Note: v1.17.0 changelog items such as ABN filter = 5 and MagnTek forwarding fixes probably do not apply to BiSS-C external encoder setups.


Suggested diagnostics (if reproducible)

On a failed cold boot, before manual calibration:

tmc.state?
tmc.encsrc?       # expect 5 (External); flag if 0 (NONE)
tmc.calibrated?
tmc.mtype?
bissenc.bits?     # expect 23
bissenc.errors?

Expected behavior

On cold boot with valid flash settings and 48V applied, the base should automatically complete encoder alignment / self-calibration (as on v1.16.6), without requiring manual calibration after every USB reconnect or PC reboot.


Workarounds (per user)

  • Stay on v1.16.6 until fixed
  • Run Full Calibration manually after each cold boot
  • Avoid full power loss: keep USB connected during 48V cycling when possible

Environment

  • Affected firmware: 1.17.0 (reported)
  • Working firmware: 1.16.6, 1.15.x (reported)
  • Hardware: Delta 100 + BiSS-C 23-bit (reported)
  • Reproduced by maintainers: No (not yet)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions