-
Notifications
You must be signed in to change notification settings - Fork 211
Motor Control Pulse Width Modulator (MCPWM) #93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from 1 commit
b42c6d5
507dd8b
e4ed558
1e2a947
6260781
f2d6c0c
7a76c5c
5ef5013
eaf4ae7
16df098
d989ba2
16657d9
0d490fd
b17a9ff
0af99da
b2ae6e7
4820189
a12baad
07691e7
295f0bc
018056a
9b9d9f6
52e4542
3d37b0c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -122,25 +122,171 @@ impl From<CounterMode> for mcpwm_counter_type_t { | |
| // TODO: Note that `red` and `fed` from the IDF's perspecitve is time as in number of clock cycles after the | ||
| // MCPWM modules group prescaler. How do we want to expose this? Do we expose it as just that, a cycle count? | ||
| // Or do we expose it as a time which we then calculate the cycle count from? | ||
| /// Deadtime config for MCPWM operator | ||
| /// Note that the dead times are calculated from MCPWMXA's flanks unless explicitly stated otherwise | ||
| #[derive(Copy, Clone, PartialEq, Debug)] | ||
| pub enum DeadtimeConfig { | ||
| // TODO: Figure out what all of those options do and give them nice descriptions | ||
| /// MCPWM_BYPASS_RED | ||
| /// | ||
| /// . . . | ||
| /// . . . | ||
| /// .--------------------. . | ||
| /// | | . | ||
| /// MCPWMXA in | | . | ||
| /// | | . | ||
| /// --------------- --------------------- | ||
| /// . . . | ||
| /// . . . | ||
| /// .--------------------. . | ||
| /// | | . | ||
| /// MCPWMXA out | | . | ||
| /// | | . | ||
| /// --------------- --------------------- | ||
| /// . . . | ||
| /// . . . | ||
| /// .------------------------. | ||
| /// | >. |< fed | ||
| /// MCPWMXB out | . | | ||
| /// | . | | ||
| /// --------------. . ----------------- | ||
| /// . . . | ||
| BypassRisingEdge { fed: u16 }, | ||
|
|
||
| /// MCPWM_BYPASS_FED | ||
| /// | ||
| /// . . . | ||
| /// . . . | ||
| /// .--------------------. | ||
| /// | . | | ||
| /// MCPWMXA in | . | | ||
| /// | . | | ||
| /// --------------- . --------------------- | ||
| /// . . . | ||
| /// . . . | ||
| /// . .----------------. | ||
| /// red >. |< | | ||
| /// MCPWMXA out . | | | ||
| /// . | | | ||
| /// ------------------- --------------------- | ||
| /// . . . | ||
| /// . . . | ||
| /// .--------------------. | ||
| /// | . | | ||
| /// MCPWMXB out | . | | ||
| /// | . | | ||
| /// --------------- . --------------------- | ||
| /// . . . | ||
| BypassFallingEdge { red: u16 }, | ||
|
|
||
| /// MCPWM_ACTIVE_HIGH_MODE | ||
| /// | ||
| /// . . . . | ||
| /// . . . . | ||
| /// .--------------------. . | ||
| /// | . | . | ||
| /// MCPWMXA in | . | . | ||
| /// | . | . | ||
| /// --------------- . --------------------- | ||
| /// . . . . | ||
| /// . . . . | ||
| /// . .----------------. . | ||
| /// red >. |< | . | ||
| /// MCPWMXA out . | | . | ||
| /// . | | . | ||
| /// ------------------- --------------------- | ||
| /// . . . . | ||
| /// . . . . | ||
| /// .------------------------. | ||
| /// | . >. |< fed | ||
| /// MCPWMXB out | . . | | ||
| /// | . . | | ||
| /// --------------. . . ----------------- | ||
| /// . . . . | ||
| ActiveHigh { red: u16, fed: u16 }, | ||
|
|
||
| /// MCPWM_ACTIVE_LOW_MODE | ||
| /// | ||
| /// . . . . | ||
| /// . . . . | ||
| /// .--------------------. . | ||
| /// | . | . | ||
| /// MCPWMXA in | . | . | ||
| /// | . | . | ||
| /// --------------- . --------------------- | ||
| /// . . . . | ||
| /// . . . . | ||
| /// ------------------. .-------------------- | ||
| /// red >. |< | . | ||
| /// MCPWMXA out . | | . | ||
| /// . | | . | ||
| /// . ------------------ | ||
| /// . . . . | ||
| /// . . . . | ||
| /// --------------. . . .---------------- | ||
| /// | . >. |< fed | ||
| /// MCPWMXB out | . . | | ||
| /// | . . | | ||
| /// -------------------------- | ||
| /// . . . . | ||
| /// . . . . | ||
| ActiveLow { red: u16, fed: u16 }, | ||
|
|
||
| /// MCPWM_ACTIVE_HIGH_COMPLIMENT_MODE | ||
| // TODO: Is this actually true? -------- | ||
| // | | ||
| // v | ||
| /// MCPWM_ACTIVE_HIGH_COMPLIMENT_MODE - The most common deadtime mode | ||
|
||
| /// | ||
| /// . . . . | ||
| /// . . . . | ||
| /// .--------------------. . | ||
| /// | . | . | ||
| /// MCPWMXA in | . | . | ||
| /// | . | . | ||
| /// --------------- . --------------------- | ||
| /// . . . . | ||
| /// . . . . | ||
| /// . .----------------. . | ||
| /// red >. |< | . | ||
| /// MCPWMXA out . | | . | ||
| /// . | | . | ||
| /// ------------------- --------------------- | ||
| /// . . . . | ||
| /// . . . . | ||
| /// --------------. . . .---------------- | ||
| /// | . >. |< fed | ||
| /// MCPWMXB out | . . | | ||
| /// | . . | | ||
| /// -------------------------- | ||
MabezDev marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| /// . . . . | ||
| /// . . . . | ||
| ActiveHighComplement { red: u16, fed: u16 }, | ||
|
|
||
| /// MCPWM_ACTIVE_LOW_COMPLIMENT_MODE | ||
| /// | ||
| /// . . . . | ||
| /// . . . . | ||
| /// .--------------------. . | ||
| /// | . | . | ||
| /// MCPWMXA in | . | . | ||
| /// | . | . | ||
| /// --------------- . --------------------- | ||
| /// . . . . | ||
| /// . . . . | ||
| /// ------------------. .-------------------- | ||
| /// red >. |< | . | ||
| /// MCPWMXA out . | | . | ||
| /// . | | . | ||
| /// . ------------------ | ||
| /// . . . . | ||
| /// . . . . | ||
| /// .------------------------. | ||
| /// | . >. |< fed | ||
| /// MCPWMXB out | . . | | ||
| /// | . . | | ||
| /// --------------- . . ----------------- | ||
| /// . . . . | ||
| /// . . . . | ||
| ActiveLowComplement { red: u16, fed: u16 }, | ||
|
|
||
| /// MCPWM_ACTIVE_RED_FED_FROM_PWMXA | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.