From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,327a42486109b512 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII Received: by 10.224.173.202 with SMTP id q10mr7022178qaz.3.1354981746666; Sat, 08 Dec 2012 07:49:06 -0800 (PST) Received: by 10.49.98.42 with SMTP id ef10mr2087435qeb.15.1354981746615; Sat, 08 Dec 2012 07:49:06 -0800 (PST) Path: gf5ni48613681qab.0!nntp.google.com!c8no2069889qao.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Sat, 8 Dec 2012 07:49:06 -0800 (PST) In-Reply-To: <594369dc-9021-4809-bd57-3db2dfddde92@googlegroups.com> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=87.188.251.111; posting-account=mOyWBQoAAAD7S-NBmMUOr9hRClcL0vqR NNTP-Posting-Host: 87.188.251.111 References: <71687703-4ed2-4cbb-8996-ff973474f586@googlegroups.com> <5eecb2cc-086c-47c9-84c9-00dd5b90f9a1@googlegroups.com> <594369dc-9021-4809-bd57-3db2dfddde92@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <950a55fd-9025-40af-a918-90887d75a2a9@googlegroups.com> Subject: Re: Interruption Handling using zfp compilation flag From: Rolf Injection-Date: Sat, 08 Dec 2012 15:49:06 +0000 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Date: 2012-12-08T07:49:06-08:00 List-Id: On Friday, December 7, 2012 9:24:38 PM UTC+1, Vin=EDcius Franchini wrote: > On Friday, December 7, 2012 5:45:51 AM UTC-2, Rolf wrote: >=20 > > On Friday, December 7, 2012 1:41:34 AM UTC+1, Vin=EDcius Franchini wrot= e: >=20 > >=20 >=20 > > > Hi guys, my name is Vin=EDcius and I'm doing a master degree. My thes= is is a simplified on-board computer for an satellite. I must implement som= e scheduling and package analysis functions. As I need to work with a real = time system, I'm using the zfp flag for compilation. I tried to implement s= ome interruptions using sentences like this: procedure Receive_USART; -- Ad= dress the interruption handler pragma Machine_Attribute (Entity =3D> Receiv= e_USART, Attribute_Name =3D> "signal"); pragma Export (Convention =3D> C, E= ntity =3D> Receive_USART, External_Name =3D> "__vector_26"); --USART0_RXC U= sing Proteus (ISIS Professional 6.7 SP2), I'm debugging the algorithm. The = initialization of the interruption is right, but when the interruption occu= r, it isn't handling to the procedure. Do I need to do something more to ha= ndle the procedure when the interruption occur ? Do you fellows have any ot= her simple way to handle interruptions ? Thanks very much for your help.... >=20 > >=20 >=20 > >=20 >=20 > >=20 >=20 > >=20 >=20 > >=20 >=20 > >=20 >=20 > >=20 >=20 > > On Friday, December 7, 2012 1:41:34 AM UTC+1, Vin=EDcius Franchini wrot= e: >=20 > >=20 >=20 > > > Hi guys, my name is Vin=EDcius and I'm doing a master degree. My thes= is is a simplified on-board computer for an satellite. I must implement som= e scheduling and package analysis functions. As I need to work with a real = time system, I'm using the zfp flag for compilation. I tried to implement s= ome interruptions using sentences like this: procedure Receive_USART; -- Ad= dress the interruption handler pragma Machine_Attribute (Entity =3D> Receiv= e_USART, Attribute_Name =3D> "signal"); pragma Export (Convention =3D> C, E= ntity =3D> Receive_USART, External_Name =3D> "__vector_26"); --USART0_RXC U= sing Proteus (ISIS Professional 6.7 SP2), I'm debugging the algorithm. The = initialization of the interruption is right, but when the interruption occu= r, it isn't handling to the procedure. Do I need to do something more to ha= ndle the procedure when the interruption occur ? Do you fellows have any ot= her simple way to handle interruptions ? Thanks very much for your help.... >=20 > >=20 >=20 > >=20 >=20 > >=20 >=20 > >=20 >=20 > >=20 >=20 > >=20 >=20 > >=20 >=20 > > The syntax that you show is very specific for AVR microcontrollers. If = that's really the case have a look at >=20 > >=20 >=20 > >=20 >=20 > >=20 >=20 > > http://sourceforge.net/p/avr-ada/wiki/Interrupts/ >=20 > >=20 >=20 > >=20 >=20 > >=20 >=20 > > and at the data sheet of your controller. Consider also asking on the A= VR-Ada-devel mailing list. >=20 > >=20 >=20 > >=20 >=20 > >=20 >=20 > > HTH >=20 > >=20 >=20 > > Rolf >=20 >=20 >=20 > Thanks for your advice and sorry for incomplete information. >=20 >=20 >=20 > I'm using an AVR ATMega 2560. I'm not using the avr-ada lib. The way I'm= doing the interruptions is just like the link you sent. The interruption i= s ok, the used vector is in accordance with the enabled interrupt, as I saw= in my debug. The problem is: the handled procedure is not called when the = interruption ocur. >=20 >=20 >=20 > As I tried to summarize, this is my question... The above mentioned wiki page explicitely mentions that the names of the in= terrupt vectors are off by one compared to the data sheet. The data sheet = of the ATmega2560 shows that the USART0 receive complete interrupt is at ad= dress 26, that results in the name of the vector "__vector_25". You should really consider using AVR-Ada. Then you could simply use=20 AVR.MCU.Sig_USART0_RX_String which would have saved you two days of searchi= ng. You wouldn't even have to write your own serial interface routines as t= hey are already included (AVR.UART) and tested. Rolf