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 GPMC to DSP interface it is possible or not.

Other Parts Discussed in Thread: AM3352

Hi all,

-  I need to Configure the interface GPMC to DSP is possible in AM3352 or not.

-  If possible, Please specify the steps, how to configure, i read the document of all configuration GPMC and  external memory peripherals present in the AM3352 datasheet.

In Code ******************

1st Dought

/**
* \brief   This function sets the chip select mask address or size.\n
*
* \param   baseAddr       Memory address of GPMC.\n
*
* \param   csNum          Chip Select Number.\n
*                         This can take one of the following values :\n
*                         GPMC_CHIP_SELECT_0 -- For Chip Select 0.\n
*                         GPMC_CHIP_SELECT_1 -- For Chip Select 1.\n
*                         GPMC_CHIP_SELECT_2 -- For Chip Select 2.\n
*                         GPMC_CHIP_SELECT_3 -- For Chip Select 3.\n
*                         GPMC_CHIP_SELECT_4 -- For Chip Select 4.\n
*                         GPMC_CHIP_SELECT_5 -- For Chip Select 5.\n
*                         GPMC_CHIP_SELECT_6 -- For Chip Select 6.\n
*                         GPMC_CHIP_SELECT_7 -- For Chip Select 7.\n
*
* \param  addrMask        Address Mask to set. \n
*                         This can take one of the following values :\n
*                         GPMC_CS_SIZE_256MB  -- For Chip-select size of 256 MB.\n
*                         GPMC_CS_SIZE_128MB  -- For Chip-select size of 128 MB.\n
*                         GPMC_CS_SIZE_64MB   -- For Chip-select size of 64 MB.\n
*                         GPMC_CS_SIZE_32MB   -- For Chip-select size of 32 MB.\n
*                         GPMC_CS_SIZE_16MB   -- For Chip-select size of 16 MB.\n
*
* \return  None.\n
*
*/
void  GPMCMaskAddrSet(unsigned int baseAddr, unsigned int csNum,
                      unsigned int addrMask)
{
    HWREG(baseAddr + GPMC_CONFIG7(csNum)) &= (~GPMC_CONFIG7_0_MASKADDRESS);
    HWREG(baseAddr + GPMC_CONFIG7(csNum)) |= ((addrMask <<
                                               GPMC_CONFIG7_0_MASKADDRESS_SHIFT)
                                               & GPMC_CONFIG7_0_MASKADDRESS);
}

-  In the CS configuration time must mentioned the CS mask address setting and Base address, i give the Base address 0x2F and how to give CS mask address of external device of  DSP processor (this is a processor not a NAND and NOR flash).

- How to give the size of CS to connected on external peripheral for DSP?

- How to mentioned third argument for DSP processor?

2nd dought:-

/**
* \brief   This function configs the timing parameters for WE# and OE# signal.\n
*
* \param   baseAddr       Memory address of GPMC.\n
*
* \param   csNum          Chip Select Number.\n
*                         This can take one of the following values :\n
*                         GPMC_CHIP_SELECT_0 -- For Chip Select 0.\n
*                         GPMC_CHIP_SELECT_1 -- For Chip Select 1.\n
*                         GPMC_CHIP_SELECT_2 -- For Chip Select 2.\n
*                         GPMC_CHIP_SELECT_3 -- For Chip Select 3.\n
*                         GPMC_CHIP_SELECT_4 -- For Chip Select 4.\n
*                         GPMC_CHIP_SELECT_5 -- For Chip Select 5.\n
*                         GPMC_CHIP_SELECT_6 -- For Chip Select 6.\n
*                         GPMC_CHIP_SELECT_7 -- For Chip Select 7.\n
*
* \param   conf           Configuration value for WE# and OE# signal timing
*                         Parameters. Use the GPMC_WE_OE_TIMING_CONFIG macro to
*                         get the value of conf. \n
*
* \return  None.\n
*
*/


void  GPMCWEAndOETimingConfig(unsigned int baseAddr, unsigned int csNum,
                              unsigned int conf)
{
    HWREG(baseAddr + GPMC_CONFIG4(csNum)) = conf;
}


- Here, the third argument is MACRO, i used that macro i am getting compilation error.

- Please specify how to use third argument of above WE and OE function.?

Thanks in advance,

