Jump to content
Sign in to follow this  
Rhab

Problems with connecting a SD-Card to TM4C123G Launchpad

Recommended Posts

Hi guys,

 

i try to connect a SD-Card to my Tiva-C Launchpad using the SD-Card-Boosterpack .

But i always get an error: "Failed with rc=6".

 

The Launchpad-Pins i use for my first testing are:

PD0: SCLK 

PD1: CS

PD2: MISO

PD3: MOSI

 

i use the sd-cardtutorial with little changes:

 

because tm4c has no temprature-sensor i commented 

//   analogReference(INTERNAL1V5);//   analogRead(TEMPSENSOR);   

and i changed    

ui32_ReadTemp = ((uint32_t)analogRead(TEMPSENSOR)*27069 - 18169625) *10 >> 16;

to 

ui32_ReadTemp = ((uint32_t)millis());

that should lead to usable values...

 

my logfile is called LOG.txt instead of LOG.TXT 

and i changed the cs pin (#define cs_pin      24) and at pfatfs.cpp i changed the other pins:

  uint8_t _SCLK = 23; 
  uint8_t _MOSI = 26;  
  uint8_t _MISO = 25; 

i'm not sure if this works...

 

the last change i made is 

GPIOPinConfigure(GPIO_PD0_SSI1CLK);
   GPIOPinConfigure(GPIO_PD1_SSI1FSS);
   GPIOPinConfigure(GPIO_PD2_SSI1RX);
   GPIOPinConfigure(GPIO_PD3_SSI1TX);
   GPIOPinTypeSSI(GPIO_PORTD_BASE, GPIO_PIN_0 | GPIO_PIN_1 | GPIO_PIN_2 | GPIO_PIN_3 );

after pinMode(PUSH2, INPUT_PULLUP); at the setup()...

 
i know that i get this error after "rc = FatFs.open("LOG.txt");"
by "if (rc) die(rc);"
 
 
any ideas what i do wrong? any suggestions? i'm going to despair of that
 
 

Share this post


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.

Sign in to follow this  

×
×
  • Create New...