How do I create a 10us pulse on the PSoC4 TCPWM component and have it come out to a GPIO pin

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

cross mob
MiRo_263836
Level 5
Level 5
100 replies posted 50 likes received 50 replies posted

I am trying to generate at 10usec pulse on a GPIO.  I set up a TCPWM as a one shot and am using the TriggerCommand API.  I have a 1Mhz clock going in and a 100 count om the period and 1 in the compare.  I can't route any of the output signals to GPIO, ov, un or cc.

0 Likes
1 Solution

I think you can't use the timer to route the 10us pulse, but if you want to use only one PWM component, you only need to use the

Ten_us_start(); or  Ten_us_stop();.

If you want to use Counters SW start trigger, you can use the API Ten_us_TriggerCommand(MASK,Command);

But, in the previous response, you need to use "Ten_us_MASK" instead of "Ten_us_16BIT_MASK".

More about it, you can refer to the creator code example: Quadrature_Decoder.

And you also refer to the PSoC 4100 Plus register TRM :http://www.cypress.com/file/405866/download

Find the key words: TCPWM_CMD.

View solution in original post

0 Likes
5 Replies
MiRo_263836
Level 5
Level 5
100 replies posted 50 likes received 50 replies posted

I want to get this working a on P4100S PLUS device. No UDBs, but Smart IO

0 Likes
LinglingG_46
Moderator
Moderator
Moderator
500 solutions authored 1000 replies posted 10 questions asked

If the chip don't have DSI resource,  we don't have the way to route the signal out though GPIO/SIO.

But if you only want to get a pulse , you need to use the line or line_n .

0 Likes

I thought that was the case and I don't see how to set up the Timer with a line or line_n only the PWM.  I am using a PWM to generate the pulse with a 1Mhz clock and compare of 10.  I can set the repeat rate by changing the period.  Does the TriggerCommand work for stopping and starting the PWM?  My PWM is named Ten_us.

            Ten_us_TriggerCommand(Ten_us_16BIT_MASK, Ten_us_CMD_STOP);

            Ten_us_TriggerCommand(Ten_us_16BIT_MASK, Ten_us_CMD_START);

0 Likes

I think you can't use the timer to route the 10us pulse, but if you want to use only one PWM component, you only need to use the

Ten_us_start(); or  Ten_us_stop();.

If you want to use Counters SW start trigger, you can use the API Ten_us_TriggerCommand(MASK,Command);

But, in the previous response, you need to use "Ten_us_MASK" instead of "Ten_us_16BIT_MASK".

More about it, you can refer to the creator code example: Quadrature_Decoder.

And you also refer to the PSoC 4100 Plus register TRM :http://www.cypress.com/file/405866/download

Find the key words: TCPWM_CMD.

0 Likes

That worked great. Thanks for your help.

0 Likes