This is an issue I reported back in December 2015, still no answer. I am using ti-processor-sdk-linux-am335x-evm-02.00.01.07.
I wrote code to dump registers from the PRU to Linux user space. The register are being set correctly...
Except for the following
pwmss_ctrl Register (offset = 664h) [reset = 0h] i try to write 0x7, to enable clocks, and it stays 0x0.
I have tried to set the SYSCONFIG Register (offset = 4h) [reset = 28h] in all three PWM Sub-Systems. The TRM says the reset should be 0x28. That is not true, On my BBB it is always 0x8.
What do I need to enable in order to get the PWM Sub-Systems out of STANDBYMODE?
I also wrote code to enable the PWM Sub-Systems from the Linux user space. I got the exact same results.
Here is a dump of my initialization:
cm_pwmss_ctrl 0x00000000
CM_PER_EPWMSS0_CLKCTRL 0x00000002
CM_PER_EPWMSS1_CLKCTRL 0x00000002
CM_PER_EPWMSS2_CLKCTRL 0x00000002
PWMSS 0:
EPWM_TBCTL 0x80b0
EPWM_TBSTS 0x0001
EPWM_TBPHSHR 0x0000
EPWM_TBPHS 0x0000
EPWM_TBCNT 0x0000
EPWM_TBPRD 0x03e8
EPWM_CMPCTRL 0x0300
EPWM_CMPAHR 0x0100
EPWM_CMPA 0x0000
EPWM_CMPB 0x0000
EPWM_AQCTLA 0x0012
EPWM_AQCTLB 0x0102
EPWM_AQSFRC 0x0000
EPWM_AQCSFRC 0x0000
EPWM_DBCTL 0x0000
EPWM_TZSEL 0x0000
EPWM_ETSEL 0x0000
EPWM_PCCTL 0x0000
EPWM_HRCNFG 0x0000
PWMSS0 SYSCONFIG: 0x00000008
PWMSS0 CLKCONFIG: 0x00000110
PWMSS0 CLKSTATUS: 0x00000110
PWMSS 1
EPWM_TBCTL 0x80b0
EPWM_TBSTS 0x0001
EPWM_TBPHSHR 0x0000
EPWM_TBPHS 0x0000
EPWM_TBCNT 0x0000
EPWM_TBPRD 0x03e8
EPWM_CMPCTRL 0x0300
EPWM_CMPAHR 0x0100
EPWM_CMPA 0x0000
EPWM_CMPB 0x0000
EPWM_AQCTLA 0x0012
EPWM_AQCTLB 0x0102
EPWM_AQSFRC 0x0000
EPWM_AQCSFRC 0x0000
EPWM_DBCTL 0x0000
EPWM_TZSEL 0x0000
EPWM_ETSEL 0x0000
EPWM_PCCTL 0x0000
EPWM_HRCNFG 0x0000
PWMSS1 SYSCONFIG: 0x00000008
PWMSS1 CLKCONFIG: 0x00000110
PWMSS1 CLKSTATUS: 0x00000110
PWMSS 2:
EPWM_TBCTL 0x80b0
EPWM_TBSTS 0x0001
EPWM_TBPHSHR 0x0000
EPWM_TBPHS 0x0000
EPWM_TBCNT 0x0000
EPWM_TBPRD 0x03e8
EPWM_CMPCTRL 0x0300
EPWM_CMPAHR 0x0100
EPWM_CMPA 0x0000
EPWM_CMPB 0x0000
EPWM_AQCTLA 0x0012
EPWM_AQCTLB 0x0000
EPWM_AQSFRC 0x0000
EPWM_AQCSFRC 0x0000
EPWM_DBCTL 0x0000
EPWM_TZSEL 0x0000
EPWM_ETSEL 0x0000
EPWM_PCCTL 0x0000
EPWM_HRCNFG 0x0000
PWMSS2 SYSCONFIG: 0x00000008
PWMSS2 CLKCONFIG: 0x00000110
PWMSS2 CLKSTATUS: 0x00000110
Reset PWMSS2 SYSCONFIG writing 0x1:
PWMSS2 SYSCONFIG: 0x00000000
Now Set PWMSS2 SYSCONFIG to operate, writing 0x28:
PWMSS2 SYSCONFIG: 0x00000008
Turning on PWM:
EPWM_CMPA 0x0310
EPWM_CMPB 0x0150
EPWM_CMPA 0x0320
EPWM_CMPB 0x0150
EPWM_CMPA 0x0330
Please Help.
Regards,
Mike