• Resolved

Linux/AM4378: LCD backlight control

Mastermind 7405 points

Replies: 20

Views: 410

Part Number: AM4378

Tool/software: Linux

we are writing a program where we would like to have complete control of the backlight but it would appear that we do not.

linux SDK ti-processor-sdk-linux-am437x-evm-04.03.00.05

am4378 EVM

in the program, for right now weston is disabled at the start of the program via: 

system("systemctl stop weston");

when the program is active and disabling the backlight off control in our code, if we don't touch anything for a while the backlight still turns off

is this a result of us not entirely disabling weston from start up or is something else controlling the backlight? if so how can i disable it so we are the only master?

  • Hi,

    LCD backlight is controlled by the PWM driver. Look at the end of this section in the SDK documentation:  

     

    Best Regards
    Biser
  • In reply to Biser Gatchev-XID:

    i'm guessing you didn't read my post. I KNOW it's controlled my the PWM.

    there is a timed idle shutoff happening that i am not in control of. it's a part of the SDK. how do i turn it off?

  • In reply to cobsonchael:

    the timeout is 10 minutes 30 seconds from the last button press if that helps you any

  • In reply to cobsonchael:

    Hello,

    I am wondering if you could please use PSDK6.0 and let me know if the issue still persists. I have been able to replicate the issue on PSDK4.3 and I am investigating it further.

    Regards,
    Krunal 

  • In reply to Krunal Bhargav34:

    Hello,

    I apologize for the delayed response but I was able to resolve the LCD issue by adding "consoleblank=0" parameter to the Kernel command line. Based on my discussion with our experts, if nothing else is running (ie Weston), fbdev/fb console are in control and it has a blanking timeout. Setting consoleblank to zero will ensure the LCD does not turn off. 

    Regards,
    Krunal

  • In reply to Krunal Bhargav34:

    so i've been looking up and down documentation and i cannot find where to change the kernel command line parameters (temporary or otherwise)

    to make this a permanent change do i change it in u-boot in the passing parameters? if so, which file do i change it to? if it works will "cat /sys/module/kernel/parameters/consoleblank" return a 0?

  • In reply to cobsonchael:

    Hello,

    If you are booting from the SD card, please stop at the Uboot prompt and run the following command "setenv mmcrootfstype ext4 rootwait consoleblank=0;saveenv". Next, please run the "boot" command and Kernel will start booting. During boot, the Kernel command line print should reflect your change as shown below:

    "[    0.000000] Kernel command line: console=ttyO2,115200n8 root=PARTUUID=38685d3e-02 rw rootfstype=ext4 rootwait consoleblank=0"

    Regards,
    Krunal

  • In reply to Krunal Bhargav34:

    i am looking for a more permanent, manufacture-able solution than typing in a command at u-boot

  • In reply to Krunal Bhargav34:

    so is there not a better way to do this than typing it in at u-boot? are we expected to do this to every board we manufacture for our product? is there not a better solution than this?

  • In reply to cobsonchael:

    Hello,

    If you are booting from SD card, the boot partition contains images such as MLO+uboot.img. If possible, you could add another file called uEnv.txt and add the following line of code " optargs='consoleblank=0' ". As the board boots, it will read the text file and pass the argument to the kernel. Another alternative is to navigate to the file <u-boot_dir>/include/environment/ti/mmc.h and modify the default variables as follows:

    "args_mmc=run finduuid;setenv bootargs console=${console} " \
        "${optargs} " \
    +   "consoleblank=0 " \
        "root=PARTUUID=${uuid} rw " \
        "rootfstype=${mmcrootfstype}\0" \
    

    Also, I am wondering if you could please share more details about your application. I am just curious why you are planning on disabling Weston and if you are running a FB based application, the blank/unblank could be controlled by the user application using the fbdev ioctls.

    Regards,
    Krunal