Reply by Torgeir Jakobsen●October 10, 20012001-10-10
Hi
I have included three example files which I have taken from one of my C5402
projects. First of all you have to make an assembly file where the interrupt
vectors are placed (vectors.asm). This file has references to the interrupt
functions ( interrupt.c). Finally the .vectors section has to be placed from
the beginning of a 128 byte page ( linker.cmd).
Best regards
Torgeir Jakobsen
Senior Engineer, Technology Department
Aanderaa Instruments AS
e-mail:
web: www.aanderaa.com
phone; +47 55 10 99 00
direct: +47 55 10 99 77
fax: +47 55 10 99 10
----- Original Message -----
From: "N VINODH RATHNA" <>
To: <>
Sent: Tuesday, October 09, 2001 2:14 PM
Subject: [c54x] interrupt routine in c
> Subject: interrupt routine in c
>
> ** Proprietary **
>
> hi
>
> can anyone tell me how to write an interrupt service routine in c
> like i tried cc help but it is not very clear
> suppose if i want to handle int0 then
>
> interrupt void int0()
> {
> }
>
> now how will the code run to the corresponding interrupt location
>
> thank u
>
>
> _____________________________________
> 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/c54x
>
> Other Groups: http://www.dsprelated.com
> ">http://docs.yahoo.com/info/terms/
Attachment (not stored)
vector.asm Type: application/octet-stream
Attachment (not stored)
linker.cmd Type: application/octet-stream
Attachment (not stored)
interrupt.c Type: application/octet-stream
Reply by Steffen Luzemann●October 10, 20012001-10-10
Hi N VINODH,
> can anyone tell me how to write an interrupt
service routine in c
> like i tried cc help but it is not very clear
> suppose if i want to handle int0 then
>
> interrupt void int0()
> {
> }
>
> now how will the code run to the corresponding interrupt location
Very simple. You need to include and edit the file vecs.asm in your project
(i.e. comes with C5402 DSK and should be available anywhere in Code Composer
directory).
Customize the file like this:
.title "Vector Table" ; file name
.ref _int0 ; reference to int0 interrupt