vxworks hangs but ISR keeps firing - VxWorks

This is a discussion on vxworks hangs but ISR keeps firing - VxWorks ; Hi, I am seeing a strange problem on a MVM162-412/MC68040LC running VxWorks. VxWorks hangs and the console is not responding. No response to ping or to telnet. Using an oscilloscope I could see that the ISRs are being executed at ...

+ Reply to Thread
Results 1 to 6 of 6

Thread: vxworks hangs but ISR keeps firing

  1. vxworks hangs but ISR keeps firing

    Hi,
    I am seeing a strange problem on a MVM162-412/MC68040LC running
    VxWorks.
    VxWorks hangs and the console is not responding. No response to ping or
    to telnet. Using an oscilloscope I could see that the ISRs are being
    executed at the intended rate. The Run LED is solid green (when VxWorks
    is responding it is blinking).

    Could a stack overflow cause this?
    Not having access to WindView, what is the best approach to debug such
    behavior?

    Thanks,

    Ben


  2. Re: vxworks hangs but ISR keeps firing

    It appears the system is overwhelmed by the frequency of the
    interrupts, and the task tNetTask is not getting any chance to execute.
    You talk about "ISRs", does that mean multiple interrupt sources? If
    yes, try enabling one at a time and see. Also, make sure your hardware
    is debounced and clean: devoid of any bouncing, spurious interrupts.


  3. Re: vxworks hangs but ISR keeps firing

    Thanks for the reply.

    I don't think the system is overwhelmed by the frequency of the
    interrupts because:
    * The interrupts are happening at 20ms interval and there is no nested
    interrupts.
    * Based on results from the spy command, the system is spending 80% of
    its time in idle state.

    I was able to access the shared memory of the board running VxWorks and
    I was able to retrieve this error message at location 0x800.

    Exception at interrupt level: Illegal Instruction.
    Program Counter: 0x00000008.
    Status Register: 0x2304.
    Regs at 0xbe2d0.

    Although VxWorks is hanging, the interrupts are happening at regular
    interval and being handled properly.

    Is the error above a sign of stack overflow?

    Thanks,


    Vcc Ground wrote:
    > It appears the system is overwhelmed by the frequency of the
    > interrupts, and the task tNetTask is not getting any chance to execute.
    > You talk about "ISRs", does that mean multiple interrupt sources? If
    > yes, try enabling one at a time and see. Also, make sure your hardware
    > is debounced and clean: devoid of any bouncing, spurious interrupts.



  4. Re: vxworks hangs but ISR keeps firing

    An exception at interrupt level may very well be fatal to the
    application, which would explain why the program is kaputs afterward.
    The PC showing 8 looks invalid (check the memory map, but there
    shouldn't be any executable instructions there, I would think)..
    So.... how did the PC jump to 8 is the million $ question - something
    in the ISR itself is what VxWorks is telling us. I take it this is a
    custom ISR with code written at your site (i.e. not VxWorks provided
    code). If such is the case, look for code which vectors off to an
    address based on some data it is accessing (caveat emptor this is
    speculation on my part, based on things I have seen go wrong in the
    past). Then speculate as to how that data may not contain the
    expected offset. Try putting a range check around any such code, and
    if that range check fails, write an error code of your choosing to an
    unused memory location (pick something safe in the heap for example,
    and write hex BAD1, BAD2, BAD3, etc for each range guard you put in the
    ISR so you'll know which one triggered). I hope this may help your
    situation. If it doesn't there's a few other things we can try. Let
    us know?


  5. Re: vxworks hangs but ISR keeps firing

    Even if he did something really bad in the ISR, I thought an exception at
    interrupt level automatically causes a reboot (at least on PPC)?

    How is it possible that the exception could occur, but the device not reset?
    The reason I ask is that I have seen this before...

    Adam

    "JohnnyU" wrote in message
    news:1129737923.365330.221750@z14g2000cwz.googlegr oups.com...
    > An exception at interrupt level may very well be fatal to the
    > application, which would explain why the program is kaputs afterward.
    > The PC showing 8 looks invalid (check the memory map, but there
    > shouldn't be any executable instructions there, I would think)..
    > So.... how did the PC jump to 8 is the million $ question - something
    > in the ISR itself is what VxWorks is telling us. I take it this is a
    > custom ISR with code written at your site (i.e. not VxWorks provided
    > code). If such is the case, look for code which vectors off to an
    > address based on some data it is accessing (caveat emptor this is
    > speculation on my part, based on things I have seen go wrong in the
    > past). Then speculate as to how that data may not contain the
    > expected offset. Try putting a range check around any such code, and
    > if that range check fails, write an error code of your choosing to an
    > unused memory location (pick something safe in the heap for example,
    > and write hex BAD1, BAD2, BAD3, etc for each range guard you put in the
    > ISR so you'll know which one triggered). I hope this may help your
    > situation. If it doesn't there's a few other things we can try. Let
    > us know?
    >




  6. Re: vxworks hangs but ISR keeps firing

    It may be that an exception during normal execution at interrupt level
    does indeed vector off to the reboot/reset address. I'm guessing
    that since the code was executing at an illegal address, this changed
    the behavior somewhat. I agree its somewhat speculation.. isn't
    debug wonderful?


+ Reply to Thread