Search

Technical Discussion Group Forum

This forum is provided for user discussion. While Beacon EmbeddedWorks support staff and engineers participate, Beacon EmbeddedWorks does not guarantee the accuracy of all information within in the Technical Discussion Group (TDG).

The "Articles" forums provide brief Articles written by Beacon EmbeddedWorks engineers that address the most frequently asked technical questions.

To receive email notifications when updates are posted for a Beacon EmbeddedWorks product download, please subscribe to the TDG Forum of interest.

TDG Forum

PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 25 Aug 2015 10:42 AM by  Adam Ford
increase Blacklight PWM frequency?
 4 Replies
Sort:
You are not authorized to post a reply.
Author Messages
mvly
Basic Member
Basic Member
Posts:104


--
24 Aug 2015 03:25 PM

    Is there an easy way to increase the frequency of the backlight PWM? Currently it's set to 198.34Hz in the android 2.3.4 build.

     

    I would like to change it to something a lot higher like around 5-6KHz. The duty cycle will ultimately control the brightness.

    mvly
    Basic Member
    Basic Member
    Posts:104


    --
    24 Aug 2015 03:30 PM

    Just FYI, I did not find anything in the LCD integration documentation on changing the PWM frequency of the backlight control output.

    mvly
    Basic Member
    Basic Member
    Posts:104


    --
    24 Aug 2015 05:58 PM

    OK nvm. I was able to change it by doing the following:

    In file:

    /dm3730logic_gingerbread/kernel/arch/arm/mach-omap2/board-omap3logic-display.c

    I modified the following function:

    dm3730_torpedo_bl_set_intensity(int level)

     

    In the function there are 2 spots where 0xFFFF0000 shows up in the existing code:

    omap_dm_timer_set_load(intensity_timer, 1, 0xFFFF0000);

    AND

    omap_dm_timer_set_match(intensity_timer, 1,
                                            (0xffff0000) | (level<<8));

     

    Change the 0xFFFF0000 to something bigger, i.e. 0xFFFFF800 will give you roughly 6Khz.

    And change level << 8 to level << 3 depending on how much you shifted. For instance, 0xFFFFF800 is a 5 left shift of the original 0xFFFF0000, I would shift the level only 3 right this time.

     

    Hope this helps other who need to increase the LCD_PWM line.

    mvly
    Basic Member
    Basic Member
    Posts:104


    --
    24 Aug 2015 06:02 PM

    Sorry about the above post. I mean 0xFFFFF800 is a right shift with carry of 5 bits. So therefore, you would change level with left shift 3 times only to match.

     

    Got my left and right mixed up!

    Adam Ford
    Advanced Member
    Advanced Member
    Posts:794


    --
    25 Aug 2015 10:42 AM
    I am glad it worked out for you.
    You are not authorized to post a reply.