This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

52832 PWM

hi,

     I have some problems about pwm register.

1.NRF_PWM0->MODE

2.NRF_PWM0->COUNTERTOP

3.NRF_PWM0->LOOP

4.NRF_PWM0->DECODER

5.NRF_PWM0->SEQ[0].PTR

6.NRF_PWM0->SEQ[0].CNT

7.NRF_PWM0->SEQ[0].REFRESH

8.NRF_PWM0->SEQ[0].ENDDELAY

9.NRF_PWM0->SEQ[1]

1.about mode there two mode :

①NRF_PWM_MODE_UP: 0->COUNTERTOP

②NRF_PWM_MODE_UP_AND_DOWN: 0->COUNTERTOP->0

2.NRF_PWM0->COUNTERTOP 

I think it is the Duty cycle.is right?

3.NRF_PWM0->LOOP

I dot know when and where the pwm loop?

4.NRF_PWM0->DECODER

①NRF_PWM_LOAD_COMMON:   the four channel change At the same time

②NRF_PWM_LOAD_GROUPED : 0 and 1 channel change at the some time,then 2 and 3 change at the some time 

③NRF_PWM_LOAD_INDIVIDUAL: 0 -> 1 ->2->3 channel

④NRF_PWM_LOAD_WAVE_FORM: 0 -> 1 ->2->COUNTERTOP, about the top is compare value?

5.NRF_PWM0->SEQ[0].PTR

it store the compare value? if it is compare value,and which channel will be select?

6.NRF_PWM0->SEQ[0].CNT

the ptr data length?

7.NRF_PWM0->SEQ[0].REFRESH 

I dont know how the value impact pwm

8.NRF_PWM0->SEQ[0].ENDDELAY

when pwm finsh,it will delay some times.how to calculate the time value

9.NRF_PWM0->SEQ[1].

the NRF_PWM0->SEQ[0] which is different with NRF_PWM0->SEQ[1].  how the value impact pwm.

about above is my problems and some confuse.

     hope can provide some pic to display every register role in the pwm.

thx every body !

Related