Vamsi.

  • Hi Bro,


    any one reply to me...................
  • Singasetty,

    Please see this previous thread e2e.ti.com/.../521445

    There are GPMC examples in the Processor SDK pacakge referenced in that thread. The example should help you get the settings sorted. Hope this helps.

    Lali
  • Hi Lalindra,

    Tanks for your reply.....................

    1st Issue  is clear

    2nd issue :-

    - In starter ware all are depend on API's, at that GPMC (GPMCWEAndOETimingConfig) is the one of the API present in the list of API's.

    - I used this API for configure the timing values of WE and OE parameters configuration.

    -

    /**

    * \brief   This function configs the timing parameters for WE# and OE# signal.\n

    *

    * \param   baseAddr       Memory address of GPMC.\n

    *

    * \param   csNum          Chip Select Number.\n

    *                         This can take one of the following values :\n

    *                         GPMC_CHIP_SELECT_0 -- For Chip Select 0.\n

    *                         GPMC_CHIP_SELECT_1 -- For Chip Select 1.\n

    *                         GPMC_CHIP_SELECT_2 -- For Chip Select 2.\n

    *                         GPMC_CHIP_SELECT_3 -- For Chip Select 3.\n

    *                         GPMC_CHIP_SELECT_4 -- For Chip Select 4.\n

    *                         GPMC_CHIP_SELECT_5 -- For Chip Select 5.\n

    *                         GPMC_CHIP_SELECT_6 -- For Chip Select 6.\n

    *                         GPMC_CHIP_SELECT_7 -- For Chip Select 7.\n

    *

    * \param   conf           Configuration value for WE# and OE# signal timing

    *                         Parameters. Use the GPMC_WE_OE_TIMING_CONFIG macro to

    *                         get the value of conf. \n

    *

    * \return  None.\n

    *

    */

    void  GPMCWEAndOETimingConfig(unsigned int baseAddr, unsigned int csNum,

                                 unsigned int conf)

    {

       HWREG(baseAddr + GPMC_CONFIG4(csNum)) = conf;

    }

    For AM3352 Module,

    - 1st argument is Memory address of GPMC is 0X500000000.

    - 2nd argument  is chip select selection i.e   GPMC_CHIP_SELECT_2 my customized board schematics.

    - 3rd argument is GPMC_WE_OE_TIMING_CONFIG, this is the MACRO this defined in gpmc.h file.

    void  GPMCWEAndOETimingConfig(0X500000000,  GPMC_CHIP_SELECT_2, GPMC_WE_OE_TIMING_CONFIG);

    - I compiled the above format, i am getting compilation Error like, GPMC_WE_OE_TIMING_CONFIG undeclared.

    - Please check once your starterware source code, guide me how to use 3rd argument.

    Regards,

    Vamsi.

  • Can any one Replay for this post...........
  • Vamsi,

    In \packages\ti\starterware\library\nandlib\nand_lib_gpmc.c

    GPMCWEAndOETimingConfig(baseAddr, chipSel, &oeWeSignalTimingParams); indicates how to call this API with the OE and WE timing parameters. Is this what you want to do?

    Lali
  • - I am using starter ware version, AM335X_Starter Ware_02_00_01_01.

    "starter ware\library\nandlib\nand_lib_gpmc.c", This path is not available on above version.

    My issue is:

    - I used API for configure the timing values of WE and OE parameters configuration, present in
    "AM335X_StarterWare_02_00_01_01/drivers/gpmc.c"

    /**

    * \brief This function configs the timing parameters for WE# and OE# signal.\n

    *

    * \param baseAddr Memory address of GPMC.\n

    *

    * \param csNum Chip Select Number.\n

    * This can take one of the following values :\n

    * GPMC_CHIP_SELECT_0 -- For Chip Select 0.\n

    * GPMC_CHIP_SELECT_1 -- For Chip Select 1.\n

    * GPMC_CHIP_SELECT_2 -- For Chip Select 2.\n

    * GPMC_CHIP_SELECT_3 -- For Chip Select 3.\n

    * GPMC_CHIP_SELECT_4 -- For Chip Select 4.\n

    * GPMC_CHIP_SELECT_5 -- For Chip Select 5.\n

    * GPMC_CHIP_SELECT_6 -- For Chip Select 6.\n

    * GPMC_CHIP_SELECT_7 -- For Chip Select 7.\n

    *

    * \param conf Configuration value for WE# and OE# signal timing

    * Parameters. Use the GPMC_WE_OE_TIMING_CONFIG macro to

    * get the value of conf. \n

    *

    * \return None.\n

    *

    */

    void GPMCWEAndOETimingConfig(unsigned int baseAddr, unsigned int csNum,

    unsigned int conf)

    {

    HWREG(baseAddr + GPMC_CONFIG4(csNum)) = conf;

    }

    For AM3352 Module,

    - 1st argument is Memory address of GPMC is 0X500000000.

    - 2nd argument is chip select selection i.e GPMC_CHIP_SELECT_2 my customized board schematics.

    - 3rd argument is GPMC_WE_OE_TIMING_CONFIG, this is the MACRO this defined in gpmc.h file.
    "AM335X_StarterWare_02_00_01_01/include/gpmc.h"

    - I wrote the statement like below,

    void GPMCWEAndOETimingConfig(0X500000000, GPMC_CHIP_SELECT_2, GPMC_WE_OE_TIMING_CONFIG);

    - I compiled the above format, i am getting compilation Error like, GPMC_WE_OE_TIMING_CONFIG undeclared.

    - Please check once your starter ware same version source code, guide me how to use 3rd argument.

    Regards,

    Vamsi.
  • Hi,


    Can any one reply this post..

    Regards,
    vamsi.