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.

Starterware Beaglebone LCD CAPE7

Hi,

I have LCD cape 7 ver A3, Beaglebone A6 (white). I want to use Starterware libraries to test a simple program.

I have used the the sample rasterdisplay project from evmAM335x platform  and modified according to BB hardware and LCd Cape 7 Changes.

I am not succesfull in this attempt

Any one please help?

I am attaching(only changes files) the sample project that I have created. Please advise necessary changes.

I just want to see it displaying something. even Hello world will be fine

AM335X_StarterWare_02_00_01_01.zip
  • Dear Jyothi Kiran,

    Thank you for replying.. 

    I already modified the project according to the changes in linux port.. I will paste the code changes if you want.

    Still no progress..

    Thanks

    Dasco

  • Hi Dasco,

    Can you please debug further and narrow down to the portion of the code(configuration) which is causing issue. This will enable us to help you with better suggestions.

    Regards,

    M.Jyothi Kiran

  • Hi Jyothi Kiran,

    As mentioned earlier, I copied the evmAM335x rasterDisplay Sample Application, and adapted it according to the beaglebone LCD7 linux port in starterware. 

    PLease see below, code change done by me..

    1. File :  platform\beaglebone\lcd.c

                   i) Changed the PinMux setting for LCD 7, by removing the LCD_DATA16-24

                   ii). Modified the LCDBackLightEnable()



    /* Convert GPIO signal to GPIO pin number */
    #define GPIO_TO_PIN(bank, gpio) (32 * (bank) + (gpio))
    #define GPIO_BKL_EN GPIO_TO_PIN(0,2)
    #define GPIO_AVDD_EN GPIO_TO_PIN(0,7)

    void LCDBackLightEnable(void)
    {
     GPIO0ModuleClkConfig();

     //LCD_AVDD_EN pin GPIO(0, 7)
     GPIO0Pin7PinMuxSetup();
     //BKL_EN pin GPIO(0, 2)
     GPIO0Pin2PinMuxSetup();
     
     /* Resetting the GPIO module. */
     GPIOModuleReset(SOC_GPIO_0_REGS);

     /* Enabling the GPIO module. */
     GPIOModuleEnable(SOC_GPIO_0_REGS);
     /* Setting the GPIO pin as an input pin. */
     GPIODirModeSet(SOC_GPIO_0_REGS, GPIO_BKL_EN, GPIO_DIR_OUTPUT);
     GPIODirModeSet(SOC_GPIO_0_REGS, GPIO_AVDD_EN, GPIO_DIR_OUTPUT);
     
     GPIOPinWrite(SOC_GPIO_0_REGS, GPIO_BKL_EN, GPIO_PIN_HIGH);
     GPIOPinWrite(SOC_GPIO_0_REGS, GPIO_AVDD_EN, GPIO_PIN_HIGH);

    }

    2) File: platform\beaglebone\gpio.c

           Added a new function  GPIO0Pin2PinMuxSetup

    void GPIO0Pin2PinMuxSetup(void)
    {

          HWREG(SOC_CONTROL_REGS + CONTROL_CONF_GPMC_A(2)) = CONTROL_CONF_MUXMODE(6);

    }
     

     3) File : examples\beaglebone\raster\rasterDisplay.c

    Modified the Main Function, just commented the power down function UPDNPinControl, rest as it is no changes

    int main()
    {
            IntMasterIRQEnable();
            IntAINTCInit(); 

      LCDAINTCConfigure();

    //Set the Back light and powerdown pin to high LCDBackLightEnable();  
    //UPDNPinControl();

    ..

    .. 

    }

    I also modified the configuration files, CCS project file, I was able to debug to these changed function  also,  using the Onboard JTAG. The GPIO0 register shows correct values upon setting the LCD_AVDD_EN and  BACKLight pin. However I see no display on running the program.

     

    I am suspecting the image file that I am using is 24bpp, where as the beaglebone LCD A3 is 16 data lines and supports 16bpp. Can this be issue ?  If I have to generate 16bpp image, then what pictures should i select any normal jpeg image will be fine? do I have to resize it 800X480?

    http://e2e.ti.com/support/embedded/starterware/f/790/p/214579/1016213.aspx#1016213

    Please review my changes specially GPIO_BKL_EN and GPIO_AVDD_EN settings, when i do pinmux and also when I set their values in LCDBackLightEnable function.

     

    Regards,

    Dasco

     

  • Hi Jyothi Kiran,


    My LCD screen is working now.Actually I got confused with the PINs, LCD_AVDD_EN is available in GPIO(0,2) in LCD 7, and BACKLIGHT in GPIO(1,18). Correct PinMuxing solved issue. For back light I was trying to configure it  ehrpwm1A in mode 6, which was wrong. Later when I changed it to mode 7 it worked.

    Thanks

    Gopal

  • Gopal, your work is amazing. I am having a problem with the Back Light Enable GPIO(1,18). It is not working and it is rebooting my device when I am using the JTAG to debug. It stops working on the last command: "GPIOPinWrite(SOC_GPIO_1_REGS, GPIO_INSTANCE_PIN_NUMBER, GPIO_PIN_HIGH);"

    What am I doing wrong?

    Here is the code from your library.

    File: gpio.c

    void GPIO1Pin18PinMuxSetup(void)
    {
    HWREG(SOC_CONTROL_REGS + CONTROL_CONF_GPMC_A(2)) = CONTROL_CONF_MUXMODE(7);
    }

     

    File: lcd.c

    #define GPIO_INSTANCE_PIN_NUMBER (18u)

    void LCDBackLightEnable(void)
    {

    //[Changes 03]
    //GPIO0ModuleClkConfig();
    GPIO1ModuleClkConfig();

    //GPIO0Pin7PinMuxSetup();
    // Add the PinMux Confi
    //[Change:01]
    // Currently EVM uses GPIO(0, 7)
    // beaglebone will use GPIO(1,18)
    //GpioPinMuxSetup();
    //GpioPinMuxSetup(CONTROL_CONF_GPMC_A(2),CONTROL_CONF_MUXMODE(6));
    GPIO1Pin18PinMuxSetup();

    /* Resetting the GPIO module. */
    //GPIOModuleReset(SOC_GPIO_0_REGS);
    GPIOModuleReset(SOC_GPIO_1_REGS);

    /* Enabling the GPIO module. */
    //GPIOModuleEnable(SOC_GPIO_0_REGS);
    GPIOModuleEnable(SOC_GPIO_1_REGS);

    /* Setting the GPIO pin as an input pin. */
    // GPIODirModeSet(SOC_GPIO_0_REGS,
    // GPIO_INSTANCE_PIN_NUMBER,
    // GPIO_DIR_OUTPUT);
    GPIODirModeSet(SOC_GPIO_1_REGS,
    GPIO_INSTANCE_PIN_NUMBER,
    GPIO_DIR_OUTPUT);

    //
    // GPIOPinWrite(SOC_GPIO_0_REGS, GPIO_INSTANCE_PIN_NUMBER,
    // GPIO_PIN_HIGH);
    GPIOPinWrite(SOC_GPIO_1_REGS, GPIO_INSTANCE_PIN_NUMBER,
    GPIO_PIN_HIGH);
    }

  • Ops... It actually works great. My problem was power (usb power was not enough for the display).

  • Hi Armando Valim,

    It is nice to see you found the solution by yourself :)..
    Sorry for delayed response, it has been long time I have visited this site.
    Thanks for sharing information, it will be helpful for others like us.