Yes, I’m getting the feeling we will probably make this branch with HAL only stm32 the “official” driver, as it fixes a few problems of the present stm32 driver, and additionally supports the portenta/giga. So I think it will replace the current stm32 and portenta drivers.
As for the timeframe, I’d like to be sure I’m not introducing too many new bugs, as the code changes have been rather extensive… so I’m testing quite carefully, and documenting results in the github pull request I made for the branch.
I’d say for the single-motor use case it’s fairly close to being done. It’s reached a point where it fixes a few issues of the present stm32 driver, and for portenta it’s a big jump in functionality.
So I think we could consider merging it to the dev branch soon, and therefore to include it in the next release.
But I still have to test multi-motor use cases, and think about the paradigm for them. At the moment I am thinking that we should introduce the restriction that you should not use the same timers for more than one motor. So you can use a single or multiple timers for each motor, but if you use timer X on motor A, you should not use it for any other motor.
Reasons are:
when using multiple timers on a motor, we try to sync them. The semantics of doing this when the timers are used on multiple motors get very complicated.
it becomes impossible to start, stop, pause or reconfigure timers for one motor without potentially affecting other motors
the semantics of timer-triggered ADC, HFI or other such advanced topics which have to deal with timer configuration become very complicated
If anyone has any comments on the multi-motor topic I’d love to hear them.
Question, what about the interrupts? I try to put each hall on a separate interrupt mapped to that hall pin, correct? That way I don’t have interrupts overlapping?
I haven’t posted in a while but I have been using the new driver extensively for the last six months in my development project and it has been working great with no buzzing noise at all. Thanks again!!! I am moving my development to a new laptop and I was wondering if the new driver has had a formal release? If I select the SimpleFOC driver from the Arduino Library manager, will it download this new driver? I know I have it on my old laptop buried in the libraries somewhere but because I may be distributing this to some people, it would be preferable to do this more cleanly. Please let me know what the plan is. Thanks again…
I’ve also been testing it quite a bit, with good results so far. I’d like to release it in the next two weeks, so then it will be part of SimpleFOC 2.3.5, and it will work automatically when people download the 2.3.5 version of the library. At the moment it is still on a git branch, so you have to check out that specific branch from GitHub, which is not so easy for users to do.