-
Notifications
You must be signed in to change notification settings - Fork 12
/
troubleshooting.txt
46 lines (30 loc) · 1.81 KB
/
troubleshooting.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
The best source of recent information is the AdaFruit forum
http://forums.adafruit.com/
Also search the Arduino forum
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl
Try running the fat16info sketch in the Fat16/examples folder to get
more information.
The most common problems are:
--------------------------------------------------------------------------------
Wiring errors with card.init() failure and errorCode == 1. This means the
first command, CMD0 - SPI init, failed. Fat16 is not seeing the card.
-------------------------------------------------------------------------------
card.init() failures caused by resistor SPI level shifters. Some, mostly older,
SD cards work with resistor level shifters but may be flaky with random errors.
Many newer SD cards have edge detectors and fail with errorCode() = 1. These
cards will not work with resistor level shifters since Fat16 does not see the
card at low SPI clock rate.
Other cards fail with an errorCode() > 1. These cards see SD commands at low
SPI clock rate but fail at higher SPI clock rate. It may be possible to use
these cards by replacing card.init() with card.init(1). This will slow the
the SPI clock by 50%.
--------------------------------------------------------------------------------
Redefining SD_CHIP_SELECT_PIN to be a pin other than the Arduino/AVR hardware
SS pin.
Arduino/AVR SPI will only function correctly in master mode if the hardware SS
pin is in output mode. SdCard::init() will enable output mode for the hardware
SS pin even if it is not SD chip select.
If you have multiple SPI devices you must insure devices other than the SD card
have their chip select pin high when SdCard::init() is called.
If you want to understand in more detail how AVR SPI works read this
http://www.atmel.com/dyn/resources/prod_documents/doc2585.pdf. See section 2.3.