alizadeh,
You may want to read: SPHA001 (application note "Setting Up TMS320C6201
Interrupts in C")
The basic set of steps is the same for the 6713 DSP.
The referenced application note directly accesses the registers and/or uses
specific function calls.
I noticed you are using the CSL.
You will need to cross reference the CSL APIs with the functions used in the
application note, so you can continue to use the CSL.
You may also want to read: SPRA529A ("TMS320C6000 DMA Example Applications")
which contains examples of how to handle interrupts using the DMA (you are using
one of the GPIO pins instead).
R. Williams
---------- Original Message -----------
From: a...@yahoo.com
To: c...
Sent: Mon, 28 Dec 2009 07:09:33 -0500
Subject: [c6x] external Interrupt problem 2
>
>
> Hi friends
> I want to setup an external interrupt on the tms320c6713. I configure a GPIO
pin as input and configure this pin for external interrupt. I give it a pulse
from signal generator and can see the pulse value in the GPVAL register, but its
interrupt don't occur.
> Please help me!
> With best regards.
>
> my code is as below:
>
> #include
> #include
> #include
> #include
> #include
> #include
> #include
> #include
> #include
> #include GPIO_Handle hGpio;
>
> GPIO_Config cfgGpio > {
> 0x00000000, // gpgc
> 0x00000080, // gpen
> 0x00000000, // gdir
> 0x00000000, // gpval
> 0x00000080, // gphm
> 0x00000080, // gplm
> 0x00000000 // gppol
> };
>
> extern far void vectors();
>
> void setupInterrupts(void);
> void my_HWI_ISR( int funcArg,int eventId);
>
> IRQ_Config myConfig > {
> my_HWI_ISR,
> 0x00000000,
> IRQ_CCMASK_DEFAULT,
> IRQ_IEMASK_DEFAULT
> };
>
> int count=0;
> void main()
> {
> CSL_init();
> CACHE_setL2Mode(CACHE_64KCACHE);
> CACHE_enableCaching(CACHE_CE00);
> setupInterrupts();
> hGpio = GPIO_open(GPIO_DEV0,GPIO_OPEN_RESET);
> GPIO_config(hGpio,&cfgGpio);
> IRQ_enable(IRQ_EVT_EXTINT7);
> IRQ_globalEnable();
> IRQ_clear(IRQ_EVT_EXTINT7);
> IRQ_config(IRQ_EVT_EXTINT7,&myConfig);
> my_HWI_ISR(5,IRQ_EVT_EXTINT7);
> while(1)
> {
>
> }
> }
>
> void my_HWI_ISR( int funcArg,int eventId)
> {
> count++;
> IRQ_clear(IRQ_EVT_EXTINT7);
> }
>
> void setupInterrupts(void)
> {
> IRQ_setVecs(vectors); // point to the IRQ vector table
> IRQ_nmiEnable();
> IRQ_globalEnable();
> IRQ_map(IRQ_EVT_EXTINT7, 7);
> IRQ_reset(IRQ_EVT_EXTINT7);
> }
------- End of Original Message -------