Sign in

username:

password:



Not a member?

Search motoroladsp



Search tips

Subscribe to motoroladsp



motoroladsp by Keywords

56303 | 563xx | 5680 | 56805 | 5680x | 56F80 | 56F800DEMO | 56F805 | 56f807 | 56F830 | ADC | Bootloader | Codec | CodeWarrior | CW5 | CW6 | Debugger | DSP56303 | DSP56303EVM | DSP563xx | DSP5680 | DSP56800 | DSP56807 | DSP56858 | DSP56858EVM | DSP56F803 | DSP56F805 | DSP56F807 | DSP56F80x | DSP56F826 | DSP56F827 | DSP56F8xx | EVM | FFT | Flash_over_jtag | GPIO | Interrupt | Interrupts | JTAG | LCD | Linker | MCF5307 | Metrowerks | Modulus | MSCAN | PCMaster | PWM | Quad | Rif | RTOS | SDK | SPI

Discussion Groups

Discussion Groups | Freescale DSPs | Interrupt on a gpio state change

Technical discussions about Freescale (Motorola) DSPs (including the DSP56000, DSP56300, DSP56600, 56800 DSPs).

  

Post a new Thread

Interrupt on a gpio state change - Bruno Tremblay - Oct 12 18:37:00 2004




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
-------------------------------------------





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

RE: Interrupt on a gpio state change - Jongsoo Lim - Oct 12 19:31:00 2004

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>
>
> _____
>
> >.




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