comp.lang.ada
 help / color / mirror / Atom feed
From: Rolf <rrr.eee.27@gmail.com>
Subject: Re: Interruption Handling using zfp compilation flag
Date: Sat, 8 Dec 2012 07:49:06 -0800 (PST)
Date: 2012-12-08T07:49:06-08:00	[thread overview]
Message-ID: <950a55fd-9025-40af-a918-90887d75a2a9@googlegroups.com> (raw)
In-Reply-To: <594369dc-9021-4809-bd57-3db2dfddde92@googlegroups.com>

On Friday, December 7, 2012 9:24:38 PM UTC+1, Vinícius Franchini wrote:
> On Friday, December 7, 2012 5:45:51 AM UTC-2, Rolf wrote:
> 
> > On Friday, December 7, 2012 1:41:34 AM UTC+1, Vinícius Franchini wrote:
> 
> > 
> 
> > > Hi guys, my name is Vinícius and I'm doing a master degree. My thesis is a simplified on-board computer for an satellite. I must implement some 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 some interruptions using sentences like this: procedure Receive_USART; -- Address the interruption handler pragma Machine_Attribute (Entity => Receive_USART, Attribute_Name => "signal"); pragma Export (Convention => C, Entity => Receive_USART, External_Name => "__vector_26"); --USART0_RXC Using Proteus (ISIS Professional 6.7 SP2), I'm debugging the algorithm. The initialization of the interruption is right, but when the interruption occur, it isn't handling to the procedure. Do I need to do something more to handle the procedure when the interruption occur ? Do you fellows have any other simple way to handle interruptions ? Thanks very much for your help....
> 
> > 
> 
> > 
> 
> > 
> 
> > 
> 
> > 
> 
> > 
> 
> > 
> 
> > On Friday, December 7, 2012 1:41:34 AM UTC+1, Vinícius Franchini wrote:
> 
> > 
> 
> > > Hi guys, my name is Vinícius and I'm doing a master degree. My thesis is a simplified on-board computer for an satellite. I must implement some 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 some interruptions using sentences like this: procedure Receive_USART; -- Address the interruption handler pragma Machine_Attribute (Entity => Receive_USART, Attribute_Name => "signal"); pragma Export (Convention => C, Entity => Receive_USART, External_Name => "__vector_26"); --USART0_RXC Using Proteus (ISIS Professional 6.7 SP2), I'm debugging the algorithm. The initialization of the interruption is right, but when the interruption occur, it isn't handling to the procedure. Do I need to do something more to handle the procedure when the interruption occur ? Do you fellows have any other simple way to handle interruptions ? Thanks very much for your help....
> 
> > 
> 
> > 
> 
> > 
> 
> > 
> 
> > 
> 
> > 
> 
> > 
> 
> > The syntax that you show is very specific for AVR microcontrollers. If that's really the case have a look at
> 
> > 
> 
> > 
> 
> > 
> 
> > http://sourceforge.net/p/avr-ada/wiki/Interrupts/
> 
> > 
> 
> > 
> 
> > 
> 
> > and at the data sheet of your controller. Consider also asking on the AVR-Ada-devel mailing list.
> 
> > 
> 
> > 
> 
> > 
> 
> > HTH
> 
> > 
> 
> >     Rolf
> 
> 
> 
>  Thanks for your advice and sorry for incomplete information.
> 
> 
> 
>  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 is 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.
> 
> 
> 
> As I tried to summarize, this is my question...


The above mentioned wiki page explicitely mentions that the names of the interrupt 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 address 26, that results in the name of the vector "__vector_25".

You should really consider using AVR-Ada.  Then you could simply use 
AVR.MCU.Sig_USART0_RX_String which would have saved you two days of searching. You wouldn't even have to write your own serial interface routines as they are already included (AVR.UART) and tested.

   Rolf






  reply	other threads:[~2012-12-08 15:49 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-07  0:41 Interruption Handling using zfp compilation flag Vinícius Franchini
2012-12-07  7:45 ` Rolf
2012-12-07 20:24   ` Vinícius Franchini
2012-12-08 15:49     ` Rolf [this message]
2012-12-09  1:08       ` Vinícius Franchini
2012-12-09 15:57         ` R R
2012-12-09 20:34         ` Brian Drummond
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox