pwm on nitrogen6x or sabrelite

cancel
Showing results for 
Search instead for 
Did you mean: 

pwm on nitrogen6x or sabrelite

707 Views
kylekenj
Contributor III

Hi


We have been experiencing a small but important issue with our IMX6.  I would greatly appreciate any advice you had for me on how to go about fixing it.


There are two related parts to the problem:


1) Approximately, five minutes after the IMX boots up it seems to go into some kind of sleep mode.  Specifically, the backlight (a PWM which we are using to drive our motors) powers down and we lose our ability to control the PWM (normally we control this through interacting with the backlight brightness file found at /sys/class/backlight/pwm-backlight.(0/4)/brightness).


As the IMX is designed for smart devices such as tablets, this is obviously considered a feature under most applications, however, we need it to not go to sleep ever.  Can you tell me how to disable this feature? Thanks.


2) The other problem is very similar when ever we do write to the brightness file (/sys/class/backlight/pwm-backlight.(0/4)/brightness).  It prints out the following line:


pwm_config: pwm freq = 20000, clk_select=2 clock_rate=22000000

pwm_config: pwm freq = 32786, clk_select=2 clock_rate=22000000


Every time that we right to the brightness file it prints this out.  Which, since we are frequently writing to this file that ends up being a lot of time consuming print outs.  I would like to be able to stop this file from printing these lines.  Could you suggest how we might disable this as well? 


Thank you so much for all your help.

Labels (3)
0 Kudos
3 Replies

38 Views
EricNelson
Senior Contributor II

Hi Kyle,

The SABRE Lite and Nitrogen6x boards were built for a pretty wide variety of applications, not just tablets, and always-on is a common request.

If you're running a non-Android Linux, you can keep the screen alive by setting the consoleblank time to zero:

        # echo 0 > /sys/module/kernel/parameters/consoleblank

And the pwm message is all ours. We changed around the clocking of the PWMs a while back and left in some debug code.

I'll change this line shortly to pr_debug from pr_info:

     boundarydevices/linux-imx6 at boundary-imx_3.0.35_4.1.0 · GitHub    

You'll need to re-compile your kernel for it to take effect.

.

0 Kudos

38 Views
kylekenj
Contributor III

Thanks Eric,

We tried the# echo 0 > /sys/module/kernel/parameters/consoleblank command. We need to do a chmod 666 on the consoleblank to get it to write. That didn't seem to stop it from going in to sleep mode. Am I missing something or is there a different mode for the different backlights? Thanks.


Kyle

0 Kudos

38 Views
EricNelson
Senior Contributor II

Hi Kyle,

You've asked a good question and I don't know. It's certainly possible that we're keeping the wrong PWM alive.

What display(s) are you using?

Can you see /dev/fb0 go blank after the timeout?

   (cat /sys/class/graphics/fb0/blank)

This is what's not supposed to happen with "consoleblank=0".

We usually do the "consoleblank=0" on the kernel command-line (that is, from within the boot script), so there could be an issue using /sys/module/...

0 Kudos