IXUS160/ELPH160 Porting attempt - page 46 - DryOS Development - CHDK Forum
supplierdeeply

IXUS160/ELPH160 Porting attempt

  • 497 Replies
  • 187531 Views
*

Online reyalp

  • ******
  • 13673
Re: IXUS160/ELPH160 Porting attempt
« Reply #450 on: 07 / May / 2016, 13:56:44 »
Advertisements
I experienced this very same issue today, it happened like this:
- remove power to camera
- insert usb
- give power to camera
< camera tries to bootup, fails and extends the lens a little more than it was before >
This seems weird to me because
1) The camera should never extend the lens when CHDK is booted, unless you hold the power button down (the code for this is present in boot.c, but it could be wrong)
2) The Canon firmware should never extend the lens when it thinks USB is present, even without CHDK.

Assuming your camera is still working (not clear to me from your posts) if you click the power button to start when USB is not present, does the lens extend?

I would be surprised if init_required_fw_features is actually relevant, but if so, it should be fairly simple to create the required eventflags and semaphores directly, as done on g7x.
Don't forget what the H stands for.

*

Offline c10ud

  • ***
  • 245
Re: IXUS160/ELPH160 Porting attempt
« Reply #451 on: 07 / May / 2016, 14:10:25 »
I experienced this very same issue today, it happened like this:
- remove power to camera
- insert usb
- give power to camera
< camera tries to bootup, fails and extends the lens a little more than it was before >
This seems weird to me because
1) The camera should never extend the lens when CHDK is booted, unless you hold the power button down (the code for this is present in boot.c, but it could be wrong)
2) The Canon firmware should never extend the lens when it thinks USB is present, even without CHDK.

Assuming your camera is still working (not clear to me from your posts) if you click the power button to start when USB is not present, does the lens extend?

I would be surprised if init_required_fw_features is actually relevant, but if so, it should be fairly simple to create the required eventflags and semaphores directly, as done on g7x.
I saved the camera fortunately.


I was holding the power button down, yes, and I think the issue was related to semaphores in play mode. In fact the issue was reproducible even by powering on through the playback button.


There may be other minor things that I have overlooked (I confess I tried hacking fast), but what I said is more or less what I experienced.. now I'm not home anymore unfortunately so I cannot make further tests..

What I'm sure about is that my now working build vs vanilla from mighty hoersche has that function I mentioned commented out. (I compiled locally with gcc4.6 arm-elf)
« Last Edit: 07 / May / 2016, 14:12:03 by c10ud »

*

Offline srsa_4c

  • ******
  • 4447
Re: IXUS160/ELPH160 Porting attempt
« Reply #452 on: 07 / May / 2016, 14:14:16 »
I experienced this very same issue today, it happened like this:
- remove power to camera
- insert usb
- give power to camera
When you say "remove power" or "give power", what does that mean? Were you using something other than the battery?

*

Online reyalp

  • ******
  • 13673
Re: IXUS160/ELPH160 Porting attempt
« Reply #453 on: 07 / May / 2016, 14:28:19 »
I was holding the power button down, yes, and I think the issue was related to semaphores in play mode. In fact the issue was reproducible even by powering on through the playback button.
With CHDK installed, the lens fully retracted, and without USB:
If you click play, does the lens extend?
If you click power does the lens extend?
If you hold power does the lens extend?

If the camera crashed with the lens not completely closed, it's likely the camera will try to move it regardless of the how it was powered on, so the above should be tested after powering down normally.

Quote
I was holding the power button down, yes, and I think the issue was related to semaphores in play mode.
The semaphores and eventflags affected by init_required_fw_features should be specific to eventprocs that are never called in normal Canon firmware operation and are only used by CHDK when the corresponding overrides are issued. The whole reason we need these functions is that they are not created by default and modern dryos crashes if it tries to use initialized synchronization objects  (see https://chdk.setepontos.com/index.php?topic=12516.0).
Don't forget what the H stands for.


*

Offline c10ud

  • ***
  • 245
Re: IXUS160/ELPH160 Porting attempt
« Reply #454 on: 07 / May / 2016, 14:30:29 »
Right, sorry, i made a fake battery at 3.8something volts.
I didnt connect the middle pin to anything (not the first time I try this).
Do you think it could matter?
Unfortunately I destroyed the original battery in the process of making the fake adapter.

*

Online reyalp

  • ******
  • 13673
Re: IXUS160/ELPH160 Porting attempt
« Reply #455 on: 07 / May / 2016, 14:34:33 »
I didnt connect the middle pin to anything (not the first time I try this).
Do you think it could matter?
Probably not. None of Chinese knock-off adapters I have connect it (I'm not sure if the real canon ones do), and they seem to work fine.

Power supply problems could cause all kinds of weird behavior though.
Don't forget what the H stands for.

*

Offline c10ud

  • ***
  • 245
Re: IXUS160/ELPH160 Porting attempt
« Reply #456 on: 07 / May / 2016, 14:37:07 »
Well I was removing power with the lens extended, it could be then the error condition propagating then..
I guess I will have to try it again with vanilla...
However I think I tried repeating this with my own fw but everything worked...I share your concerns though, Im kind of burned from this crazy weekend : )

*

Online reyalp

  • ******
  • 13673
Re: IXUS160/ELPH160 Porting attempt
« Reply #457 on: 07 / May / 2016, 14:48:56 »
Well I was removing power with the lens extended, it could be then the error condition propagating then..
I would strongly suggest doing a proper shutdown if you can, e.g.  post_levent_to_ui('PressOffButton'). That said, if powering on with the lens extended triggers this problem, that's very good information.

Normally on these cameras, when the camera crashes with the lens out, it retracts on the next power up, even if powering on in rec. Maybe having USB present interferes with this process on this camera.

If you are willing to experiment, it would be interesting to see if this happens without CHDK: cut power with lens out, connect USB, connect power.
Don't forget what the H stands for.


*

Offline c10ud

  • ***
  • 245
Re: IXUS160/ELPH160 Porting attempt
« Reply #458 on: 07 / May / 2016, 15:07:07 »
Well I was removing power with the lens extended, it could be then the error condition propagating then..
I would strongly suggest doing a proper shutdown if you can, e.g.  post_levent_to_ui('PressOffButton'). That said, if powering on with the lens extended triggers this problem, that's very good information.

Normally on these cameras, when the camera crashes with the lens out, it retracts on the next power up, even if powering on in rec. Maybe having USB present interferes with this process on this camera.

If you are willing to experiment, it would be interesting to see if this happens without CHDK: cut power with lens out, connect USB, connect power.
well the power-cycle was the last resort for coming back from unsolvable usb errors (usb and arm socs...ewww)..

Hopefully I will make some proper (more scientific) tests next week or so, thanks reyalp and srsa for your support!

*

Offline c10ud

  • ***
  • 245
Re: IXUS160/ELPH160 Porting attempt
« Reply #459 on: 18 / July / 2016, 02:53:15 »
I finally had the chance to test more what was going on with a couple of ixus160 and here are the results:

1) I found out that the camera having issues booting up etc. was a faulty camera (!) The issues were reproducible in "chdk-usage" but apparently the camera was working ok in "normal use"..a few other cameras I tried were working as expected! I don't know how and why that specific camera was giving issues but now I guess it's on its way for a RMA

2) I also found out you shouldn't use no-brand SD cards, because they will make your life a lot worse..by triggering random errors here and there..

greets

 

Related Topics