How to power off and on to and SD card - Script Writing - CHDK Forum

How to power off and on to and SD card

  • 5 Replies
  • 4777 Views
How to power off and on to and SD card
« on: 09 / February / 2012, 17:57:18 »
Advertisements
Hi.
Is there away from Lua script to turn off/on power to the SD card for:
SX30IS firmware vers P
SX 20IS firmware vers B and C
D10 firmware ver i

Thanks,

Re: How to power off and on to and SD card
« Reply #1 on: 09 / February / 2012, 18:19:08 »
Hi.
Is there away from Lua script to turn off/on power to the SD card for:
SX30IS firmware vers P
SX 20IS firmware vers B and C
D10 firmware ver i
Short Answer = no

Longer Answer =  there is code in the loader directory for each camera in a file called entry.S that claims to "Turn off SD card power to support autostart".  Assuming that's what the code actually does then you could take that address and value and use the Lua poke function to try doing the same thing.  If you are looking for advice on whether that is a good thing to try,  it might help if you told us more about what you are trying to do and why ?
« Last Edit: 09 / February / 2012, 20:11:50 by waterwingz »
Ported :   A1200    SD940   G10    Powershot N    G16

Re: How to power off and on to and SD card
« Reply #2 on: 10 / February / 2012, 11:47:22 »
Hi Waterwingz:

I got it working, Thanks.
for SX30 P firmware:

Lua:
poke(0xC0220018,0x44)   
sleep(1000)                 
poke(0xC0220018,0x46)

I just want to restart the EyeFi card. 

Thanks,

Re: How to power off and on to and SD card
« Reply #3 on: 10 / February / 2012, 13:01:45 »
I just want to restart the EyeFi card. 
I thought that might be what you were trying to do.
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline reyalp

  • ******
  • 14126
Re: How to power off and on to and SD card
« Reply #4 on: 11 / February / 2012, 02:02:16 »
Hi Waterwingz:

I got it working, Thanks.
for SX30 P firmware:

Lua:
poke(0xC0220018,0x44)   
sleep(1000)                 
poke(0xC0220018,0x46)

I just want to restart the EyeFi card. 

Thanks,
This restarts the eyefi ? I remember there was another thread where we discussed this and couldn't get it to work. Can't seem to find it now though :/ Here it is http://chdk.setepontos.com/index.php?topic=5563.msg53795#msg53795

Note I would expect that many ports don't have the right address in the "Turn off SD card power to support autostart" bit, since it doesn't actually seem to be needed for correct boot on all cameras.
« Last Edit: 11 / February / 2012, 02:06:08 by reyalp »
Don't forget what the H stands for.

Re: How to power off and on to and SD card
« Reply #5 on: 11 / February / 2012, 10:12:02 »
Note I would expect that many ports don't have the right address in the "Turn off SD card power to support autostart" bit, since it doesn't actually seem to be needed for correct boot on all cameras.
IIRC, it was pretty well marked in the IDA dumps I saw ?  Might be something to ask philmoz to check in his sigfinder if this turns out to work for some cameras ?
Ported :   A1200    SD940   G10    Powershot N    G16

 

Related Topics


SimplePortal © 2008-2014, SimplePortal