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.

TMS320DM814 Processor GPIO

Other Parts Discussed in Thread: OMAP-L138, OMAP-L137, CCSTUDIO, TMS320DM8148

Hi Guys,


Since i'm new to Embedded world as well as TI forum.

Can some guide me how to develop a GLCD driver with the help of DM8148 using GPIO's.

1.How to understand GEL file?

2.GLCD interface code?

Thanks and regards,

Chethan

  • Chethan,

    Chethan Shetty1 said:
    1.How to understand GEL file?

    http://processors.wiki.ti.com/index.php/GEL

    http://processors.wiki.ti.com/index.php/OMAP_and_Sitara_CCS_support#DM8148

    In short, the GEL file is used to do basic configuration of the hardware. The GEL file replace the u-boot.

    Chethan Shetty1 said:
    2.GLCD interface code?

    I see the GLCD (Graphical LCD) driver is available for other than DM814x device, devices like OMAP-L137, DA830, DA850, OMAP-L138, AM18x, AM335x.

    http://processors.wiki.ti.com/index.php/OMAP-L137/DA830_Linux_LCD_driver

    http://processors.wiki.ti.com/index.php/DaVinci_PSP_03.22.00.06_Device_Driver_Features_and_Performance_Guide#Graphical_LCD_.28GLCD.29_Driver_.28DA850.2FOMAP-L138.2FAM18x.29

    http://processors.wiki.ti.com/index.php/AM335x-PSP_04.06.00.03_Features_and_Performance_Guide#Graphical_LCD_.28GLCD.29_Driver

    For DM814x LCD we have:

    http://processors.wiki.ti.com/index.php/TI81XX_PSP_TouchScreen_Driver_Guide

    http://processors.wiki.ti.com/index.php/LCD_connectivity

    http://e2e.ti.com/support/dsp/davinci_digital_media_processors/f/717.aspx

    http://e2e.ti.com/support/dsp/davinci_digital_media_processors/f/716/t/153968.aspx

    http://e2e.ti.com/support/dsp/davinci_digital_media_processors/f/716/t/245213.aspx

    http://e2e.ti.com/support/dsp/davinci_digital_media_processors/f/716/t/177076.aspx

    http://e2e.ti.com/support/dsp/davinci_digital_media_processors/f/716/t/170893.aspx

    The GPIO driver user guide:

    http://processors.wiki.ti.com/index.php/TI81XX_PSP_GPIO_Driver_User_Guide

    Best regards,
    Pavel

  • Dear Mr. Pavel,

    Thanks for your kind information.

    I know Gel file,but how can i understand the logic which is being written??

    Where i can clear my doubts??

    BR

    Chethan

  • Chethan,

    The GEL file is part of the CCStudio. Thus I would recommend you to check in our CCStudio forum:

    http://e2e.ti.com/support/development_tools/code_composer_studio/f/81.aspx

    Chethan Shetty1 said:
    how can i understand the logic which is being written?

    The logic is similar to C code, below I am attaching the DM8148 GEL file:

    8535.DM814x_PG2.x.gel

    Let me know which part of the GEL file is not clear to you, and I will try to provide you an explanation.

    Regards,
    Pavel

  • Pavel,

    I have the Gel file but older version,anyway thanks for the latest version.

    I'm came to know that GEL file is used to configure and initialize the hardware and setting the various registers values so the device  can work properly.

    But my doubt is how the module is initialize-----> Example : ALL_ADPLL_CLOCKS_ENABLE() logic inside this.

    And please explain this ......

    #define WR_MEM_32(addr, data)    *(unsigned int*)(addr) =(unsigned int)(data)
        #define RD_MEM_32(addr)            *(unsigned int*)(addr)

    Please elaborate it since i came to know that,this macro is base for all functions..

    BR

    Chethan

  • Chethan,

    Chethan Shetty1 said:
    But my doubt is how the module is initialize-----> Example : ALL_ADPLL_CLOCKS_ENABLE() logic inside this.

    Let we start with the fact that DM814x device can be GP (General Purpose), HS (High Secure), EMU (Emulation), Test and Bad device, see register CONTROL_STATUS[10:8] DEVTYPE


    ALL_ADPLL_CLOCKS_ENABLE() function is used/executed when we have Test device:

    /***** For Test Device *************/
        hotmenu Centaurus_System_Initialisation_TEST_device()
        {
            ControlModule_ClkEnable();
            Unlock_PLL_Control_MMR();
            OpenFireWall();
            ALL_ADPLL_CLOCKS_ENABLE();
            PrcmAlwayOnClkEnable();
            DucatiClkEnable();
            IVAHD0ClkEnable();
            //DDR2_EMIF0_EMIF1_Config();
        }

    hotmenu means that you can start that function (Centaurus_System_Initialisation_TEST_device) from the CCStudio menu (tab Scripts).

    Most of the DM814x devices are GP device, and in this case you should start ALL_ADPLL_CLOCKS_ENABLE_API():

    /***** For GP Device *************/
        hotmenu Centaurus_System_Initialisation_GP_device()
        {
        GEL_TextOut("\t ****  CENTAURUS2 System_Initialisation IS in progress .......... \n","Output",1,1,1);    
        //-IS_DEVICE_GP_TEST();
        ALL_ADPLL_CLOCKS_ENABLE_API();
        //-DDR2_EMIF0_EMIF1_Config();
        DucatiClkEnable();
        GEMSSClkEnable();
        GEL_TextOut("\t ****  CENTAURUS2 System_Initialisation IS Done ****************** \n","Output",1,1,1);    
        }

    The logic inside ALL_ADPLL_CLOCKS_ENABLE_API():

    hotmenu ALL_ADPLL_CLOCKS_ENABLE_API()
        {
                GEL_TextOut("\t ****  CENTAURUS2 ALL ADPLL INIT IS In Progress ......... \n","Output",1,1,1);    
                PLL_SETUP();
                GEL_TextOut("\t ****  CENTAURUS2 ALL ADPLL INIT IS  Done ************** \n","Output",1,1,1);    
        }

    It prints two messages on the CCS console and run PLL_SETUP().

    The logic inside PLL_SETUP() is to initialize and configure the device PLLs:

    PLL_SETUP(){
          
             cmdMPUPLL(CLKIN,1, 60 ,1);
              
              cmdL3PLL(CLKIN,50,800,4);
              
             cmdDSPPLL(CLKIN,50, 500, 1);
              
             cmdDSSPLL(CLKIN,50, 800, 4);
              
             cmdISSPLL(CLKIN,50, 800 ,4);
              
             cmdIVAPLL(CLKIN,50, 532, 2);
              
             cmdSGXPLL(CLKIN,50, 800, 4);
              
             cmdUSBPLL(CLKIN,19,960,5);
                   
          cmdVIDEO1PLL(CLKIN,19, 594,4);
              
           cmdHDMIPLL(CLKIN,50, 1485,10);
              
            cmdDDRPLL(CLKIN,50,DDR_FREQ, 2);
            
           cmdAUDIOPLL(CLKIN,50,800,4);
     
           cmdSATAPLL();
     
           cmdPCIEPLL();
     
    }

    Chethan Shetty1 said:

    And please explain this ......

    #define WR_MEM_32(addr, data)    *(unsigned int*)(addr) =(unsigned int)(data)
        #define RD_MEM_32(addr)            *(unsigned int*)(addr)


    The WR_MEM_32 macro is writing "data" in DM814x memory mapped register at address "addr". Example:

     WR_MEM_32(MODENAPLL_TENABLE     ,0x1); - writing data (0x1) in register MODENAPLL_TENABLE. This register is at addr:

    #define MODENAPLL_TENABLE        (PLL_BASE_ADDRESS+0x050)
    #define PLL_BASE_ADDRESS         0x481C5000

    The RD_MEM_32 macro is reading the data inside the register at address addr. Example:

     rval_ctrl = RD_MEM_32(MODENAPLL_CLKCTRL);

    The data in MODENAPLL_CLKCTRL register goes to the rval_ctrl variable.

    UWORD32 rval_ctrl;

    #define UWORD32  unsigned int

    #define MODENAPLL_CLKCTRL        (PLL_BASE_ADDRESS+0x04c)

    #define PLL_BASE_ADDRESS         0x481C5000

    Regards,
    Pavel

  • That was too good...Mr.Pavel

    1.How Base addresses will decide as i gone through the datasheet (TMS320DM814x DaVinci
    Digital Video Processors-Technical Reference Manual ) couldn't find??

    2.My task is to develop LCD driver using the processor using gpio's, so my doubt is all contents are required which are their in gel file??  if no means kindly edit and send me :) it will be useful for me

    BR

    Chethan

  • Chethan,

    Chethan Shetty1 said:
    1.How Base addresses will decide as i gone through the datasheet (TMS320DM814x DaVinci
    Digital Video Processors-Technical Reference Manual ) couldn't find??

    The base address is documented in datasheet (SPRS647E – MARCH 2011 – REVISED DECEMBER 2013), see section 2.12 Memory Map Summary

    http://www.ti.com/lit/ds/symlink/tms320dm8148.pdf

    And the offset is documented in the TRM (SPRUGZ8E – 14 November 2011 – Revised October 2013)

    http://www.ti.com/lit/ug/sprugz8e/sprugz8e.pdf

    Chethan Shetty1 said:
    2.My task is to develop LCD driver using the processor using gpio's, so my doubt is all contents are required which are their in gel file??  if no means kindly edit and send me :) it will be useful for me

    No, in GEL file are just basic HW initialization and configuration. Please go through the links I have provided to you in my first post. In addition to these links you can also refer to the DM8148 EVM LCD code from Mistral (lcd_display test and lcd_interposer_touch test).

    Best regards,
    Pavel

  • Thank for your precious time towards me.....

    Very useful informations please stay in touch with me till my task completion.

    BR

    Chethan