Powershot S110 - precision sync? - page 2 - General Discussion and Assistance - CHDK Forum supplierdeeply

Powershot S110 - precision sync?

  • 20 Replies
  • 5969 Views
Re: Powershot S110 - precision sync?
« Reply #10 on: 06 / April / 2014, 08:47:22 »
Advertisements
Hi,

today I wanted do another sync test for my two S110 where precision sync is enabled.
I downloaded the CHDK from trunk 3406.

To enable precision sync Microfunguy told me to add

Quote
#define CAM_REMOTE_USES_PRECISION_SYNC   1

to the platform_camera.h file.
This I have done and started the compilation but it throws following error:

Code: [Select]
../../../../core/raw.c -> raw.thm.o
../../../../core/usb_sync.c -> usb_sync.thm.o
../../../../core/usb_sync.c: In function '_wait_until_remote_button_is_released':
../../../../core/usb_sync.c:62:40: error: 'GPIO_VSYNC_CURRENT' undeclared (first use in this function)
../../../../core/usb_sync.c:62:40: note: each undeclared identifier is reported only once for each function it appears in
C:\gcc451\bin\gmake.exe[1]: *** [usb_sync.thm.o] Error 1
gmake: *** [all-recursive] Error 1

14:38:32 Build Finished (took 46s.421ms)

So it seems there is an additional var do define?
What I am missing?

Thanks!
2 x IXUS 860IS 100c
2 x Powershot S110 103a

Re: Powershot S110 - precision sync?
« Reply #11 on: 06 / April / 2014, 09:23:47 »
So it seems there is an additional var to define?


Code: [Select]
#define GPIO_VSYNC_CURRENT 0xC0F070C8  // vsync current status register used by USB remote precision sync
Ported :   A1200    SD940   G10    Powershot N    G16

Re: Powershot S110 - precision sync?
« Reply #12 on: 06 / April / 2014, 11:21:37 »
Hi waterwingz,

thanks it compiles now without problem, but I get another one.
I get this E26 error after releasing the USB switch. I pressed the USB switch, both cams focus and the screen turns black. Then I release the switch, the lens tubes move back and then the error message E26 appears on both screens.

E26 appears already in the thread:

http://chdk.setepontos.com/index.php?topic=11376.0

there is mentioned:

Code: [Select]
     //  *(volatile int*)(GPIO_VSYNC_MAX) = sync_period; // write the length of the extended period to the register
    //    *(volatile int*)(GPIO_VSYNC_UPDATE) = 1;
        while (*(volatile int*)(GPIO_VSYNC_UPDATE)) {}; // wait until the new value is applied
        //now we are at the beginning of extended period
    //    *(volatile int*)(GPIO_VSYNC_MAX) = std_period; // back to standard timing on next period
    //    *(volatile int*)(GPIO_VSYNC_UPDATE) = 1;

I searched my source code but I cannot find those lines. Does it come from a patch and is not in trunk 3406?
Is there already a solution available for this error?
Is the solution to comment out the line (if available in code ;-))

Code: [Select]
*(volatile int*)(GPIO_VSYNC_MAX) = std_period;
Thanks for any help!
2 x IXUS 860IS 100c
2 x Powershot S110 103a

Re: Powershot S110 - precision sync?
« Reply #13 on: 06 / April / 2014, 11:31:15 »
Hi waterwingz,

thanks it compiles now without problem, but I get another one.
I get this E26 error after releasing the USB switch. I pressed the USB switch, both cams focus and the screen turns black. Then I release the switch, the lens tubes move back and then the error message E26 appears on both screens.
As far as I can tell,  the GPIO_VSYNC_MAX value is not being read correctly in core/usb_sync.c line 58 for the S110.   It's on my list to do some testing on my cameras but I will need a volunteer with an S110 to do a proper job.

For now,  this apparently works but the side effects of doing so are unknown (comment out line 79)

