I am not yet sure. It seems that the lights driver doesn't export the pwm0 correct.
Code: Select all
odroidn2:/sys/class/pwm/pwmchip4 # ls
device export npwm power subsystem uevent unexport
After enabling at commandline in adb:
Code: Select all
echo 0 > export
ls
device export npwm power pwm0 subsystem uevent unexport
Then can be given commands as on wiki page:
Code: Select all
echo 1000000 > period
echo 1 > enable
echo 500000 > duty_cycle
I see with oscilloscope pwm at pin 33.
But why it is not working with the lights driver?
I tried with this in
/vendor/etc/init/hw/init.odroidn2.rc
, but no success.
Code: Select all
#for pwm backlight control
chmod 666 /sys/class/pwm/pwmchip4/export
Need to ask @voodik, why this is not working.
If this is in the lights driver:
Code: Select all
char backlight_control[64] = "/sys/class/gpio/export";
char backlight_gpio491[64] = "/sys/class/gpio/gpio491/direction";
char backlight_export[64] = "/sys/class/pwm/pwmchip4/export";
char backlight_unexport[64] = "/sys/class/pwm/pwmchip4/unexport";
char backlight_en[64] = "/sys/class/pwm/pwmchip4/pwm0/enable";
char backlight_period[64] = "/sys/class/pwm/pwmchip4/pwm0/period";
char backlight_duty_cycle[64] = "/sys/class/pwm/pwmchip4/pwm0/duty_cycle";
This is from Pie sources.