Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob

PSoC™ 4: Getting rid of decaying waveform behavior for the fixed-function TCPWM block - KBA233909

PSoC™ 4: Getting rid of decaying waveform behavior for the fixed-function TCPWM block - KBA233909

IFX_Publisher1
Community Manager
Community Manager
Community Manager
250 sign-ins First comment on KBA 250 replies posted

Community Translation: PSoC™ 4: 固定機能TCPWMブロックの減衰する波形動作の除去- KBA233909

Version: **

TCPWM output pin shows the exponentially decaying waveform behavior (see Figure 1), when the PWM is stopped during the high state (logic 1) of the PWM output and the drive mode of output pin is set to high impedance (HiZ) state. In such cases, logic 1 on TCPWM output pin does not immediately change to 0 rather shows the exponentially decaying behavior.

MohammedA_41_0-1638967598315.png

Figure 1 Exponentially decaying behavior on TCPWM pin

For programming PSoC™ 4 using PSoC™ Creator, the fixed-function TCPWM component offers various APIs. The PWM_TriggerCommand( ) API is one such API that helps the user to get rid of this behaviour. Using the PWM_TriggerCommand( ) API, the user needs to trigger the stop/kill action by passing the PWM_CMD_STOP value as an argument. This does not change the state of counter’s line output and hence, ensures that the drive state of the pins remain as configured earlier. The API only modifies the TCPWM command register and enables counters stop trigger. For information on the command registers, see register TRM of the used device.

Note: The PWM_Stop() API cannot be used to eliminate this behavior because it sets the CTRL.COUNTER_ENABLED bit of the TCPWM control register to 0 and this disables the counter. When a counter is disabled, command and status information associated to the counter is cleared by HW. This clears information regarding the counter’s line output and also the information associated with the drive mode of the output pins, changing it to HiZ state.

The desired behavior should be the waveform shown in the Figure 2.

MohammedA_41_1-1638967867311.png

Figure 2 Expected output

0 Likes
308 Views