Sign in

username:

password:



Not a member?

Search c55x



Search tips

Subscribe to c55x



c55x by Keywords

AIC23 | C5509 | CCS | CSL | EMIF | EVM | GEL | GPIO | HPI | Interfacing | JTAG | McBSP | OMAP | Omap15 | OMAP59 | RTDX | SDRAM | TMS320VC5509 | USB | XDS5

Ads

Discussion Groups

Discussion Groups | TMS320C55x | help in GPIO

Technical discussions about the TI C55x DSPs (including the c5501, c5502, c5503, c5507, c5509, c5510 and OMAP5910).

  

Post a new Thread

help in GPIO - aliaa - Jun 24 10:51:21 2008



i am new in DSP i am using c5510 i need to use GPIO but i couldn't
found any example so i tried my code but the compiler couldn't
recognize the function names or definitions and i have the following
errors:
, line 51: error: identifier "GPIO_Handle" is undefined
, line 52: error: identifier "hGPio" is undefined
, line 52: error: identifier "GPIO_PGPIO_PIN1" is undefined
, line 53: error: declaration may not appear after executable
statement in block
, line 53: error: identifier "GPIO_Config" is undefined
, line 53: error: identifier "GPIO_PGPIO_PIN1_OUTPUT" is undefined
, line 54: error: expected a ";"
, line 55: error: too many arguments in function call

 this my code can any one tell me what to do.
#include <csl.h>
#include <csl_gpio.h>
#include <csl_gpiodat.h>
#include <_csl_pgpio.h>
#include <_csl_pgpiodat.h>
#include <_csl_pgpiohal.h>
#include <csl_gpiohal.h>
void main()
{
	GPIO_Handle hGPIO;
	hGPio = GPIO_open(GPIO_PGPIO_PIN1,0);
	GPIO_Config myConfig = {GPIO_PGPIO_PIN1_OUTPUT}
	GPIO_config(hGPIO, &myConfig);
	GPIO_pinEnable ( hGPIO, GPIO_PGPIO_PIN1);
    
}
thanks 

------------------------------------

OMAP35x EVM jump-starts low-power apps
------------------------------------
The modular and extensible OMAP35x Evaluation Module (EVM) enables developers to start building
applications based on the OMAP35x architecture:http://www.DSPRelated.com/omap35x



(You need to be a member of c55x -- send a blank email to c55x-subscribe@yahoogroups.com )

Re: help in GPIO - Chris Eilbeck - Jun 24 22:20:43 2008

On Tue, Jun 24, 2008 at 09:25:09AM -0000, aliaa wrote:
> i am new in DSP i am using c5510 i need to use GPIO but i couldn't
> found any example so i tried my code but the compiler couldn't
> recognize the function names or definitions and i have the following
> errors:
> , line 51: error: identifier "GPIO_Handle" is undefined
> , line 52: error: identifier "hGPio" is undefined
> , line 52: error: identifier "GPIO_PGPIO_PIN1" is undefined
> , line 53: error: declaration may not appear after executable
> statement in block
> , line 53: error: identifier "GPIO_Config" is undefined
> , line 53: error: identifier "GPIO_PGPIO_PIN1_OUTPUT" is undefined
> , line 54: error: expected a ";"
> , line 55: error: too many arguments in function call
> 
>  this my code can any one tell me what to do.
> 
> **snip**

As far as I can tell, GPIO_Handle, GPIO_Config etc. are only used on the
5502, not on the 5510.  With the 5510 you can just enable the pins, set the
direction of each and write/read from them.  If I'm wrong, I'd appreciate a
pointer from someone.  I'd also appreciate any info anyone could give me
about using a timer to recover from any errors on a GPIO comms bus I'm
working with.

Cheers

Chris
-- 
Chris Eilbeck

------------------------------------

OMAP35x EVM jump-starts low-power apps
------------------------------------
The modular and extensible OMAP35x Evaluation Module (EVM) enables developers to start building
applications based on the OMAP35x architecture:http://www.DSPRelated.com/omap35x



(You need to be a member of c55x -- send a blank email to c55x-subscribe@yahoogroups.com )

Re: help in GPIO - Jeff Brower - Jun 26 13:10:33 2008

Chris-

> On Tue, Jun 24, 2008 at 09:25:09AM -0000, aliaa wrote:
> > i am new in DSP i am using c5510 i need to use GPIO but i couldn't
> > found any example so i tried my code but the compiler couldn't
> > recognize the function names or definitions and i have the following
> > errors:
> > , line 51: error: identifier "GPIO_Handle" is undefined
> > , line 52: error: identifier "hGPio" is undefined
> > , line 52: error: identifier "GPIO_PGPIO_PIN1" is undefined
> > , line 53: error: declaration may not appear after executable
> > statement in block
> > , line 53: error: identifier "GPIO_Config" is undefined
> > , line 53: error: identifier "GPIO_PGPIO_PIN1_OUTPUT" is undefined
> > , line 54: error: expected a ";"
> > , line 55: error: too many arguments in function call
> >
> >  this my code can any one tell me what to do.
> >
> > **snip**
> 
> As far as I can tell, GPIO_Handle, GPIO_Config etc. are only used on the
> 5502, not on the 5510.  With the 5510 you can just enable the pins, set the
> direction of each and write/read from them.  If I'm wrong, I'd appreciate a
> pointer from someone.  I'd also appreciate any info anyone could give me
> about using a timer to recover from any errors on a GPIO comms bus I'm
> working with.

