Reboot on crash? - General Discussion and Assistance - CHDK Forum supplierdeeply

Reboot on crash?

  • 3 Replies
  • 1438 Views
Reboot on crash?
« on: 21 / January / 2013, 02:26:35 »
Advertisements
Howdy!

I've been searching around and haven't found a definitive answer, so I apologize if I missed this somewhere already.

I have an application where I am remotely triggering the camera via chdkptp.  It works great, but once in a blue moon the camera will crash for whatever reason (last time with a exception for an undefined instruction).  It would be great if I could just have the camera reboot instead of powering off, or have a way to remotely power on the camera again without having to physically modify it.

I would guess it would be possible to modify the exception vector to do this, but I'm unsure if this is something within the realm of CHDK?  Would it work for an assert crash too?

*

Offline reyalp

  • ******
  • 12689
Re: Reboot on crash?
« Reply #1 on: 21 / January / 2013, 12:35:16 »
I would guess it would be possible to modify the exception vector to do this, but I'm unsure if this is something within the realm of CHDK?  Would it work for an assert crash too?
The ixus80_sd1100 port has an example of hooking the exception and assert handlers (see platform/ixus80_sd1100/debug.c). Whether you can successfully reboot in this situation is unknown to me, and probably depends on the nature of the crash.

If you can post more details about the crash you are getting over chdkptp, we may be able to help with that.
Don't forget what the H stands for.

*

Offline philmoz

  • *****
  • 3163
    • Photos
Re: Reboot on crash?
« Reply #2 on: 21 / January / 2013, 13:58:18 »
Some of the 2012 cameras have the DebugAssert function in RAM (SX240, SX260, SX50, G15, etc).

It might be possible to hook this function and do a reboot rather than a shutdown.

Phil.
CHDK ports:
  sx30is (1.00c, 1.00h, 1.00l, 1.00n & 1.00p)
  g12 (1.00c, 1.00e, 1.00f & 1.00g)
  sx130is (1.01d & 1.01f)
  ixus310hs (1.00a & 1.01a)
  sx40hs (1.00d, 1.00g & 1.00i)
  g1x (1.00e, 1.00f & 1.00g)
  g5x (1.00c, 1.01a, 1.01b)

Re: Reboot on crash?
« Reply #3 on: 21 / January / 2013, 14:29:11 »
Some of the 2012 cameras have the DebugAssert function in RAM (SX240, SX260, SX50, G15, etc).

It might be possible to hook this function and do a reboot rather than a shutdown.

Phil.

I am using a S5 IS.  Initially, I was having assert errors, but that turned out to be because I was not waiting a bit between shoot, download, and delete.  The error that I saw the other day was an unknown instruction exception.  I don't have the romlog on this machine, but I will dig it up later and post it.


 

Related Topics