I've been knocking my head against this problem for a while, and
I'm starting to creep uncomfortably close to a deadline. I have a c6713 that I just can't get the GPIO output to work properly. I have been able to read from the GPIO pins, but I can't write to them seemingly no matter what I do. I have to be missing something basic. Here's the setup: GPIO_Handle UI_Handle; Uint16 mask = GPIO_PIN8|GPIO_PIN9|GPIO_PIN10|GPIO_PIN11|GPIO_PIN12|GPIO_PIN13| GPIO_PIN14|GPIO_PIN15; UI_Handle = GPIO_open(GPIO_DEV0,GPIO_OPEN_RESET); GPIO_pinEnable(UI_Handle,mask); GPIO_pinDirection(UI_Handle,mask,GPIO_OUTPUT); GPIO_write(UI_Handle,mask,0xFFFF); GPIO_pinWrite(UI_Handle,GPIO_PIN8,1); Neither GPIO_write nor GPIO_pinWrite affect the voltage levels on the GPIO pins on the J1 connector. I've tried enabling the GIO manager in the BIOS, and that had no effect. I seriously think that I'm just missing something basic in the setup. Thanks for the help, because this one is really starting to get on my nerves; it should be simple to do and I can't get it to work. Michael Petty |
|
GPIO usage
Started by ●March 25, 2004
Reply by ●March 25, 20042004-03-25
We use something like #define GPIO_OUTPUTS (SYSRES | SPISDO | SPISCK | CSCODECn | CSSRGn | SELFRESETn) #define GPIO_INPUTS (DMA_REQ | SPISDI) #define GPIO_PINS (GPIO_OUTPUTS | GPIO_INPUTS | GPIO_INTERRUPTS) gpioHandle=GPIO_open(GPIO_DEV0, 0); //Uint32 flags); gpioHandle->pinAllocMask = GPIO_PINS; // is there a cleaner way of doing this // enable GPIO pins as outputs GPIO_configArgs( gpioHandle, GPIO_GPGC_OF(0), GPIO_GPEN_OF(GPIO_PINS | GPIO_INTERRUPTS), GPIO_GPDIR_OF(GPIO_OUTPUTS), GPIO_GPVAL_OF(LED_PINS | CSCODECn | CSSRGn | SELFRESETn), // set high, leave SYSRES low GPIO_GPHM_OF(0), GPIO_GPLM_OF(0), GPIO_GPPOL_OF(0)); } and it works ok. - Andrew E. At 11:04 PM 3/24/2004 -0700, Mike Petty wrote: >I've been knocking my head against this problem for a while, and I'm >starting to creep uncomfortably close to a deadline. I have a c6713 >that I just can't get the GPIO output to work properly. I have been >able to read from the GPIO pins, but I can't write to them seemingly no >matter what I do. I have to be missing something basic. > >Here's the setup: > >GPIO_Handle UI_Handle; >Uint16 mask = >GPIO_PIN8|GPIO_PIN9|GPIO_PIN10|GPIO_PIN11|GPIO_PIN12|GPIO_PIN13| > GPIO_PIN14|GPIO_PIN15; > >UI_Handle = GPIO_open(GPIO_DEV0,GPIO_OPEN_RESET); >GPIO_pinEnable(UI_Handle,mask); >GPIO_pinDirection(UI_Handle,mask,GPIO_OUTPUT); > >GPIO_write(UI_Handle,mask,0xFFFF); >GPIO_pinWrite(UI_Handle,GPIO_PIN8,1); >Neither GPIO_write nor GPIO_pinWrite affect the voltage levels on the >GPIO pins on the J1 connector. I've tried enabling the GIO manager in >the BIOS, and that had no effect. I seriously think that I'm just >missing something basic in the setup. Thanks for the help, because this >one is really starting to get on my nerves; it should be simple to do >and I can't get it to work. > >Michael Petty > >_____________________________________ >Note: If you do a simple "reply" with your email client, only the author of this message will receive your answer. You need to do a "reply all" if you want your answer to be distributed to the entire group. > >_____________________________________ >About this discussion group: > >To Join: Send an email to > >To Post: Send an email to > >To Leave: Send an email to > >Archives: http://www.yahoogroups.com/group/c6x > >Other Groups: http://www.dsprelated.com > >Yahoo! Groups Links > > |