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

cross mob
lock attach
Attachments are accessible only for community members.
LuNo_297436
Level 3
Level 3
First solution authored 10 replies posted 10 questions asked

Hi all,

If i write to TCPWM_WriteCompare() or TCPWM_WritePeriod() everything works fine.

But if I write to TCPWM_WriteCompareBuf() or TCPWM_WritePeriodBuf() nothing happens.

I have read TRM and Data Sheet  but it is not clear to me how the switch input is used?

Attached picture how I connected switch input.

Regards

Luis

0 Likes
1 Solution
MotooTanaka
Level 9
Level 9
Distributor - Marubun (Japan)
First comment on blog Beta tester First comment on KBA

Dear Luis-san,

Reading the TCPWM Datasheet, I think that you need to add "switch" to trigger the swap of period and periodBuf,

compare and compareBuf.

In the Datasheet 001-input-description.JPG

You can access the datasheet of a component from the configure dialog .

(Lower left side [Datasheet] button)

002-config-dialog.JPG

or in the sample display of Component Catalog

(Upper left corner Open datasheet link of the symbol window )

003-component-catalog.JPG

Best Regards,

27-Jan-2021

Motoo Tanaka

View solution in original post

0 Likes
3 Replies
MotooTanaka
Level 9
Level 9
Distributor - Marubun (Japan)
First comment on blog Beta tester First comment on KBA

Dear Luis-san,

Reading the TCPWM Datasheet, I think that you need to add "switch" to trigger the swap of period and periodBuf,

compare and compareBuf.

In the Datasheet 001-input-description.JPG

You can access the datasheet of a component from the configure dialog .

(Lower left side [Datasheet] button)

002-config-dialog.JPG

or in the sample display of Component Catalog

(Upper left corner Open datasheet link of the symbol window )

003-component-catalog.JPG

Best Regards,

27-Jan-2021

Motoo Tanaka

0 Likes

Dear Motoo Tanaka

It took me some time to understand and get it working but it works!

The way I made it iwas , connecting a register to the switch terminal in pulse mode, setting swap to 1 writing to buffer (peroid or pwm)then firing the pulse in register.

Some findings :

Connecting the way I did on the attached picture on my first post didn't work because of to much jitter on the falling edge of PWM and some estrange  misbehavior on frequency update.

Thank you so much.

Regards

Luis

 

 

MotooTanaka
Level 9
Level 9
Distributor - Marubun (Japan)
First comment on blog Beta tester First comment on KBA

Dear Luis-san,

>It took me some time to understand and get it working but it works!

Congratulations!

 

And reading your response, I noticed that I missed your image attachment.

I'm sorry about it.

 

But this reminded me of an older discussion, which was fun 😉

(It was swapping only compare values, though)

https://community.cypress.com/t5/PSoC-4-MCU/TCPWM-Compare-Registers-Not-Swapping-on-PSoC-4200/m-p/16...

 

Best Regards,

28-Jan-2021

Motoo Tanaka

0 Likes