SX220hs 101b USB Remore - page 2 - General Help and Assistance on using CHDK stable releases - CHDK Forum  

SX220hs 101b USB Remore

  • 12 Replies
  • 1337 Views
*

Offline srsa_4c

  • ******
  • 4426
Re: SX220hs 101b USB Remore
« Reply #10 on: 23 / May / 2021, 17:13:43 »
Advertisements
FWIW, sync isn't likely going to work on those few models that have a subcpu (s2, s3, s80). I just tried my s80, remote works in non-sync mode but causes the camera to shut down when sync is enabled. On these cameras, the subcpu is responsible for sensing the state of USB power. The DIGIC gets that state by querying the subcpu.
The subcpu also controls main power, so it can switch off the DIGIC when it thinks it locked up (a form of watchdog).

*

Offline reyalp

  • ******
  • 13401
Re: SX220hs 101b USB Remore
« Reply #11 on: 25 / May / 2021, 19:30:34 »
FWIW, sync isn't likely going to work on those few models that have a subcpu (s2, s3, s80). I just tried my s80, remote works in non-sync mode but causes the camera to shut down when sync is enabled. On these cameras, the subcpu is responsible for sensing the state of USB power. The DIGIC gets that state by querying the subcpu.
The subcpu also controls main power, so it can switch off the DIGIC when it thinks it locked up (a form of watchdog).
Does using the remote hook with sleep work, for example, hooktest or chdkptp rsint -cont? In that case, it would suggest like the hard busy loop causes the problem, maybe because it blocks communication with the subcpu?

A couple thoughts if this is the case:
It would be nice to still have the remote hook implemented for scripts, but disable sync if it crashes.

I've recently thought about making sub 10ms "sleep" using HP timer and a semaphore or eventflag. Basically, just set the timer, wait for the object, timer call back triggers it. Of course, some other task could get scheduled and make the delay longer, but it seems like the normal case could be significantly better than 10ms. It would need to only be called from one task, or have a synchronization object for each.

If the subcpu triggers an interrupt on the main CPU when it sees USB, maybe we could hook that instead.
Don't forget what the H stands for.

*

Offline srsa_4c

  • ******
  • 4426
Re: SX220hs 101b USB Remore
« Reply #12 on: 26 / May / 2021, 18:04:17 »
Does using the remote hook with sleep work, for example, hooktest
Yes, that script works.
Quote
In that case, it would suggest like the hard busy loop causes the problem, maybe because it blocks communication with the subcpu?
That would be my guess too. There is a task named RemoteCPUTask, apparently for getting switch states (and possibly more).

Quote
I've recently thought about making sub 10ms "sleep" using HP timer and a semaphore
The s80 PhySw task happens to do just that.
Quote
If the subcpu triggers an interrupt on the main CPU when it sees USB, maybe we could hook that instead.
I don't know how it works (and whether there are interrupts involved), but I'd guess the DIGIC is polling the subcpu in intervals.

 

Related Topics