SLAAEK4 January 2024 MSPM0C1104
The output of the CCP channel can be forced to high or low. Additionally, in TIMA only, the complimentary output channel can also be forced to high or low. Table 6-1 shows the software force output action configuration options.
Bit Field | Value | Description or Comment |
---|---|---|
SWFRCACT / SWFRCACT_CMPL | 0 | No forced output. Output is directly from the signal generation block. |
1 | Force output high | |
2 | Force output low |
The user can set the SWFRCACT bit in register to force or release the PWM output. Besides, the user can call the API to produce the same effect as shown in the following code.
/**
* @brief Overrides the timer CCP output
*
* @param[in] gptimer Pointer to the register overlay for the
* peripheral
* @param[in] out Specifies the CCP output state.
* @ref DL_TIMER_FORCE_OUT
* @param[in] outComp If timer insatance supports complementary output,
* it allows to override complementary out also.
* If timer instance doesn't support complementary
* output, this parameter is ignored.
* @ref DL_TIMER_FORCE_CMPL_OUT
* @param[in] ccIndex Index associated to capture compare register
* @ref DL_TIMER_CC_INDEX.
*/
void DL_Timer_overrideCCPOut(GPTIMER_Regs *gptimer, DL_TIMER_FORCE_OUT out,
DL_TIMER_FORCE_CMPL_OUT outComp, DL_TIMER_CC_INDEX ccIndex);