Sign in

username:

password:



Not a member?

Search c54x



Search tips

Subscribe to c54x



c54x by Keywords

5409 | 5416 | AD5 | ADC | BIOS | Boot | Booting | Bootloader | C540 | C5402 | C5409 | C5416 | CCS | Codec | DMA | Dmad | DSK | DSKPlus | Dsplib | EVM | FFT | FIR | Flash | GPIO | HPI | Initialization | Interrupt | JTAG | LOG_printf | MCBSP | RFFT | RTDX | Sampling | STLM | UART | VC540

Sponsor

Industry's highest performing at the lowest power DSPs now as low as $5.00*
Start development today!
*volume pricing for 10ku

Discussion Groups

See Also

Embedded SystemsFPGAElectronics

Discussion Groups | TMS320C54x | Setting interrupt vector on TI CCS/5402 DSK

Technical discussions about the TI C54x DSPs (including the c5401, c5402, c5402a, c5404, c5407, c5409, c5409a, c5410, c5410a, c5416, c5420, c5421, c5441, c549, c5470 and c5471).

  

Post a new Thread

Setting interrupt vector on TI CCS/5402 DSK - Ben Bradley - Oct 2 17:46:00 2000

Posted to comp.dsp and

I've read through everything I can find on Code Composer Studio, and
can't get
an interrupt function to be called. It's a C function and has the proper
#pragma
INTERRUPT (func); before the definition.
The documentation seems to not show how to write and compile/assemble
source
code that sets the vectors. The DSP/BIOS has calls to handle interrupts,
but I
really don't want to to use the DSP/BIOS. It appears that TI strongly
encourages
one to write any system to use it, but I'd rather not if I can help it.
I'm familiar with how the 54x's IPTR field of the PMST register points
to the
start of the interrupt vectors, the problem is how to set these vectors.
I've had no trouble using interrupts on many other processors, including
the
Motorola 56824 and the Zilog Z89321 DSP's.
-----
http://listen.to/benbradley



______________________________
New Code Sharing Section now Live on DSPRelated.com. Learn about the Reward Program for Contributors here.



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

Re: Setting interrupt vector on TI CCS/5402 DSK - Brian C. Lane - Oct 2 19:54:00 2000

On Mon, 02 Oct 2000 13:46:14 -0400, you wrote:

>Posted to comp.dsp and
>
> I've read through everything I can find on Code Composer Studio, and
>can't get
>an interrupt function to be called. It's a C function and has the proper
>#pragma
>INTERRUPT (func); before the definition.
> The documentation seems to not show how to write and compile/assemble
>source
>code that sets the vectors. The DSP/BIOS has calls to handle interrupts,

You need to write the interrupt vector code in assembly, pointing it
to your 'C' functions. The assembly guide has some examples, or you
can use this code which I modified from the DSK plus examples. I find
it safer to call a program specific assembly _processor_init routine
which then calls the 'C' initialization routine _c_int00, this way
your hardware isn't flopping about while it is initializing ram, etc.

This should work for you, but please note that it has been chopped
out of some working code without testing, and that I don't use 'C' for
any interrupts.

In your linker file:

MEMORY
{
PAGE 0 :
VECTORS : origin = 0FF80h, length = 00080h
}

SECTIONS
{
.vectors : load = VECTORS PAGE 0
} And a separate vectors.asm file

.width 80
.length 55
.title "Vector Table"

.sect ".vectors"

.ref _c_int00
.ref _timer_irq
.ref keypad_0
.ref keypad_1
.ref keypad_2
.ref keypad_3
.ref _processor_init

.mmregs

;reset goto _c_int00 ;00; RESET
reset goto _processor_init ;00; RESET
nop
nop
nmi return_enable ;04; non-maskable external interrupt
nop
nop
nop
trap2 return_enable ;08; trap2
nop
nop
nop
.space 52*16 ;0C-3F: vectors for software interrupts
18-30
int0 goto keypad_0 ;40; int0 intrrupt, keypad input line
nop
nop
int1 goto keypad_1 ;44; int1 intrrupt, keypad input line
nop
nop
int2 goto keypad_2 ;48; int2 intrrupt, keypad input line
nop
nop
tint return_enable ;4B; Timer #0 interrupt
nop
nop
nop
brint return_enable ;50; BSP receive interrupt
nop
nop
nop
bxint return_enable ;54; BSP transmit interrupt
nop
nop
nop
dmac0 return_enable ;58; DMA #0 interrupt
nop
nop
nop
tint1 return_enable ;5C; Timer #1 or DMA #1 interrupt
nop
nop
nop

int3 goto keypad_3 ;60; int3 interrupt, keypad input line
nop
nop
hpiint return_enable ;64; HPIint
nop
nop
nop

trint goto _timer_irq ;68; Run the codec and serial port
nop
nop

txint return_enable ;6C; TDM transmit interrupt
nop
nop
nop

dmac4 return_enable ;70; DMA #4 interrupt
nop
nop
nop
dmac5 return_enable ;74; DMA #5 interrupt
nop
nop
nop

.space 8*16 ;78-7F; reserved area -----------------------------------------------------
Brian C. Lane Programmer
www.shinemicro.com RF & Microcontroller Design


______________________________
Start your Android Ice Cream Sandwich development on TI's AM35x Sitara ARM Cortex-A8 processor today.



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