Sign in

username:

password:



Not a member?

Search c6x



Search tips

Subscribe to c6x



c6x by Keywords

AD535 | BIOS | Booting | Bootloader | C621 | C6211 | C6415 | C671 | C6711 | C6711DSK | C6713 | CCS | Chassaing | COFF | DAT | DM64 | DM642 | DMA | DSK671 | DSK6711 | EDM | EDMA | EMIF | Emulator | EVM | EVM620 | FFT | FIR | GPIO | Halting | HPI | HWI | IDK | JTAG | LDB | LDH | LDW | Linker | LMS | LOG_printf | Matlab | McBSP | MEM_alloc | MIPS | PCI | PCM3003 | Pipeline | Profiling | QDM | Reset | ROM | RTDX | Sampling | SDRAM | Stack | TEB | THS1206 | TMS320C621 | TMS320C6416 | TMS320C6711 | TMS320C6713 | UART | Vector Table | XBUS | XDS560


Discussion Groups

Discussion Groups | TMS320C6x | PCI and GPIO conflict on DM642

Technical discussions about the TI C6000 DSPs (including the c62x, c64x and c67x DSPs).

  

Post a new Thread

PCI and GPIO conflict on DM642 - Giovanni Parodi - Sep 13 13:45:16 2006



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


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

RE: PCI and GPIO conflict on DM642 - dspr...@mikeroper.net - Sep 14 8:08:27 2006

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



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

RE: PCI and GPIO conflict on DM642 - Giovanni Parodi - Sep 14 9:14:49 2006

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 


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

RE: PCI and GPIO conflict on DM642 - dspr...@mikeroper.net - Sep 14 16:51:54 2006

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



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

RE: PCI and GPIO conflict on DM642 - Giovanni Parodi - Sep 18 9:18:36 2006

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 


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