Jump to content
43oh

Arduino booster/shield for SD


Recommended Posts

Hi Grant,

I can think of several issues that you might  have:

- Arduino I/O is at 5V so all shields that interface to SD cards use some sort of level conversion to 3.3V. It is possible that your shield has resistive dividers and in this case the voltage on Launchpad I/O will be about 2V

- The SPI clock setiing in the library is 8MHz and this may be too high for some cards and shields. I will make some changes to the library so the user can set a lower clock.

- I updated the file usci_spi.cpp  in my SPI library with the one patched by Rei Vilo here (spi_send() function is fixed): https://github.com/energia/Energia/blob/issue_164_SPI_SRAM/hardware/msp430/libraries/SPI/utility/usci_spi.cpp

 

I connected the card using wires of ~10cm (4 inches) and an adapter similar to the first one in this link: http://www.43oh.com/2011/02/five-cheap-breadboard-prototyping-tips-and-tricks-list-2/  and had no troubles running at 8MHz. I soldered also a 10uF cap on the supply pins of the  card.

 

Regards,

Calin

Link to post
Share on other sites

Calinp,

My first fix was using another SD card, it now works OK when my booster card is plugged into a Stellaris, but still fails in a 430 (But  the suspect SD works OK with the  arduino) The two SD have the same properties when viewed under windows, so have put this down to bad-luck, e.g. a marginal SD card. 

 

Now do a check on the FatFs.begin and get a 6, that means  "NOT_ENABLED (Check file system)"

------------------------------------------ 

myres=FatFs.begin(cs_pin);

.....

  case 6:

            Serial.print(" NOT_ENABLED (Check file system)");
......
-----------------------------------------
 
Am not too worried at this time, as I ran out of program space and had to use a stellaris.
 
But it would be nice to solve for other energia forum guys that only use the 430.
 
Grant
 
 
Link to post
Share on other sites

Hi Grant, Thanks for your feedback.

 

As per Rei Vilo findings, a divider of 2 for SPI clock yields 8 MHz for MSP430 and 4MHz for Stellaris so probably the higher clock is causing issues. I will make the updates to the library so the clock can be adjusted.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...