I only have 5502 CSL-based project examples handy, but I would have to say it doesn't
make sense why 5510 CSL would not also support GPIO functions.  The GPIO
functionality on the two devices is the same, although of course the pin mapping is
different.  GPIO is nothing and complex has been around for many years.

What library files are you including?  Can you use other CSL functions?  Is your
project using DSP/BIOS?

-Jeff

------------------------------------

OMAP35x EVM jump-starts low-power apps
------------------------------------
The modular and extensible OMAP35x Evaluation Module (EVM) enables developers to start building
applications based on the OMAP35x architecture:http://www.DSPRelated.com/omap35x



(You need to be a member of c55x -- send a blank email to c55x-subscribe@yahoogroups.com )

Re: help in GPIO - aliaa - Jun 29 9:36:52 2008

--- In c...@yahoogroups.com, Jeff Brower <jbrower@...> wrote:
>
> Chris-
> 
> > On Tue, Jun 24, 2008 at 09:25:09AM -0000, aliaa wrote:
> > > i am new in DSP i am using c5510 i need to use GPIO but i couldn't
> > > found any example so i tried my code but the compiler couldn't
> > > recognize the function names or definitions and i have the following
> > > errors:
> > > , line 51: error: identifier "GPIO_Handle" is undefined
> > > , line 52: error: identifier "hGPio" is undefined
> > > , line 52: error: identifier "GPIO_PGPIO_PIN1" is undefined
> > > , line 53: error: declaration may not appear after executable
> > > statement in block
> > > , line 53: error: identifier "GPIO_Config" is undefined
> > > , line 53: error: identifier "GPIO_PGPIO_PIN1_OUTPUT" is undefined
> > > , line 54: error: expected a ";"
> > > , line 55: error: too many arguments in function call
> > >
> > >  this my code can any one tell me what to do.
> > >
> > > **snip**
> > 
> > As far as I can tell, GPIO_Handle, GPIO_Config etc. are only used
on the
> > 5502, not on the 5510.  With the 5510 you can just enable the
pins, set the
> > direction of each and write/read from them.  If I'm wrong, I'd
appreciate a
> > pointer from someone.  I'd also appreciate any info anyone could
give me
> > about using a timer to recover from any errors on a GPIO comms bus I'm
> > working with.
> 
> I only have 5502 CSL-based project examples handy, but I would have
to say it doesn't
> make sense why 5510 CSL would not also support GPIO functions.  The GPIO
> functionality on the two devices is the same, although of course the
pin mapping is
> different.  GPIO is nothing and complex has been around for many years.
> 
> What library files are you including?  Can you use other CSL
functions?  Is your
> project using DSP/BIOS?
> 
> -Jeff
>

I include this files 
#include <csl.h>
#include <csl_gpio.h>
#include <csl_gpiodat.h>
#include <_csl_pgpio.h>
#include <_csl_pgpiodat.h>
#include <_csl_pgpiohal.h>
#include <csl_gpiohal.h>
and GPIO_pinEnable function colored blue in the code.
and i used those function to enable me to out 4 digits to control
motors by H-bridge can any one know how to do that with GPIO or any
thing else.
------------------------------------

OMAP35x EVM jump-starts low-power apps
------------------------------------
The modular and extensible OMAP35x Evaluation Module (EVM) enables developers to start building
applications based on the OMAP35x architecture:http://www.DSPRelated.com/omap35x



(You need to be a member of c55x -- send a blank email to c55x-subscribe@yahoogroups.com )

Re: Re: help in GPIO - Jeff Brower - Jun 29 13:42:07 2008

Ali-

> I include this files
> #include <csl.h>
> #include <csl_gpio.h>
> #include <csl_gpiodat.h>
> #include <_csl_pgpio.h>
> #include <_csl_pgpiodat.h>
> #include <_csl_pgpiohal.h>
> #include <csl_gpiohal.h>
> and GPIO_pinEnable function colored blue in the code.
> and i used those function to enable me to out 4 digits to control
> motors by H-bridge can any one know how to do that with GPIO or any
> thing else.

It sounds like you already have it working with GPIO.  What is the question?

-Jeff
------------------------------------

OMAP35x EVM jump-starts low-power apps
------------------------------------
The modular and extensible OMAP35x Evaluation Module (EVM) enables developers to start building
applications based on the OMAP35x architecture:http://www.DSPRelated.com/omap35x



(You need to be a member of c55x -- send a blank email to c55x-subscribe@yahoogroups.com )

Re: Re: help in GPIO - Sima Baymani - Jun 29 21:27:44 2008

