* [ECOS] problem with the RealTimeClock ISR routine "return" instruction @ 2003-09-19 7:22 Satish Kumar 2003-09-19 8:28 ` Robert Cragie 0 siblings, 1 reply; 3+ messages in thread From: Satish Kumar @ 2003-09-19 7:22 UTC (permalink / raw) To: ecos-discuss Hi, i m testing the clocktruth.cxx on my target board which has arm926ej-s core.i m using gcc 3.2.1 for compiling my code. i have noticed a strange behaviour in the ISR routine. when the program calls Cyg_RealTimeClock() routine to initialize the external timer..and when the timer generates an periodic interrupt the Cyg_RealTimeClock::isr() routine is called with the correct vector number and when this instruction i.e ( return Cyg_Interrupt::CALL_DSR|Cyg_Interrupt::HANDLED ) is excuted in the ISR routine, it is actually branching to spurious_IRQ handler routine.. due to this my clocktruth program hangs in the while loop unable to read the rtc->counter_value_lo and returns 0 everytime..failin to print the time value. my concern is why "the spurious IRQ" when the ISR routine was called with the correct timer interrupt no:...? is it somethin to do with the HAL porting issues..? some one help plz.. saty isr routine -- Satish Kumar <satish@bvt.sc.sanyo.co.jp> -- Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos and search the list archive: http://sources.redhat.com/ml/ecos-discuss ^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: [ECOS] problem with the RealTimeClock ISR routine "return" instruction 2003-09-19 7:22 [ECOS] problem with the RealTimeClock ISR routine "return" instruction Satish Kumar @ 2003-09-19 8:28 ` Robert Cragie 2003-09-19 8:41 ` Satish Kumar 0 siblings, 1 reply; 3+ messages in thread From: Robert Cragie @ 2003-09-19 8:28 UTC (permalink / raw) To: Satish Kumar, ECOS It may be due to the timer interrupt not being negated or masked properly (see hal_clock_reset()) and is possibly causing a re-entrant interrupt. This action is very specific to the timers on your target platform so I would check this carefully. Alternatively, if you are getting a spurious interrupt, I would check *all* your possible interrupt sources on your target hardware and make sure that they are: a) Catered for in your HAL port b) If not used, correctly masked out in the initialisation c) If used, correctly handled I may be wrong, but I feel that your problem is very unlikely to be a generic eCos one. Also, you are asking quite specific questions but you have given very little detail of your actual target hardware with regard to what sort of timers you are using and the interrupts they use. If you are having real trouble with this, it might be an idea to use the services of an organisation like eCosCentric or MIND, who are experts in HAL porting. Robert Cragie, Design Engineer _______________________________________________________________ Jennic Ltd, Furnival Street, Sheffield, S1 4QT, UK http://www.jennic.com Tel: +44 (0) 114 281 2655 _______________________________________________________________ > -----Original Message----- > From: ecos-discuss-owner@sources.redhat.com > [mailto:ecos-discuss-owner@sources.redhat.com]On Behalf Of Satish Kumar > Sent: 19 September 2003 08:23 > To: ecos-discuss@sources.redhat.com > Subject: [ECOS] problem with the RealTimeClock ISR routine "return" > instruction > > > Hi, > i m testing the clocktruth.cxx on my target board which has > arm926ej-s core.i m using gcc 3.2.1 for compiling my code. > i have noticed a strange behaviour in the ISR routine. > when the program calls Cyg_RealTimeClock() routine to initialize > the external timer..and when the timer generates an periodic interrupt > the Cyg_RealTimeClock::isr() routine is called with the correct vector > number and when this instruction i.e > ( return Cyg_Interrupt::CALL_DSR|Cyg_Interrupt::HANDLED ) > is excuted in the ISR routine, it is actually branching to spurious_IRQ > handler routine.. > due to this my clocktruth program hangs in the while loop unable to > read the rtc->counter_value_lo and returns 0 everytime..failin to print > the time value. > > my concern is why "the spurious IRQ" when the ISR routine was > called with the correct timer interrupt no:...? is it somethin to do > with the HAL porting issues..? > > > some one help plz.. > saty > > > > > isr routine > -- > Satish Kumar <satish@bvt.sc.sanyo.co.jp> > > > -- > Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos > and search the list archive: http://sources.redhat.com/ml/ecos-discuss > > -- Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos and search the list archive: http://sources.redhat.com/ml/ecos-discuss ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [ECOS] problem with the RealTimeClock ISR routine "return" instruction 2003-09-19 8:28 ` Robert Cragie @ 2003-09-19 8:41 ` Satish Kumar 0 siblings, 0 replies; 3+ messages in thread From: Satish Kumar @ 2003-09-19 8:41 UTC (permalink / raw) To: Robert Cragie; +Cc: ECOS Ok, Plz ignore my previous question on spurious IRQ being generated. i m sorry for that..well, my timer interrupts are been serviced properly , but its the problem with this "Return from exception"..from were i jump into the clocktruth.cxx file to display the time, were in it hangs up on this while loop. the rtc->current_value_lo() always returns 0. // First, print 100 lines as fast as you can, of distinct ticks. for ( i = 0; i < 100; i++ ) { now = rtc->current_value_lo(); then = now; while ( then == now ) now = rtc->current_value_lo(); diag_printf( "INFO<time now %8d>\n", now ); } i followed up the patch posted as per http://sources.redhat.com/ml/ecos-patches/2003-04/msg00114.html but still couldn`t over come this problem..i m not able to figure out whatz the error like..? satish On Fri, 19 Sep 2003 09:28:04 +0100 "Robert Cragie" <rcc@jennic.com> wrote: > It may be due to the timer interrupt not being negated or masked properly > (see hal_clock_reset()) and is possibly causing a re-entrant interrupt. This > action is very specific to the timers on your target platform so I would > check this carefully. > > Alternatively, if you are getting a spurious interrupt, I would check *all* > your possible interrupt sources on your target hardware and make sure that > they are: > > a) Catered for in your HAL port > b) If not used, correctly masked out in the initialisation > c) If used, correctly handled > > I may be wrong, but I feel that your problem is very unlikely to be a > generic eCos one. Also, you are asking quite specific questions but you have > given very little detail of your actual target hardware with regard to what > sort of timers you are using and the interrupts they use. If you are having > real trouble with this, it might be an idea to use the services of an > organisation like eCosCentric or MIND, who are experts in HAL porting. > > Robert Cragie, Design Engineer > _______________________________________________________________ > Jennic Ltd, Furnival Street, Sheffield, S1 4QT, UK > http://www.jennic.com Tel: +44 (0) 114 281 2655 > _______________________________________________________________ > > > -----Original Message----- > > From: ecos-discuss-owner@sources.redhat.com > > [mailto:ecos-discuss-owner@sources.redhat.com]On Behalf Of Satish Kumar > > Sent: 19 September 2003 08:23 > > To: ecos-discuss@sources.redhat.com > > Subject: [ECOS] problem with the RealTimeClock ISR routine "return" > > instruction > > > > > > Hi, > > i m testing the clocktruth.cxx on my target board which has > > arm926ej-s core.i m using gcc 3.2.1 for compiling my code. > > i have noticed a strange behaviour in the ISR routine. > > when the program calls Cyg_RealTimeClock() routine to initialize > > the external timer..and when the timer generates an periodic interrupt > > the Cyg_RealTimeClock::isr() routine is called with the correct vector > > number and when this instruction i.e > > ( return Cyg_Interrupt::CALL_DSR|Cyg_Interrupt::HANDLED ) > > is excuted in the ISR routine, it is actually branching to spurious_IRQ > > handler routine.. > > due to this my clocktruth program hangs in the while loop unable to > > read the rtc->counter_value_lo and returns 0 everytime..failin to print > > the time value. > > > > my concern is why "the spurious IRQ" when the ISR routine was > > called with the correct timer interrupt no:...? is it somethin to do > > with the HAL porting issues..? > > > > > > some one help plz.. > > saty > > > > > > > > > > isr routine > > -- > > Satish Kumar <satish@bvt.sc.sanyo.co.jp> > > > > > > -- > > Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos > > and search the list archive: http://sources.redhat.com/ml/ecos-discuss > > > > -- Satish Kumar <satish@bvt.sc.sanyo.co.jp> -- Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos and search the list archive: http://sources.redhat.com/ml/ecos-discuss ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2003-09-19 8:41 UTC | newest] Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2003-09-19 7:22 [ECOS] problem with the RealTimeClock ISR routine "return" instruction Satish Kumar 2003-09-19 8:28 ` Robert Cragie 2003-09-19 8:41 ` Satish Kumar
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).