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

PSoC™ 6 Forum Discussions

yoya_4785701
Level 4
25 replies posted First like given First like received
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 5 replies posted First solution authored 25 sign-ins
Moderator

Hi @yoya_4785701 ,

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 5 replies posted First solution authored 25 sign-ins
Moderator

Hi @yoya_4785701 ,

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