Announcements

Ever wondered how you could shape the future in collaboration with others? Join us at OktoberTech Asia Pacific and get inspired. Click here to sign up FREE of charge.

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

PSoC™ 6 Forum Discussions

yangyong
Level 4
5 likes given 5 solutions authored 25 replies posted
Level 4

TCPWM have Period register and Period  buff  register .  How to determine which register is used now,Period register or Period buff register! thanks!

0 Likes
1 Solution
Rakesh_Patrudu
Moderator
Moderator First like given First like received 50 sign-ins
Moderator

Hi @yangyong ,

TCPWM have period register and period buffer register. Period register has the upper value of counter and Period buffer register is a buffer register which swaps the period value. In PWM mode the PERIOD and PERIOD_BUFF registers are exchanged on a tc event. The period swap is shown in the below snippet. There will be two periods, Period 0 and Period 1 when the period swap is enabled then period register and period buffer register will get swapped.

In case you are using timer functionality use Period register instead of Period buffer register as it utilizes Period register not the Period buffer register.

Rakesh_Patrudu_0-1658832574482.png

Rakesh_Patrudu_1-1658838903627.png

 

 

 

Best Regards

Rakesh

 

View solution in original post

0 Likes
1 Reply
Rakesh_Patrudu
Moderator
Moderator First like given First like received 50 sign-ins
Moderator

Hi @yangyong ,

TCPWM have period register and period buffer register. Period register has the upper value of counter and Period buffer register is a buffer register which swaps the period value. In PWM mode the PERIOD and PERIOD_BUFF registers are exchanged on a tc event. The period swap is shown in the below snippet. There will be two periods, Period 0 and Period 1 when the period swap is enabled then period register and period buffer register will get swapped.

In case you are using timer functionality use Period register instead of Period buffer register as it utilizes Period register not the Period buffer register.

Rakesh_Patrudu_0-1658832574482.png

Rakesh_Patrudu_1-1658838903627.png

 

 

 

Best Regards

Rakesh

 

0 Likes