I think what Jeff meant by "what libraries are you including" is not only
your #include statements, but also what you are telling the compiler and the
linker. For them to be able to _find_ the libraries you want to #include,
you have to tell them where they are, i.e. a path or similar direction.

If I recall correctly, you can set the csl lib from the .cdb (?) file, under
Global Settings or something. There will be a field there for which csl
library you want to use, and you simply write the name of it there.

You also have to give library and include paths to the compiler and linker.
Read the compiler and linker instructions to find out which flags you have
to use. E.g. -i is the flag for include-paths.

Without correct directions your program can't be linked properly and the
calls you are trying to make won't work.

HTH.
-Sima

On Sat, Jun 28, 2008 at 9:46 PM, aliaa <l...@yahoo.com> wrote:

>   --- In c...@yahoogroups.com <c55x%40yahoogroups.com>, Jeff Brower
> <jbrower@...> wrote:
> >
> > Chris-
> >
> > > On Tue, Jun 24, 2008 at 09:25:09AM -0000, aliaa wrote:
> > > > i am new in DSP i am using c5510 i need to use GPIO but i couldn't
> > > > found any example so i tried my code but the compiler couldn't
> > > > recognize the function names or definitions and i have the following
> > > > errors:
> > > > , line 51: error: identifier "GPIO_Handle" is undefined
> > > > , line 52: error: identifier "hGPio" is undefined
> > > > , line 52: error: identifier "GPIO_PGPIO_PIN1" is undefined
> > > > , line 53: error: declaration may not appear after executable
> > > > statement in block
> > > > , line 53: error: identifier "GPIO_Config" is undefined
> > > > , line 53: error: identifier "GPIO_PGPIO_PIN1_OUTPUT" is
undefined
> > > > , line 54: error: expected a ";"
> > > > , line 55: error: too many arguments in function call
> > > >
> > > > this my code can any one tell me what to do.
> > > >
> > > > **snip**
> > >
> > > As far as I can tell, GPIO_Handle, GPIO_Config etc. are only used
> on the
> > > 5502, not on the 5510. With the 5510 you can just enable the
> pins, set the
> > > direction of each and write/read from them. If I'm wrong, I'd
> appreciate a
> > > pointer from someone. I'd also appreciate any info anyone could
> give me
> > > about using a timer to recover from any errors on a GPIO comms bus I'm
> > > working with.
> >
> > I only have 5502 CSL-based project examples handy, but I would have
> to say it doesn't
> > make sense why 5510 CSL would not also support GPIO functions. The GPIO
> > functionality on the two devices is the same, although of course the
> pin mapping is
> > different. GPIO is nothing and complex has been around for many years.
> >
> > What library files are you including? Can you use other CSL
> functions? Is your
> > project using DSP/BIOS?
> >
> > -Jeff
> > I include this files
> #include <csl.h>
> #include <csl_gpio.h>
> #include <csl_gpiodat.h>
> #include <_csl_pgpio.h>
> #include <_csl_pgpiodat.h>
> #include <_csl_pgpiohal.h>
> #include <csl_gpiohal.h> and GPIO_pinEnable function colored blue in the code.
> and i used those function to enable me to out 4 digits to control
> motors by H-bridge can any one know how to do that with GPIO or any
> thing else.
>
>  
>
------------------------------------

OMAP35x EVM jump-starts low-power apps
------------------------------------
The modular and extensible OMAP35x Evaluation Module (EVM) enables developers to start building
applications based on the OMAP35x architecture:http://www.DSPRelated.com/omap35x



(You need to be a member of c55x -- send a blank email to c55x-subscribe@yahoogroups.com )

Re: help in GPIO - aliaa - Jun 29 21:27:50 2008

--- In c...@yahoogroups.com, "Jeff Brower" <jbrower@...> wrote:
>
> Ali-
> 
> > I include this files
> > #include <csl.h>
> > #include <csl_gpio.h>
> > #include <csl_gpiodat.h>
> > #include <_csl_pgpio.h>
> > #include <_csl_pgpiodat.h>
> > #include <_csl_pgpiohal.h>
> > #include <csl_gpiohal.h>
> >
> >
> > and GPIO_pinEnable function colored blue in the code.
> > and i used those function to enable me to out 4 digits to control
> > motors by H-bridge can any one know how to do that with GPIO or any
> > thing else.
> 
> It sounds like you already have it working with GPIO.  What is the
question?
> 
> -Jeff
>
no this errors appear when i tried to write simple code to test gpio

line 51: error: identifier "GPIO_Handle" is undefined
> > , line 52: error: identifier "hGPio" is undefined
> > , line 52: error: identifier "GPIO_PGPIO_PIN1" is undefined

------------------------------------

OMAP35x EVM jump-starts low-power apps
------------------------------------
The modular and extensible OMAP35x Evaluation Module (EVM) enables developers to start building
applications based on the OMAP35x architecture:http://www.DSPRelated.com/omap35x



(You need to be a member of c55x -- send a blank email to c55x-subscribe@yahoogroups.com )