Hot!What can i do for resolve AddressERROR and StackERROR other than restart controller?

Author
Hardevsinh Palaniya
New Member
  • Total Posts : 3
  • Reward points : 0
  • Joined: 2018/03/07 06:22:49
  • Location: 0
  • Status: offline
2018/03/07 22:48:52 (permalink)
0

What can i do for resolve AddressERROR and StackERROR other than restart controller?

hi everyone,
 
I am using PIC24FJ256GB110 and it works great according to my needs for sometime but my device is restarting many times because of AddressERROR and StackERROR interrupt. is there any one who can help me for resolving it or finding reason for it?
 
Thanks.
#1

3 Replies Related Threads

    Aussie Susan
    Super Member
    • Total Posts : 3300
    • Reward points : 0
    • Joined: 2008/08/18 22:20:40
    • Location: Melbourne, Australia
    • Status: offline
    Re: What can i do for resolve AddressERROR and StackERROR other than restart controller? 2018/03/08 18:33:57 (permalink)
    5 (1)
    Many reasons so try setting a breakpoint in the trap's ISR and single step back out of that. I should take you to where the trap originated.
    Stack error is normally problems with how parameters are passed where a function ends up writing into the stack area rather than to somewhere else via a 'reference'. (e.g. the caller passes a reference to an array which takes one location on the stack for the pointer, but the function code treats the variable as a 'value' on the stack and therefore writes to the stack space.)
    Address errors can easily be pointers allowing values to be written anywhere - including non-existant memory.
    Of course these can both be mixed up together.
    Susan
    #2
    maxruben
    Super Member
    • Total Posts : 3285
    • Reward points : 0
    • Joined: 2011/02/22 03:35:11
    • Location: Sweden
    • Status: offline
    Re: What can i do for resolve AddressERROR and StackERROR other than restart controller? 2018/03/09 16:42:11 (permalink)
    4.5 (2)
    Write handlers for the exception traps and check what the offending address is. Debug accordingly.
     
    /Ruben
    #3
    Hardevsinh Palaniya
    New Member
    • Total Posts : 3
    • Reward points : 0
    • Joined: 2018/03/07 06:22:49
    • Location: 0
    • Status: offline
    Re: What can i do for resolve AddressERROR and StackERROR other than restart controller? 2018/03/14 01:47:46 (permalink)
    0
    Thanks susan and Ruben for your valuable reply but i can't find address error offering point because of an error call stack not supported. can you please tell me that is there any other way to find it? 
    #4
    Jump to:
    © 2018 APG vNext Commercial Version 4.5