Optional fixed complementary PWM with latched break.
More...
Go to the source code of this file.
Optional fixed complementary PWM with latched break.
- Author
- Nexus Team
Definition in file advanced_pwm.h.
◆ nx_advanced_pwm_clear_fault()
Clear a software fault only while disabled and BKIN is inactive.
- Parameters
-
| [in] | port | Privileged task recovery owner. |
- Returns
- SUCCESS or BUSY/STATE/IO/CONTEXT; does not enable outputs.
- Note
- Physical input and pending hardware break are rechecked. Application recovery policy and external power safety remain outside Nexus.
◆ nx_advanced_pwm_set_duty()
Stage duty against the fixed declared PSC/ARR and complementary pair.
- Parameters
-
| [in] | port | One serialized privileged task owner. |
| [in] | duty_ticks | Zero through the maintained period, inclusive. |
- Returns
- SUCCESS or INVALID/STATE/CONTEXT; no base-clock reconfiguration.
- Note
- Shadow duty becomes effective at the next update. Hardware deadtime encoding must exactly represent the cold-configured tDTS count; PSC does not scale deadtime. This API does not certify pin timing.
◆ nx_advanced_pwm_start()
Enable outputs only with inactive break and no latched fault.
- Parameters
-
| [in] | port | Privileged task owner of reviewed pin/clock/vector leases. |
- Returns
- SUCCESS or BUSY/STATE/IO/CONTEXT; failure retains ownership.
- Note
- Automatic output reenabling and irreversible hardware LOCK are prohibited. A break never silently starts outputs again.
◆ nx_advanced_pwm_state()
Query staged duty, actual enable state and latched break facts.
- Parameters
-
| [in] | port | Privileged task owner. |
| [out] | state | Separate writable snapshot, never provider storage. |
- Returns
- SUCCESS or INVALID/STATE/CONTEXT.
◆ nx_advanced_pwm_stop()
Disable/read back master output and both channel sources.
- Parameters
-
| [in] | port | Privileged task owner, no concurrent duty/lifecycle calls. |
- Returns
- SUCCESS proves output source detachment; BUSY retains responsibility.
- Note
- Cold assembly keeps the reviewed inactive-pin and shared-vector leases until success and IRQ quiescence. A latched break survives stop.