Rokicki's SpiSD Question
bambino
Posts: 789
I have my SD socket hooked up, Card formatted FAT16, and I'm testing it with Rokicki's Driver from the ObEx.
I am useing the SpiSd driver(The slowest one wrote in spin).
The Checktime function times out and returns -41 error code everytime without fail.
I suspect my hardware because I have not modified the object, other than placing in debug lines to the driver, and the error -41 is present without them. Also, I did not have 20K pull-ups, I am using 22K.
Does anyone know from this, what part of my Hardware to suspect?
Could the 22K's be throwing me of that much?
I am useing the SpiSd driver(The slowest one wrote in spin).
The Checktime function times out and returns -41 error code everytime without fail.
I suspect my hardware because I have not modified the object, other than placing in debug lines to the driver, and the error -41 is present without them. Also, I did not have 20K pull-ups, I am using 22K.
Does anyone know from this, what part of my Hardware to suspect?
Could the 22K's be throwing me of that much?
Comments
I have yet to hook up a scope to it, but I have checked to see that the pull-ups are working.
3.2V on all pins except Grounds.
If you have a doubt about to change the base pin... I did it before, and I have the card working perfect... I also use 2x10KOhm in serial.
But with 22K must work too.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Regards.
Alberto.
Also, with it off, you can check continuity between prop pin and SD pin.
Make sure you have the SD pins right... I have notes here:
http://www.rayslogic.com/propeller/Programming/SD_Card/SD_Card.htm
Thanks for the link Rayman, I will work more on it tomarrow. No good can come from my post christmas dinner state right now.
It could be caused by anything.
The first thing I'd do is throw a scope on the SD pins and make sure you're seeing transitions on the
clock pin. If you're seeing transitions on the clock pins, I'd then ensure you're seeing transitions on
both DI and DO.
Next, I'd make sure you have 3.3 and ground correctly at the SD interface. Maybe pop the card
out and do a pairwise short check on the SD connections (with the board powered off of course).
What socket are you using? Would you be willing to post a picture of the setup? To me this sounds
*most* like a wiring issue.
What SD card are you using? If it's larger than 2GB, it probably won't work (haven't tried any, but
the new SDHC spec is not supported by the driver).
Good luck!
I agree with the wireing issue. I took a picture, but due to the spigette layout you can't decern much.
Let me get a scope on it. Your plan of attack sounds good.
Data in = Short burst of data(almost looks like its sending $FF every byte)
Data out = nothing
Clk line = see image below
Dmm checks out. no shorts opens. No resistors touching each other.
Unless you see something, I am just going to tear it apart and rewire with shortened leads on the resistors.
Let us know when you get it working.. SD is one of the finer addons. [noparse]:)[/noparse]
OBC
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
New to the Propeller?
Getting started with the Protoboard? - Propeller Cookbook
Got an SD card? - PropDOS
A Living Propeller FAQ - The Propeller Wiki
(Got the Knowledge? Got a Moment? Add something today!)
I'm going to reformat, and then see.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Regards.
Alberto.
The card is doing something though. I turned the volts/Div up and got the picture below.
What kind of socket are you using for the SD card? I had some of the same issues you are having and the problem ended up being the SparkFun breakboard board for the SD card. It was defective and must have had at least one open connection. Luckily I had purchased a spare and that second one worked ok.
Good luck,
Robert
By pulling the SD card out of the bread board, all pins but one(Data_In), Jumped out of the Socket, telling on the uncooperative pin.
Thanks for all your help guys. I have one molex socket left and I thinke I'll just go ahead and make a breakout board for it, instead of a breadboard model.
Thanks Rayman for the idea though!·I'm sure it works, just not when I'm in control of the soldiering iron.
Apparently, the card was not getting the data in signal!!!!!!!!!!!!!!!!
On the pullups, you may be able to get away without *any* pullups; I know of many people running that way quite happily.
The spec says use pullups, but the pullups are there for multi-card setups and for insertion/ejection and if you don't do
either then you might not need them at all. I will not make any statement on this, though; you will need to read the spec
and make your own judgement based on how you intend to use them.
The series resistors should *not* be used in any high-speed mode; they are good to protect your setup against wiring
errors with a low-speed mode, but if you plan to run with the faster assembly drivers you should not use series resistors.
(The RC time constant starts creeping too high.)
Too bad about those breakout boards.
What do you mean by insertion/ejection? Are you saying that they are not needed as long as I don;t hotswap the cards?
The Sd Sockets? No big deal(Samples)! I knew I was going to make a breakout board with one, so I was using this one to prototype with on a bread board.
(Without pullups, the SD and/or host device will likely see transitions on those lines that it may or may
not be happy with; also in general unconnected inputs to CMOS processes should be tied high or low to
prevent spurious power consumption by the input buffers).
As I said, I'm not going to judge whether you can omit the pullups for any particular use or device.
You can find the spec (start by using Wikipedia) and only you know how you will use it. I will say that
some people are quite happily omitting the pullups and I will also say that I can certainly envision
scenarios in which the pullups might not be needed. It's your call on that.
As for the "easiest" way: I still like the sparkfun breakouts (one has to wonder though about the
failures that have been reported). The slightly larger card available for the Prop (Spin Studio?) also
works well. I find any time I have to hack something together (like using a microSD adaptor and
soldering onto the SD pads) I botch it up. You guys may well be more skilled than I am.
This is a roll my own job, so I may try it that way. The only project of mine on the floor for possible resale uses a prebuilt sd setup on the back of an LCD. They are great, but too pricey for my own use.
experiences with various SD cards, I also had a bad adapter from Sparkfun, (one worked, one didn't) and
have found a preference to either obtaining one of Brian's SpinStudio boards, or building my own from an
SD adapter and a piece of perf board. If you bend the legs of the two smallest pins out just a little, and
apply a dab of solder to each hole before soldering the adapter, the adapter solders perfectly, just heating
up each pin and pushing them down.
OBC
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
New to the Propeller?
Getting started with the Protoboard? - Propeller Cookbook
Got an SD card? - PropDOS
A Living Propeller FAQ - The Propeller Wiki
(Got the Knowledge? Got a Moment? Add something today!)
I had a bad feeling about soldiering that molex to that modified 20 pin connector, but it looked really neat if I could pull it off.
I pulled it off allright!
you need to reset the new card on the swap (and there's no magic way to detect the swap at the moment;
you'd need to wire up a card detect pin most likely). What problems have you seen with hot swapping?