This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM335x LCD offset

Other Parts Discussed in Thread: DA8XX, AM3358

Hello,

I would like to kindly ask for some help in correctly configuring my LCD when connecting it to the Beaglebone (se the end of this post for details on what I am using). I have managed to modify the Linux source code which comes with TI's SDK and am able to get the LCD working but with a small, yet annoying issue. The image displayed on the display seems to have an offset. Half of the first letter is always lost (moved "to the left of the display") and half of the bottom line is likewise lost. So a negative offset is present both in x and y direction.

I would like to kindly ask for help in answering two questions:

  1. Is there a way to "calibrate" my LCD and correct for the mentioned offset and if so, how is this done?
  2. I noticed that changing the invert_line_clock member of the lcd_cfg structure (static struct lcd_ctrl_config) from 1 to 0 also affected the offset. At start it was set to 1 which caused a substantial positive offset. After setting it to 0 a small negative offset I described above appeared (so the situation improved but it's not yet perfect). Can anyone offer an explanation to why changing clock polarity caused this change? What exactly does invert_line_clock do?

Thank you!

I'm using:
- Beaglebone Rev A5
- ti-sdk-am335x-evm-05.06.00.00 (Kernel Version: 3.2.0 Internal PSP version (04.06.00.09)
- 7 inch LCD (datasheet of the used LCD is in the attachment)

LCD-on-Beaglebone.tar.gz
  • Hello,

    If I understand correctly from the files that you have attached, you are using the LCD7 Cape that the beaglebone plugs directly into. Is this correct? This LCD should be supported by the kernel included with the version of the SDK that you are using without any modifications to the source.

    Regards,

    Dave

  • Hi,

    I think you are correct. This here is what I have: http://www.tigal.com/product/2607

    However modifications to the source had to be made to get it working. For Beaglbone revisions A3 and higher lcdc_init is not done by default. So I had to add that. Some configuration parameters also needed to be changed for the LCD to work properly. I can post a document in which I documented the changes tomorrow, when I will have my development computer in front of me.

    Cheers!

  • Hi Casper,

    I'm not familiar with any LCD calibration utility. You can check the fbset utility from this guide for anything suspicious in the parameters. Other than that you can try and modify the driver's margin parameters in da8xx-fb.c:

    #define LEFT_MARGIN    64
    #define RIGHT_MARGIN    64
    #define UPPER_MARGIN    32
    #define LOWER_MARGIN    32

    Try to calibrate your LCD by modifying their values.

    Regarding the invert_line_clock member - it is probably used to select on which edge of the clock the line signals should be clocked.

    Best regards,
    Miroslav

  • Hello Miroslav,

    thank you for your advice. I will try it as soon as I get the chance and see if it works. Your explanation of the invert_line_clock seems logical and it is what I first thought of as well. But I can not figure out why this change would introduce a substantial positive offset in the x direction. My rough estimate is that about 80 pixels are lost at the left side of the display because of this. Any idea why so much?

    Regards.

  • Miroslav, editing the driver's margin parameters in da8xx-fb.c did not help. But it did point me in the right direction. In that same file I added my display information to the known_lcd_panels[] structure (static struct da8xx_panel known_lcd_panels[]) and made sure that my display was selected during initialization in board-am335xevm.c. The LCD now works like a charm.

    I am however bothered that I achieved this with trial and error without knowing the initialization procedure’s workflow. I modified some structures but have no idea who is calling them and when. Can anyone provide a short description of how LCD initialization is done? Where does it start (which function, which file), what is done first, second,... and when it finishes? A starting point would be especially helpful as I can try and track all relevant steps from there.

    Cheers!

  • Hello,

    Adding the lcdc_init function to the beaglebone_dev_cfg structure causes it to be called while the board is being initialized. This function uses a reading from the on board eeprom to determine which of the AM335x EVM's are being used, which is why there is a switch statement there to determine which lcdc_pdata strucutre to load. In the case of the beaglebone, there is no LCD supported by default in our SDK and the capes are not supported either, so by removing this switch statement and forcing a configuration to be assigned, you can enable an LCD. This calls the am33xx_register_lcdc function which is defined in devices.c also under arch/arm/mach-omap2. This function passes the structures you defined within board-am335xevm.c and invokes lower level calls to bring up the LCDC driver, which is defined in da8xx-fb.c which you are already familiar with. This makes sure that /dev/fb0 is created, which is the framebuffer device, and also configures the driver so that it can talk to the attached LCD. The driver is designed to be generic and can read in configuration data from the configuration structures that get passed ot it to work with the attached LCD. That is a basic overview of the LCD and framebuffer initialization process, hopefully this makes things a little bit more clear for you.

    Regards,

    Dave

  • Hi Dave,

    I am working to run openGLES 3D application on Beaglebone+DVID cape using SGX driver. After doing many trial with multiple linux kernel sources(psp) available in web, I ended-up with running only few basic unittests. But 3D am unable to run . This is because i assume most of these linux BSP available is less compatible for openGLES. Even after reading some e2e posts i found TI-SDK having support for openGLES 3D. But  when am trying to boot my Beaglebone+DVID cape with "ti-sdk-am335x-evm-05.07.00.00-linux-X86-install" i ended with no display and /dev/fb0 not created , but am able to boot my Beaglebone.

    Can you please suggest me something here, how to get out from this trouble.

    Regards

    ram

  • Hi Casper,

    I am also working on running openGL/3D applications on Beaglebone with LCD cape using Ti-sdk-am335xevm and Graphics SDK. But I am not sure with this ti-sdk-am335xevm directly will work for display on Beaglebone LCD cape.

    I have tried  with ti-sdk prebuilt images on beaglebone  DVI-cape but i did not see any display on HDMI monitor which is connected using DVI cape.This same issue  posted in following E2Eforum from this post i got reply need to be change some board files it seems to very difficult.Thats why i have bought new LCD cape.

      http://e2e.ti.com/support/arm/sitara_arm/f/791/p/298304/1044819.aspx#1044819

    Can you guide me how to proceed with this Beaglebone LCD using ti-sdk-am335xevm and Graphics-sdk.

    Thanks

    Ram

  • Hi Ram,

    I am unfortunately not able to open the link from your last post (Either the site is offline or an unhandled error occurred. ) so I don't know which cape you now have. Any chance you can get that information to me another way?

    Until then the best thing I can do is give you the two documents I wrote for myself so I do not forget how to get things working for my configuration. This is the LCD I used: http://www.chipsee.com/beaglebone-exp.html

    I have to admit I did not do much work on my BeagleBone. I got it up and running, tested the 3D Graphics SDK demos and once that worked I had to move on to other projects. But from the work I had to do to get everything working I noticed I had to do quite some source tinkering. Although I imagine that was due to my cape not being natively supported (at least at that time).

    Regards!

    EZSDK-and-Graphics-SDK.zip
  • Hi please send me the SDK prebuilt SDK link of Chipsee Beagle Bone Black with 7" LCD touch screen.

    Thanking you,
    Raghavendra
  • Hi,
    We are using AM3358 TI SDK 03.02.00.05 (software-dl.ti.com/.../index_FDS.html) , Kernel : 4.4.32 with 7" capacitive touch screen beagle bone black on Linux machine but my display is not working, So please give me any suggestion.
    Thanks,
    Raghavendra