Регистры Allwinner H616

Сокращения  |  Дерево шин  |  Карта памяти


PCR
9.9.5. PWM Control Register - адрес: 0x6000000300c014 (смещение: 0x0060+0x0000+N*0x0020(N=1~4))

Контроллер ШИМ: список регистров



31 ||||||||||||||||| 16
15 ||||||||||||||||| 00

  Unused

Bits 31 : 12

  PWM_PERIOD_RDY

Bit 11
R
0x0

PWM Period Register Ready
0: PWM period register is ready to write
1: PWM period register is busy


  PWM_PUL_START

Bit 10
R/W1S
0x0

PWM Pulse Output Start
0: No effect
1: Output pulse for PWM_CYCLE_NUM+1
After finishing configuration for outputting pulse, set this bit once and then
PWM would output waveform. After the waveform is finished, the bit will
be cleared automatically.


  PWM_MODE

Bit 9
R/W
0x0

PWM Output Mode Select
0: Cycle mode
1: Pulse mode


  PWM_ACT_STA

Bit 8
R/W
0x0

PWM Active State
0: Low Level
1: High Level


  PWM_PRESCAL_K

Bits 7 : 0
R/W
0x0

PWM pre-scale K, actual pre-scale is (K+1)
K = 0, actual pre-scale: 1
K = 1, actual pre-scale: 2
K = 2, actual pre-scale: 3
K = 3, actual pre-scale: 4
***

K = 255, actual pre-scale: 256



Команда U-Boot для чтения регистра

md 6000000300c014 1



Bit fields structure

typedef union  pcr
{
  struct
  {
   unsigned pwm_prescal_k : 8;
   unsigned pwm_act_sta : 1;
   unsigned pwm_mode : 1;
   unsigned pwm_pul_start : 1;
   unsigned pwm_period_rdy : 1;
   unsigned unused0 : 20;
  } b;
   unsigned long w;
} PCR
   

Allwinner H616 Manual