Jump to content
calinp

[Energia Library] Petit FatFS SD Card Library

Recommended Posts

See Calinp post above mine. There is an example in the package.

Thanks, i have seen the sample but it looks quite complicated :/  I will try it soon though.

Share this post


Link to post
Share on other sites
 

I have formatted my SD Card to FAT file system 


My pin connections are as below (checked in the petit fatfs libray)

(and 10 for the CS)

I have pasted t_read and t_write .txt files into the sd card..

P.S. My 16MHz Crystal is not soldered is this an issue for this task?

 

  uint8_t data;

  uint8_t _SCLK = 7;

  uint8_t _MOSI = 15;

  uint8_t _MISO = 14;  //defaults on HW SPI pins

 


I am getting this message on serial monitor and so when i check my sd card i see that t_write is still blank..

 

Press button to start...

 

Open a test file (t_read.txt).

 

Failed with rc=6

post-30056-0-04123200-1363720936_thumb.jpg

Share this post


Link to post
Share on other sites

Hi Sirri,

 

From the pictures I think you are using an SD adapter that have level shifting so it can interface to 5V microcontrollers (like Arduino).

This will not work, because the MSP430 is a 3.3V device and the voltage levels from the card will be to low.

Try to connect the card directly using the first method from http://www.43oh.com/2011/02/five-cheap-breadboard-prototyping-tips-and-tricks-list-2/

( this is what I used )

 

Regards,

Calin

Share this post


Link to post
Share on other sites

Hi Sirri,

 

From the pictures I think you are using an SD adapter that have level shifting so it can interface to 5V microcontrollers (like Arduino).

This will not work, because the MSP430 is a 3.3V device and the voltage levels from the card will be to low.

Try to connect the card directly using the first method from http://www.43oh.com/2011/02/five-cheap-breadboard-prototyping-tips-and-tricks-list-2/

( this is what I used )

 

Regards,

Calin

Hi Calin,

But there is also +3.3V just above +5V..  What about connecting USB 5V to there (3.3V and also 5V) ? Will that burn something? : )

Thanks,

Sirri

Share this post


Link to post
Share on other sites

I looked again the picture and there is no need to supply 5V from USB to the SD board.

Try with FatFs.begin(cs_pin,16);   this will lower the SPI clock 

Check if your Energia/hardware/msp430/libraries/SPI/utility/usci_spi.cpp  and  Energia/hardware/msp430/cores/msp430/usci_isr_handler.c  files are the same as the ones in github.

 

Calin

Share this post


Link to post
Share on other sites

I looked again the picture and there is no need to supply 5V from USB to the SD board.

Try with FatFs.begin(cs_pin,16);   this will lower the SPI clock 

Check if your Energia/hardware/msp430/libraries/SPI/utility/usci_spi.cpp  and  Energia/hardware/msp430/cores/msp430/usci_isr_handler.c  files are the same as the ones in github.

 

Calin

 

I have checked usci_spi.cpp and usci_isr_handler.c and i was suprised that they are really changed in github. i have replaced my files with the ones in github.

However it still doesn't work : /

Here is the result when i test the code (attached image)

Sirri

post-30056-0-29870900-1363893669_thumb.jpg

Share this post


Link to post
Share on other sites

It should. I'm not sure what your current bread board is doing.

ok, thanks bluehash, i will try it tomorrow evening and tell you the results.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×