Puck Firmware

Note: mk1 firmware (and all v3 firmware) is built for P4-16 and P4-37 models. mk2 firmware is for future Puck models.

  • Download Puck4—mk1-v4.3.2.ebin

    Change Log:

    • Automated EDS Generation: Developed a Python script to convert the source code object dictionary into a valid, CiA-conforming EDS file (validated via CANchkeds).

    • Startup Bug Fix: Initialized the overtemperature threshold variable, resolving a bug where the device erroneously emitted an EMCY fault message immediately upon startup.

    • User Manual: Updated documentation to reflect all current firmware features.

    • Voltage Monitoring: Added dedicated timers for Over-voltage and Under-voltage detection to protect hardware during regenerative braking or brownouts.

    • Timing Correction: Fixed fault timer units so thresholds are consistently measured in milliseconds (resolving "fast-triggering" sync faults).

    • Dynamic Tuning: Added callback handlers for velocity gains, allowing the Puck Tuning app to stream and apply gains in real-time without requiring a reboot.

    • Mode Re-entry Fix: Resolved a DS402 state machine issue where the drive failed to initialize if the host re-enabled the same control mode after a disable cycle.

    • Adaptive Filtering: Replaced fixed-coefficient current filters with Biquad lowpass filters that automatically calculate cutoff frequencies based on the motor's specific winding time constant (L/R).

    • MKI Sync Fix: Synchronized the ADC trigger (PDB) with the PWM timer (FTM) on MKI hardware to ensure current samples are always taken relative to the active duty cycle.

    • Voltage Clipping: Added circular clamping to the alpha-beta voltage vector to prevent duty cycles from exceeding safe sampling widths.

    • CAN Reliability: Implemented a software Tx ring buffer to prevent CAN writes from blocking the motion control loop.

      • Enabled auto-retransmission and optimized the Sync Jump Width (SJW) to prevent message loss on noisy buses.

    • PWM Dithering: Added hardware dithering to eliminate audible noise and torque ripple caused by quantization at low torque commands.

    • Safe Reset: Configured MKII pins to drive HIGH before reset to prevent gate-driver "shoot-through" (short circuits) during firmware reboots.

    • Runtime Scaling: Moved bus-voltage and thermistor scaling from hardcoded constants to shared objects initialized via the CANopen dictionary.

    • Dual-Platform HAL: Established a single, chip-agnostic codebase supporting both MKII and MKI targets.

    • Modern Toolchain: Upgraded to ARM GCC 14.3.1 with full C23 support for compile-time optimizations.

    • Memory Efficiency: Designed a flash-resident Object Dictionary with a RAM-based hashmap index to accommodate the MKII's limited (32 kB) RAM.

    • Atomic PWM Updates: Fixed phase asymmetry and noise on the MKII by enabling register preloading and atomic register writes for gate-driver signals.

    • Split Sampling: Decoupled current sensing from auxiliary samples (voltage/temp) into separate PWM patterns to maximize sampling bandwidth.

    Notes:

    • Firmware v4.3.2 is only compatible with the following software versions -

      • Puck Utility App >= v1.2.0

      • Puck Tuner App >= v1.2.0

    • For compatibility with the P4-16 Dev Kit, please use the updated configuration file - P4-16-DevKit-24V-v2.3.2.csv

Legacy v3 Firmware

  • Download Puck4-v3.4.4.ebin

    Change Log:

    • Added Object Dictionary Entries for release of Puck Tuner App

    Notes:

    • Firmware v3.4.4 is required for use with the Puck Tuner App

  • Download Puck4-v3.4.3.ebin

    Change Log:

    • Added Object Dictionary Entries for Gear Ratio, i2t Limiting, P4 Model, and future updates

    • Implemented i2t limiting

    Notes:

    • Firmware v3.4.3 is only compatible with Puck Utility App v1.1.4 and later.

    • For compatibility with the P4-16 Dev Kit, please use the updated configuration file - P4-16-DevKit-24V-v2.2.4.csv

  • Download puck4-v3.3.4.ebin

    Change Log:

    • Fixed Profile Position trajectory generator bug

    • Added 3 new object dictionary entries for velocity filters: 0×2100, 1-3

    • Fixed a homing bug

    Note: For compatibility with the P4-16 Dev Kit, please use the updated configuration file - P4-16-DevKit-24V.csv

  • Download puck4-v3.3.0.ebin

    Change Log:

    • Updated firmware to detect and run both P4-16 and P4-37 models.

    • Updated VBus Sense calculations.

  • Download puck4-v3.2.0.ebin

    Change Log:

    • Initial Release