Technical discussions about Freescale (Motorola) DSPs (including the DSP56000, DSP56300, DSP56600, 56800 DSPs).
|
Hi, I want to use two GPIO pin as interrupt in my application. Since I didn't found any information on how to do it with the SDK, I must write and find a way to call an ISR on a pin change. For now, I know how to set the GPIO registers and write my ISR. But I don't how to call the ISR. If there's a way with the SDK can some one guide my on where can I find this information? And what other way can I use? Thanks ------------------------------------------- Bruno Tremblay, Ing/Eng Gentec Inc. Automatisme et Contrôle/Automation and Control 2625 Dalton, Sainte-Foy Québec, Canada G1P 3S9 email: web : www.gentec.ca ------------------------------------------- |
|
|
|
Bruno; Assuming your ISR is as follows static void gpio_ISR(){,,,} Now install ISR using, int GpioFD; GpioFD = open(BSP_DEVICE_NAME_GPIO_D, NULL); archInstallISR(&(pArchInterrupts->MpioD), gpio_ISR); ioctl(GpioFD, GPIO_SETAS_GPIO, gpioPin(D,0)|gpioPin(D,1)|gpioPin(D,2)); ioctl(GpioFD, GPIO_SETAS_INPUT, gpioPin(D,0)|gpioPin(D,1)|gpioPin(D,2)); ioctl(GpioFD, GPIO_INTERRUPT_DETECTION_ACTIVE_HIGH, gpioPin(D,0)|gpioPin(D,1)|gpioPin(D,2)); ioctl(GpioFD, GPIO_INTERRUPT_ENABLE, gpioPin(D,0)|gpioPin(D,1)|gpioPin(D,2)); archEnableInt(); That's all. If one of three pins goes up, then interrupt will be triggered. JS Jongsoo Lim Design Eng Quantum Controls Inc. 1691 Lake Drive West, Chanhassen MN 55317 > -----Original Message----- > From: Bruno Tremblay [SMTP:] > Sent: Tuesday, October 12, 2004 1:37 PM > To: > Subject: [motoroladsp] Interrupt on a gpio state change > Hi, > > I want to use two GPIO pin as interrupt in my application. Since I didn't > found any information on how to do it with the SDK, I must write and find a > way to call an ISR on a pin change. For now, I know how to set the GPIO > registers and write my ISR. But I don't how to call the ISR. If there's a > way with the SDK can some one guide my on where can I find this information? > And what other way can I use? > > Thanks > > ------------------------------------------- > Bruno Tremblay, Ing/Eng > Gentec Inc. > Automatisme et Contrôle/Automation and Control > 2625 Dalton, Sainte-Foy > Québec, Canada G1P 3S9 > email: > web : www.gentec.ca > ------------------------------------------- > > > _____________________________________ > /groups.php3 > > > Yahoo! Groups Sponsor > ADVERTISEMENT > click here <http://us.ard.yahoo.com/SIG=129btaic5/M=294855.5468653.6549235.3001176/D=groups\ /S=1705771855:HM/EXP=1097692986/A=2376776/R=0/SIG=11ldm1jvc/*http://promotions.y\ ahoo.com/ydomains2004/index.html> > <http://us.adserver.yahoo.com/l?M=294855.5468653.6549235.3001176/D=groups/S=:HM/\ A=2376776/rand=534167898> > > _____ > > >. |