Firmware (v4.0) for Easy DIY ESC is available on Codeberg e.V.,
ede-fw
It has been verified to work on 0.5.x h/w version, tested w/ geared hub motors (the so called 250W ones) as well as on gearless.
The firmware released here has been tested only on cycle trainer*.
Features:
FOC, options - SVM, ZVM, PWM selectable at compile time
Position sensing - Hall, auto-detection (hold e-brake & turn-on w/ wheel in air)
Control - current based via throttle (J8:2)
Protection: overcurrent, FET temperature
E-brake (J5:6)
FOC algorithm in per unit, agnostic to bus voltage & compare registers
Math - floating point
PAS is not currently supported, planned for future.
Power board: Easy DIY ESC v0.5.x
Processor board: Black pill 401, need a few modifications, refer readme.txt
Host OS: Linux
License: GPL-3.0-or-later (refer sbom_crude.pdf/txt for more details)
Development started on STM32F103, then moved to STM32F401 fixed point & then to STM32F401 floating point along w/ fixed point (FOC isr duration on fixed point was only ~60% as compared to that of floating point and without any perceivable difference in performance). But then gradually started to concentrate only on floating point resulting in fixed point code rot & breakage. So ATM only STM32F401 floating point is supported, some of the code shared b/n fixed & floating point as well the broken fixed point code (F401 & F103) has been left as is to ease fixed point resurrection.
Code has been developed such that processor from any silicon vendor can be easily integrated, ATM only ST is supported.
FOC algorithm expressions has been written as is based on the understood math, no math optimizations has been done, that is a todo.
Code has been organized with an emphasis on readability, compile time selection inside functions has been avoided to a considerable extent. Coding style is K&R, except for the source files originated elsewhere (& not modified heavily) to not break the reading flow.
Burden off my shoulders!
[ The release has been considerably delayed due to personal & multiple health reasons.
* I haven't ridden (e)cycle on road for almost a year and the release here has been tested only on cycle trainer, will be doing road test in the near future. ]
Edit: release tag addition