rebooting/loading CHDK binaries from lua or canon basic - page 4 - General Discussion and Assistance - CHDK Forum

rebooting/loading CHDK binaries from lua or canon basic

  • 60 Replies
  • 30751 Views
*

Offline msl

  • *****
  • 1280
  • A720 IS, SX220 HS 1.01a
    • CHDK-DE links
Re: rebooting/loading CHDK binaries from lua or canon basic
« Reply #30 on: 20 / September / 2010, 06:15:09 »
Advertisements
Nice

Both methods (self reboot and call another binary file) work fine for the a720. In record mode was the lens retracted and extended.

msl

edit: For a public test in CHDK-DE I need also the stubs_entry.S entries for the a430 1.00b and sx120 1.00b. It would be very nice if you could post these values.
« Last Edit: 20 / September / 2010, 08:09:57 by msl »
CHDK-DE:  CHDK-DE links

*

Offline reyalp

  • ******
  • 14128
Re: rebooting/loading CHDK binaries from lua or canon basic
« Reply #31 on: 20 / September / 2010, 13:30:00 »
I've added the a430 stubs files to svn.

sx120 isn't in the main CHDK tree at all. I can get the address later.
Don't forget what the H stands for.

Re: rebooting/loading CHDK binaries from lua or canon basic
« Reply #32 on: 20 / September / 2010, 20:45:37 »
I've added an updated cbasic loader: http://chdk.wikia.com/wiki/Canon_Basic/Scripts/Loader


Good work !

Incidentally, as well as  CBasic watchdog-timer functions are there firmware watchdog functions that can be called directly from code  ?

If we turn the watchdog-timer off, can the Canon capture-sequence be paused indefinitely ?


*

Offline reyalp

  • ******
  • 14128
Re: rebooting/loading CHDK binaries from lua or canon basic
« Reply #33 on: 20 / September / 2010, 21:57:45 »
I've added an updated cbasic loader: http://chdk.wikia.com/wiki/Canon_Basic/Scripts/Loader
Incidentally, as well as  CBasic watchdog-timer functions are there firmware watchdog functions that can be called directly from code  ?
Any "cbasic function" can be called as _ExecuteEventProcedure("name",...) from ARM (not thumb) code in CHDK or call_event_proc("name",...) in native call enabled CHDK lua

Quote
If we turn the watchdog-timer off, can the Canon capture-sequence be paused indefinitely ?
An interesting question. We can be sure Canon didn't design it to work with delays longer than the watchdog timeout, but it might work.

Keep in mind that if you do this, the camera may stay "on" in a crashed state until the battery runs out.

A better approach might be to figure out how to kick the watchdog yourself.
Don't forget what the H stands for.

*

Offline reyalp

  • ******
  • 14128
Re: rebooting/loading CHDK binaries from lua or canon basic
« Reply #34 on: 21 / September / 2010, 00:41:49 »
sx120 isn't in the main CHDK tree at all. I can get the address later.
Restart FFC187C0
Don't forget what the H stands for.

*

Offline whoever

  • ****
  • 280
  • IXUS950
Re: rebooting/loading CHDK binaries from lua or canon basic
« Reply #35 on: 21 / September / 2010, 03:22:53 »
If we turn the watchdog-timer off, can the Canon capture-sequence be paused indefinitely ?
Or, instead of stopping the WDT, reset it periodically. Which is normally the job of the WdtReset task that sleeps 2s in a loop, then resets the timer by writing the AA55 sequence to its WDFEED register. In my case:
Code: [Select]
FF817C1C  MOV     R5, #0xC0000004
FF817C20  MOV     R4, #0xAA00
...
FF817C28  ADD     R5, R5, #0x410000 ; R5=C0410004
FF817C2C  ADD     R4, R4, #0x55   ; R4=AA55
...
FF817C30  STR     R4, [R5]        ; [0xC0410004] := 0xAA55; feed sequence: reset WDT

Re: rebooting/loading CHDK binaries from lua or canon basic
« Reply #36 on: 21 / September / 2010, 04:58:02 »
@reyalp and whoever

Very interesting.

Someone with a G9 was testing some code that execute a fixed number of exposures with a timelapse script and then reset the camera every minute.

It worked for three hours and then stopped in ALT mode without running the script.

Sometimes it would stop far sooner.

Never could find the reason for that so I just forced another restart under such conditions.

Re: rebooting/loading CHDK binaries from lua or canon basic
« Reply #37 on: 21 / September / 2010, 04:59:32 »
@reyalp

How did you work-out the CBasic syntax (as used in your loader for example) ?


Re: rebooting/loading CHDK binaries from lua or canon basic
« Reply #38 on: 21 / September / 2010, 05:04:28 »
the WdtReset task that sleeps 2s in a loop, then resets the timer


So, how does that allow us to keep the USB remote switch pressed for up to ten seconds, pausing the capture task ?


*

Offline msl

  • *****
  • 1280
  • A720 IS, SX220 HS 1.01a
    • CHDK-DE links
Re: rebooting/loading CHDK binaries from lua or canon basic
« Reply #39 on: 21 / September / 2010, 06:53:21 »
@reyalp

Thank you for the informations.
CHDK-DE:  CHDK-DE links

 

Related Topics


SimplePortal © 2008-2014, SimplePortal