Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
03/16/05 21:17
Read: times


 
#89807 - Good Questions on ISR's
Responding to: ???'s previous message
Michael, thanks for your input. We have thought of most of these issues, but it is really good to be reminded that other developers are asking the same questions as we did. Responses below:

>Are any of your ISRs calling subroutines? Are the subroutines
>called also from other places?
No. Bad idea!

>Do you "accidently" have a stack imbalence problem wherein the
>RETI from the Timer ISR is somehow being missed under some
>oddball combination of interrupt latencies and overlaps?
We shouldnt. Interrupts are separate from the main code and are never called from main. The ISR's call no functions. They just increment variables, or store / send serial data.

>Do you have global variables used in the ISRs that are also
>accessed in the mainline code or in other ISRs that have
>concurrency problems? (Ie one is being accessed while another
>access has left say an INT value half updated).
The timer ISR that stops does have a byte that is accesed in main, but since it is only a byte, we should be ok?

>Do you have any SFR accesses going on that may have concurrency
>issues wherein the same SFRs may be accessed for
>read/writes/modifies by main line code and in ISRs?
The only SFR's the ISR's change are related to interrupt flags, serial tx or rx registers.

>Is a power cycle necessary to recover the supposedly "hung"
>timer interrupt?
Yes, this is the ONLY thing that fixes it.

>Have you handled the WDT reset in a correct manner? Is there
>something wierd going on with that? I have had unexpected WDT >activity bite my butt more times than I like to admit.
The WDT is disabled.

>Any of these types of problems can require an ambitious effort
>to evaluate and make sure that it is not the source of a
>problem. It is easy to say that "the software is right" but
>hard to prove that it "IS Right" !!
Your not wrong - this has been plaging us for a long time now. We have just managed to optimise our ISR's so we can handle the serial ports without having to use priority. This will have to be the fix for us I think. We cannot fathom what we are doing wrong because we now have 2 indepenant projects (coded by different people) that cause this issue. Thanks for your help it's much appreciated.




List of 38 messages in thread
TopicAuthorDate
DS5250 Lockup in ISR's With Priority            01/01/70 00:00      
   Update:            01/01/70 00:00      
      Software Bug            01/01/70 00:00      
      using what            01/01/70 00:00      
         register banks            01/01/70 00:00      
            Shared Data Problem            01/01/70 00:00      
            What stops?            01/01/70 00:00      
               timer isr stops            01/01/70 00:00      
                  Hunting down the ghost            01/01/70 00:00      
   Using different banks            01/01/70 00:00      
      Can't be            01/01/70 00:00      
         stack            01/01/70 00:00      
            more on ISRs            01/01/70 00:00      
         DS5240 has a 1k stack.            01/01/70 00:00      
            but are you using it            01/01/70 00:00      
               Stack            01/01/70 00:00      
   ISRs with Own Register Banks.            01/01/70 00:00      
      Good Questions on ISR's            01/01/70 00:00      
         Shared Data            01/01/70 00:00      
         Not a given            01/01/70 00:00      
            Variable in isr            01/01/70 00:00      
               Sometimes true            01/01/70 00:00      
                  Atomic Operations            01/01/70 00:00      
                     re explosive bytes            01/01/70 00:00      
                        Common Solutions            01/01/70 00:00      
                           Stop's the timer            01/01/70 00:00      
                              Code            01/01/70 00:00      
                        Explosions everywhere            01/01/70 00:00      
                           atomic explosions            01/01/70 00:00      
                              Unreal Time Explosions            01/01/70 00:00      
               Look at the ASM            01/01/70 00:00      
         I have had a very similar problem            01/01/70 00:00      
      ASM instructions & USING            01/01/70 00:00      
         Please do tell us....            01/01/70 00:00      
            Do I really have to?            01/01/70 00:00      
            Brian, Michael            01/01/70 00:00      
               ASM instructions & USING            01/01/70 00:00      
         probably not the case here            01/01/70 00:00      

Back to Subject List