Silabs MGM240S (Gecko) support#439
Closed
runger1101001 wants to merge 6 commits intosimplefoc:devfrom
Closed
Conversation
Member
Author
|
TODO
|
Member
Author
|
6-PWM support added: Up to 5 motors with 6-PWM would be theoretically supported by the timer hardware. in practice the modules won't have enough pins or CPU power for it. If using just one or two motors, then any pins can be used for hardware 6-PWM, which is nice and makes this MCU easy to use :-) It also means I won't bother implementing software 6-PWM. Dead-Time insertion is possible up to 64 timer counts on rising and falling side - assuming a prescaler of 0 on a 72MHz timer clock, and PWM frequency of 25kHz, then 2% dead time work out to 31 timer counts, and 400ns of dead time on each side. You could go as high as 4% (= 800ns) at 25kHz PWM. Other notes:
|
Member
Author
|
Superseded by comprehensive and professional PR #485 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

PWM driver support for SiLabs Gecko type MCUs as used in the Arduino Nano Matter
Currently supports:
Not yet implemented:
6 PWM support will be added, this MCU can support hardware 6 PWM with DTI for any pin combination :-)
In theory, 5 motors can be supported, in practice the MCU won't have enough pins or CPU muscle for so many, but maybe 2 could run ok.
In theory, current sensing should be possible, also low side sensing, based on DMA support and the peripheral reflex system (inter-peripheral events). I'll leave that as an exercise for another time :-)
Performance tests in closed loop mode to follow.