Code: [Select]

        while (*(volatile int*)(GPIO_VSYNC_UPDATE)) {}; // wait until the new value is applied

        //now we are at the beginning of extended period

  //    *(volatile int*)(GPIO_VSYNC_MAX) = std_period; // back to standard timing on next period
        *(volatile int*)(GPIO_VSYNC_UPDATE) = 1;
Ported :   A1200    SD940   G10    Powershot N    G16


Re: Powershot S110 - precision sync?
« Reply #14 on: 06 / April / 2014, 12:31:25 »
(It's unfortunate that this conversation is now spread across at least four threads.)

I did some more testing. 

The attached patch causes EngDrvRead(GPIO_VSYNC_MAX) to displays in the Debug OSD  (Miscellaneous Stuff -> Debug Parameters -> Show Misc. Values ).

On my A1200,  the value is 0 in playback mode, sits at 103 in shooting mode until a half press changes it to 963 while focussing and 209 when focussed.

If I go one step further and change core/usb_sync.c line 58 so that set_period = 0 , then I can no longer shoot properly via the USB remote.  I don't get an error message but the camera runs the lens in & out and fails to take a picture. 

This re-enforces my theory that EngDrvRead(GPIO_VSYNC_MAX) for the s110 is either reading the wrong register or the value there is not being set by the Canon firmware.

Hopefully mr.burns or Recyclojunk64 can apply the patch and report what values are displayed in playback & shooting modes.

Ported :   A1200    SD940   G10    Powershot N    G16

Re: Powershot S110 - precision sync?
« Reply #15 on: 06 / April / 2014, 13:19:26 »
Hi waterwingz,

I tested the patch, here my results:
I tested with one single camera and the built in shutter button - and also with USB switch (set to twoTouch).
Both results are the same.
In my code I commented out the line as it is shown here (the cam did not crash anymore):

Code: [Select]
// (volatile int*)(GPIO_VSYNC_MAX) = std_period;Or should this line be active for the test?

Here my result:

0 in playback mode

In shooting mode, if I move the camera to different objects the std_period is changing.
It feels if the presented value is dependent from the brightness of the object I point the camera to.
E.g. if I point on dark object it shows 3659, on bright object (white screen) it shows 9620.

shutter button half pressed: 1191 during focusing and also if focus finished

After releasing the shutter button (not taking a photo) it shows 962 very shortly and switches back to brightness dependent values again.

Hope that helps?
« Last Edit: 06 / April / 2014, 13:48:14 by mr.burns »
2 x IXUS 860IS 100c
2 x Powershot S110 103a

Re: Powershot S110 - precision sync?
« Reply #16 on: 06 / April / 2014, 14:22:44 »
Thanks for that.   Quite a bit different than my A1200.  Seems pertty likely that the value we are using for GPIO_VSYNC_MAX is wrong and will mess things up depending on what value its returning.
Ported :   A1200    SD940   G10    Powershot N    G16

Re: Powershot S110 - precision sync?
« Reply #17 on: 06 / April / 2014, 16:29:18 »
I can confirm the values 1191 and 962, I had tested this earlier but somehow forgot to post the results. The debug display I had set up only ran during half press. If you still want me to test the HDMI output I can do that in a few hours when I wake up.


Re: Powershot S110 - precision sync?
« Reply #18 on: 06 / April / 2014, 16:44:03 »
I can confirm the values 1191 and 962, I had tested this earlier but somehow forgot to post the results. The debug display I had set up only ran during half press. If you still want me to test the HDMI output I can do that in a few hours when I wake up.
HDMI was a wild guess and probably not worth pursuing. 

What is really needed is a way to figure how vnd came up with  : GPIO_VSYNC_MAX - write period length

Update :  possibly useful link from nafraf http://magiclantern.wikia.com/wiki/Register_Map#Video_timer
« Last Edit: 06 / April / 2014, 19:33:59 by waterwingz »
Ported :   A1200    SD940   G10    Powershot N    G16

Re: Powershot S110 - precision sync?
« Reply #19 on: 07 / April / 2014, 05:19:43 »
We cannot confirm your results.
We get a median sync error of 1/910 second.

That was using a precision, crt test.

 

Related Topics