period and compare buff register

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

cross mob
yangyong
Level 5
Level 5
Distributor - Jingchuan(GC)
5 comments on blog First comment on blog 50 questions asked

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
Moderator
25 solutions authored 5 likes given 50 replies posted

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
Moderator
25 solutions authored 5 likes given 50 replies posted

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