
Technical discussions about the TI C6000 DSPs (including the c62x, c64x and c67x DSPs).
Hello everybody,
I have a problem configuring GPIO on DM642 device. I want to use GPIO[5] as output. In order to
do that I use the folllowing code.
======================================================================
extern GPIO_Handle EVMDM642_GPIO_hGPIO;
volatile int i = 0;
// Indirizzo della gpio_val
volatile unsigned int *gpio_val = (unsigned int *)0x01B00008;
if((EVMDM642_GPIO_hGPIO = GPIO_open(GPIO_DEV0, GPIO_OPEN_RESET))==INV)
return 1;
GPIO_config(EVMDM642_GPIO_hGPIO,&GPIO_5);
// Set GPIO 5 on 1
*gpio_val |=GPIO_PIN5;
for(i=0;i<10000;i++);
// Set GPIO 5 on 0
*gpio_val &=(~GPIO_PIN5);
for(i=0;i<10000;i++);
======================================================================
However, when I enable GPIO, the PCI stops working and I'm not able to communicate with uP. The
routines (PCI and GPIO) work well separately, I'm able to see wave on oscilloscope.
I found on tms320dm642.pdf that GPIO[5] is not shared with PCI, so I' not able to figure out
where is the problem. If it can helps, I'm using the ATEME PCI library
Any hint will be appreciated.
Gio
---------------------------------
Yahoo! Mail: gratis 1GB per i messaggi, antispam, antivirus, POP3
What's in your GPIO_5 structure referenced in the GPIO_config() function
Mike
-----Original Message-----
From: c...@yahoogroups.com [mailto:c...@yahoogroups.com] On Behalf Of Giovanni
Parodi
Sent: Wednesday, September 13, 2006 10:01 AM
To: c...@yahoogroups.com
Subject: [c6x] PCI and GPIO conflict on DM642
Hello everybody,
I have a problem configuring GPIO on DM642 device. I want to use GPIO[5] as
output. In order to do that I use the folllowing code.
======================================================================
extern GPIO_Handle EVMDM642_GPIO_hGPIO;
volatile int i = 0;
// Indirizzo della gpio_val
volatile unsigned int *gpio_val = (unsigned int *)0x01B00008;
if((EVMDM642_GPIO_hGPIO = GPIO_open(GPIO_DEV0, GPIO_OPEN_RESET))==INV)
return 1;
GPIO_config(EVMDM642_GPIO_hGPIO,&GPIO_5);
// Set GPIO 5 on 1
*gpio_val |=GPIO_PIN5;
for(i=0;i<10000;i++);
// Set GPIO 5 on 0
*gpio_val &=(~GPIO_PIN5);
for(i=0;i<10000;i++);
======================================================================
However, when I enable GPIO, the PCI stops working and I'm not able to
communicate with uP. The routines (PCI and GPIO) work well separately, I'm
able to see wave on oscilloscope.
I found on tms320dm642.pdf that GPIO[5] is not shared with PCI, so I' not
able to figure out where is the problem. If it can helps, I'm using the
ATEME PCI library
Any hint will be appreciated.
Gio
Hi you are right, I forgot, it is
GPIO_Config GPIO_5 =
{
0x00000031, _/* gpgc */
// Configurazione di default del GPIO
GPIO_PIN5, _/* gpen */
// Abilito la modalita' di output del GPIO
// Per ora ho abilitato solo l'output sul GPIO 5, cmq basta eventualmente
// fare OR con altri define di libreria OCR per sistemare la cosa
GPIO_PIN5, _/* gdir */
// Per ora setto tutti i GPIO controllati bassi
0x00000000, _/* gpval */
// Setto a 0 il gphm => If a GPHM bit is disabled, the value or transition
// on the corresponding GPx pin will not cause an interrupt/event generation
GPIO_PIN5, _/* gphm */
// Setto a 0 il gplm => If a GPLM bit is disabled, the value or transition
// on the corresponding GPx pin will not cause an interrupt/event generation
GPIO_PIN5, _/* gplm */
// GPINTx is asserted (high) based on a rising edge of GPx (effectively based
// on the value of the corresponding GPXVAL)
GPIO_PIN5
};
Gio
d...@mikeroper.net ha scritto: What's in your GPIO_5
structure referenced in the GPIO_config() function
Mike
-----Original Message-----
From: c...@yahoogroups.com [mailto:c...@yahoogroups.com] On Behalf Of Giovanni
Parodi
Sent: Wednesday, September 13, 2006 10:01 AM
To: c...@yahoogroups.com
Subject: [c6x] PCI and GPIO conflict on DM642
Hello everybody,
I have a problem configuring GPIO on DM642 device. I want to use GPIO[5] as
output. In order to do that I use the folllowing code.
======================================================================
extern GPIO_Handle EVMDM642_GPIO_hGPIO;
volatile int i = 0;
// Indirizzo della gpio_val
volatile unsigned int *gpio_val = (unsigned int *)0x01B00008;
if((EVMDM642_GPIO_hGPIO = GPIO_open(GPIO_DEV0, GPIO_OPEN_RESET))==INV)
return 1;
GPIO_config(EVMDM642_GPIO_hGPIO,&GPIO_5);
// Set GPIO 5 on 1
*gpio_val |=GPIO_PIN5;
for(i=0;i<10000;i++);
// Set GPIO 5 on 0
*gpio_val &=(~GPIO_PIN5);
for(i=0;i<10000;i++);
======================================================================
However, when I enable GPIO, the PCI stops working and I'm not able to
communicate with uP. The routines (PCI and GPIO) work well separately, I'm
able to see wave on oscilloscope.
I found on tms320dm642.pdf that GPIO[5] is not shared with PCI, so I' not
able to figure out where is the problem. If it can helps, I'm using the
ATEME PCI library
Any hint will be appreciated.
Gio
__________________________________________________
Do You Yahoo!?
Poco spazio e tanto spam? Yahoo! Mail ti protegge dallo spam e ti da tanto spazio gratuito per
i tuoi file e i messaggi
http://mail.yahoo.it
The call to GPIO_config is overwriting all the GPIO register values. So
anything configured by earlier code (for example the BSL) is getting
changed. Suggest you use GPIO_pinEnable and GPIO_pinDirection functions to
individually enable GPIO 5.
Mike
-----Original Message-----
From: c...@yahoogroups.com [mailto:c...@yahoogroups.com] On Behalf Of Giovanni
Parodi
Sent: Thursday, September 14, 2006 5:39 AM
To: d...@mikeroper.net; c...@yahoogroups.com
Subject: RE: [c6x] PCI and GPIO conflict on DM642
Hi you are right, I forgot, it is
GPIO_Config GPIO_5 =
{
0x00000031, _/* gpgc */
// Configurazione di default del GPIO
GPIO_PIN5, _/* gpen */
// Abilito la modalita' di output del GPIO
// Per ora ho abilitato solo l'output sul GPIO 5, cmq basta
eventualmente
// fare OR con altri define di libreria OCR per sistemare la cosa
GPIO_PIN5, _/* gdir */
// Per ora setto tutti i GPIO controllati bassi
0x00000000, _/* gpval */
// Setto a 0 il gphm => If a GPHM bit is disabled, the value or
transition
// on the corresponding GPx pin will not cause an interrupt/event
generation
GPIO_PIN5, _/* gphm */
// Setto a 0 il gplm => If a GPLM bit is disabled, the value or
transition
// on the corresponding GPx pin will not cause an interrupt/event
generation
GPIO_PIN5, _/* gplm */
// GPINTx is asserted (high) based on a rising edge of GPx (effectively
based
// on the value of the corresponding GPXVAL)
GPIO_PIN5
};
Gio
d...@mikeroper.net ha scritto:
What's in your GPIO_5 structure referenced in the GPIO_config() function
Mike
-----Original Message-----
From: c6x@yahoogroups. <mailto:c6x%40yahoogroups.com> com
[mailto:c6x@yahoogroups. <mailto:c6x%40yahoogroups.com> com] On Behalf Of
Giovanni
Parodi
Sent: Wednesday, September 13, 2006 10:01 AM
To: c6x@yahoogroups. <mailto:c6x%40yahoogroups.com> com
Subject: [c6x] PCI and GPIO conflict on DM642
Hello everybody,
I have a problem configuring GPIO on DM642 device. I want to use GPIO[5] as
output. In order to do that I use the folllowing code.
======================================================================
extern GPIO_Handle EVMDM642_GPIO_hGPIO;
volatile int i = 0;
// Indirizzo della gpio_val
volatile unsigned int *gpio_val = (unsigned int *)0x01B00008;
if((EVMDM642_GPIO_hGPIO = GPIO_open(GPIO_DEV0, GPIO_OPEN_RESET))==INV)
return 1;
GPIO_config(EVMDM642_GPIO_hGPIO,&GPIO_5);
// Set GPIO 5 on 1
*gpio_val |=GPIO_PIN5;
for(i=0;i<10000;i++);
// Set GPIO 5 on 0
*gpio_val &=(~GPIO_PIN5);
for(i=0;i<10000;i++);
======================================================================
However, when I enable GPIO, the PCI stops working and I'm not able to
communicate with uP. The routines (PCI and GPIO) work well separately, I'm
able to see wave on oscilloscope.
I found on tms320dm642.pdf that GPIO[5] is not shared with PCI, so I' not
able to figure out where is the problem. If it can helps, I'm using the
ATEME PCI library
Any hint will be appreciated.
Gio
Hi, in fact I forgot BSL. Now it works.
Thanks a lot Gio
d...@mikeroper.net ha scritto: The call to GPIO_config is
overwriting all the GPIO register values. So
anything configured by earlier code (for example the BSL) is getting
changed. Suggest you use GPIO_pinEnable and GPIO_pinDirection functions to
individually enable GPIO 5.
Mike
-----Original Message-----
From: c...@yahoogroups.com [mailto:c...@yahoogroups.com] On Behalf Of Giovanni
Parodi
Sent: Thursday, September 14, 2006 5:39 AM
To: d...@mikeroper.net; c...@yahoogroups.com
Subject: RE: [c6x] PCI and GPIO conflict on DM642
Hi you are right, I forgot, it is
GPIO_Config GPIO_5 =
{
0x00000031, _/* gpgc */
// Configurazione di default del GPIO
GPIO_PIN5, _/* gpen */
// Abilito la modalita' di output del GPIO
// Per ora ho abilitato solo l'output sul GPIO 5, cmq basta
eventualmente
// fare OR con altri define di libreria OCR per sistemare la cosa
GPIO_PIN5, _/* gdir */
// Per ora setto tutti i GPIO controllati bassi
0x00000000, _/* gpval */
// Setto a 0 il gphm => If a GPHM bit is disabled, the value or
transition
// on the corresponding GPx pin will not cause an interrupt/event
generation
GPIO_PIN5, _/* gphm */
// Setto a 0 il gplm => If a GPLM bit is disabled, the value or
transition
// on the corresponding GPx pin will not cause an interrupt/event
generation
GPIO_PIN5, _/* gplm */
// GPINTx is asserted (high) based on a rising edge of GPx (effectively
based
// on the value of the corresponding GPXVAL)
GPIO_PIN5
};
Gio
d...@mikeroper.net ha scritto:
What's in your GPIO_5 structure referenced in the GPIO_config() function
Mike
-----Original Message-----
From: c6x@yahoogroups. <mailto:c6x%40yahoogroups.com> com
[mailto:c6x@yahoogroups. <mailto:c6x%40yahoogroups.com> com] On Behalf Of
Giovanni
Parodi
Sent: Wednesday, September 13, 2006 10:01 AM
To: c6x@yahoogroups. <mailto:c6x%40yahoogroups.com> com
Subject: [c6x] PCI and GPIO conflict on DM642
Hello everybody,
I have a problem configuring GPIO on DM642 device. I want to use GPIO[5] as
output. In order to do that I use the folllowing code.
======================================================================
extern GPIO_Handle EVMDM642_GPIO_hGPIO;
volatile int i = 0;
// Indirizzo della gpio_val
volatile unsigned int *gpio_val = (unsigned int *)0x01B00008;
if((EVMDM642_GPIO_hGPIO = GPIO_open(GPIO_DEV0, GPIO_OPEN_RESET))==INV)
return 1;
GPIO_config(EVMDM642_GPIO_hGPIO,&GPIO_5);
// Set GPIO 5 on 1
*gpio_val |=GPIO_PIN5;
for(i=0;i<10000;i++);
// Set GPIO 5 on 0
*gpio_val &=(~GPIO_PIN5);
for(i=0;i<10000;i++);
======================================================================
However, when I enable GPIO, the PCI stops working and I'm not able to
communicate with uP. The routines (PCI and GPIO) work well separately, I'm
able to see wave on oscilloscope.
I found on tms320dm642.pdf that GPIO[5] is not shared with PCI, so I' not
able to figure out where is the problem. If it can helps, I'm using the
ATEME PCI library
Any hint will be appreciated.
Gio
__________________________________________________
Do You Yahoo!?
Poco spazio e tanto spam? Yahoo! Mail ti protegge dallo spam e ti da tanto spazio gratuito per
i tuoi file e i messaggi
http://mail.yahoo.it