CHDK and certain SD cards icompatible on some cameras - General Discussion and Assistance - CHDK Forum

CHDK and certain SD cards icompatible on some cameras

  • 6 Replies
  • 6234 Views
*

Offline reyalp

  • ******
  • 14118
CHDK and certain SD cards icompatible on some cameras
« on: 17 / March / 2016, 00:23:11 »
Advertisements
Most recently sx530h but reported on other cameras too.

Maybe if we collect enough data a pattern will emerge.

Affected cameras /  cards (mostly via http://chdk.wikia.com/wiki/User:Srsa_4c/Forgotten_stuff)
sx530
Failed cards:
Transcend 2GB Class 4
Platinet 8GB HC Class 10
Hama 8GB HC Class4
Transcend 8GB HC Class4

Working:
Toshiba C08G,
old SD cards supplied with the cameras and branded as Canon (32MB and 128MB)

sx130
Failed card: 16gb SDHC samsung class 10  (1U I)

(I'm not convinced this one is related)

sx160
Failed card:
16 GB, SD HC, Class 10, Verbatim Premium and 2GB Kingston SD/2GB
Kingston's 8GB Class 4 MicroSD
Working card:
16 GB Kingston card (SD10W/16GB)
32 and 64GB Strontium micro SD, in same adapter as failed kingston above

Also
I found a workaround to the problem. Just turn on the camera pressing more than one second the ON/OFF button.

I have not seen this error on my sx160, using: 32 GB Wintec filemate professional plus U1 (I've probably used others too, but I don't remember which ones)

Edit:
Tested following on sx160 with no errors
Kingston 1GB  no speed class
Wintec filemate professional plus 32 GB  UHS1 (2 different cards)
Patriot micro SDHC 32 GB  UHS1
SandDisk micro SDHC 16 GB  UHS1

sx150
No card specified, not convinced it's related.

A480
Failed card: 16 GB Kingston
Working cards: Also 16 GB Kingston, 2 x Micro SD Samsung / SanDisk 32 GB Class 1, 3 x older SD 256 MB ... 4 GB

IXUS145 and SX520
Only on AC adapter, may be a different issue.
Failed cards: Transcend and Kingston
Working: Sandisk

g7x
I have seen something that may be similar, but only rarely. Camera boots, CHDK loads, then card locked, memory card error, CHDK shows missing modules.
Failed card (sometimes): Patriot 32 GB UHS1 micro SD
« Last Edit: 11 / May / 2016, 23:15:07 by reyalp »
Don't forget what the H stands for.

*

Offline ShahJahan

  • *
  • 30
  • King Of The World
Re: CHDK and certain SD cards icompatible on some cameras
« Reply #1 on: 17 / March / 2016, 05:07:33 »
On SX160 IS, Kingston's 8GB Class 4 MicroSD is NOT working with an adapter. All the other cards are working (my 32 and 64GB Strontium BOTH work) with the SAME adapter.
The name ShahJahan comes from Persian, where Shah means King and Jahan means World,
so the name ShahJahan in its literal sense means King of the World.



*

Offline srsa_4c

  • ******
  • 4451
Re: CHDK and certain SD cards icompatible on some cameras
« Reply #2 on: 17 / March / 2016, 13:30:36 »
I have an idea. The firmware function we always disable in boot.c is not only responsible for starting diskboot.bin. It also initializes the card. (I'll call the routine that does this "taskcreate_SD1stInit" because ... it launches that task.)
The task and its related routines have variables some of which are checked by routines from "Mounter.c". If we don't run this task, all those variables will be left at their default values. Who knows, that might be a problem.
So, someone who's affected could try calling taskcreate_SD1stInit right after the commented diskboot-related function in boot.c .
FWIW, I tried doing that on my ixus150 and the cam seemed to behave normally (I have never experienced this card issue myself). update: the Canon boot logo stays a bit longer when I put taskcreate_SD1stInit back in the boot process. This might mean a somewhat slower cam startup.

Patch for finsig_dryos (contains the generated files too) attached. I'm not too familiar with the thumb2 sigfinder, so that part is not done.

edit:
blackhole has tried this method and found that it doesn't help
« Last Edit: 18 / March / 2016, 15:48:39 by srsa_4c »

*

Offline c_joerg

  • *****
  • 1251
Re: CHDK and certain SD cards icompatible on some cameras
« Reply #3 on: 18 / March / 2016, 02:47:18 »
This is the list of my Cards:
The 64GB and 128GB Cards are formatted as exFAT from the Cameras


8GB Transcend SD
32GB Intenso mirco SDHC C10
32GB SanDisk Ultra mirco SDHC 1 C10
64GB SanDisk Ultra mirco SDXC 1 C10
64GB SaveTEC mirco SDXC
64GB Samsung EVO Plus UHS-I mirco SDXC
128GB Komputerbay SDXC UHS-I 600X


This is the list of my cams:


IXUS160
IXUS500
SX230
SX50
S110
G1x


I used almost every combination of Cards and cameras. Until now, I had only problems with some SD -> miro SD adapter and timing problems with the G1x and the 64GB SanDisk Ultra.

M100 100a, M3 121a, G9x II (1.00c), 2*G1x (101a,100e), S110 (103a), SX50 (100c), SX230 (101a), S45,
Flickr https://www.flickr.com/photos/136329431@N06/albums
YouTube https://www.youtube.com/channel/UCrTH0tHy9OYTVDzWIvXEMlw/videos?shelf_id=0&view=0&sort=dd


*

Offline srsa_4c

  • ******
  • 4451
Re: CHDK and certain SD cards icompatible on some cameras
« Reply #4 on: 03 / May / 2016, 16:25:19 »
There appears to be a usable workaround for the sx530 camera. See this and the preceding (long) discussion.

*

Offline reyalp

  • ******
  • 14118
Re: CHDK and certain SD cards icompatible on some cameras
« Reply #5 on: 03 / May / 2016, 17:03:00 »
There appears to be a usable workaround for the sx530 camera. See this and the preceding (long) discussion.
Great work  :D :D :D

That, and your latest logs appear to tell the following (this is still just a guess though):

On some cards, the WriteEnableMedia control event appears to arrive too late. The routine that evaluates the state of WriteEnableMedia therefore decides that the card is not writable, and sets a flag accordingly. The responsible routines are called from sub_FF0B0B84 in InitFileModules task. The flag is located at 0x1d60, and is evaluated each time WriteSDCard is called (this happens in sub_ff0300dc).

The current workaround is: setting the flag to 1 right after sub_FF0B0B84, in the InitFileModules task.
Something I've noticed but haven't investigated deeply is a bunch of the functions called from kdb_task are also (possibly) called once at startup via a different code path. Since these aren't hooked, I wonder if they could see the write protect before kbd_task gets going?

e.g. on g7x kbd_read_keys is called from fc077d3a
(task_Startup->sub_fc0db602->sub_fc077d24->kbd_read_keys) in addition to being called from kbd_p1_f (sub_fc0783f6)

On sx530 100c, the equivalent path is task_startup-> sub_FF037F94->sub_FF02B4D8->kbd_read_keys

This is called before PhySw is created.

It's not immediately obvious why this would be card dependent, but I can see the time between first call and kbd_task actually getting scheduled being variable.

Apologies if you've already gone down this road.
Don't forget what the H stands for.

*

Offline srsa_4c

  • ******
  • 4451
Re: CHDK and certain SD cards icompatible on some cameras
« Reply #6 on: 03 / May / 2016, 18:50:15 »
Something I've noticed but haven't investigated deeply is a bunch of the functions called from kdb_task are also (possibly) called once at startup via a different code path. Since these aren't hooked, I wonder if they could see the write protect before kbd_task gets going?
I guess that's possible. I have also noticed that path earlier (before this issue), even looked at it during this investigation (I was suspecting startupflag-related issue at that time).

I'd say that's something worth looking at if a developer experiences something similar on their own camera.

 

Related Topics


SimplePortal 2.3.6 © 2008-2014, SimplePortal