bluehash 1,581 Posted January 30, 2013 Author Share Posted January 30, 2013 do { ltoa(++n,Line); strcat(Line," The quick brown fox jumps over the lazy dog. 1234567890\r\n"); res = pf_write(Line, strlen(Line), &bw); if (res != FR_OK) { put_rc(res); break; } if ( n & 0x10 ) { printf("."); } } while(n < 100); in main.c. Do I have to use these code with CSS? I've only IAR Which code are you using? Link? Quote Link to post Share on other sites
ivanfracassi 0 Posted February 19, 2013 Share Posted February 19, 2013 Hi everyone, i've the same problem with IAR when i try to download the project on the msp: Building configuration: PetiteFS_G2553 - DebugUpdating build tree...LinkingWarning[w6]: Type conflict for external/entry "printf", in module main against external/entry in module ?printf; function types differ in parameter 1; types have different type attributes /* In module main: */ /* Function, args 2, attr 0 */ int (__cc_version2 printf)(char *, ...); /* In module ?printf: */ /* Function, args 2, attr 0 */ int (__cc_version2 printf)(char const *, ...);Fatal Error[e89]: Too much object code produced (more than 0x1000 bytes) for this packageError while running Linker Total number of errors: 1Total number of warnings: 1 Quote Link to post Share on other sites
bluehash 1,581 Posted February 20, 2013 Author Share Posted February 20, 2013 Hi everyone, i've the same problem with IAR when i try to download the project on the msp: Could you optimize the code? This works with ccs. Quote Link to post Share on other sites
ivanfracassi 0 Posted February 20, 2013 Share Posted February 20, 2013 I think I'm too newbie to do that.. Quote Link to post Share on other sites
kenyee 5 Posted March 15, 2013 Share Posted March 15, 2013 does this support file/directory deletion as well? I couldn't find anything in the code to support it... Quote Link to post Share on other sites
bluehash 1,581 Posted March 15, 2013 Author Share Posted March 15, 2013 does this support file/directory deletion as well? I couldn't find anything in the code to support it... Unfortunately no. PetiteFatFS library, which is implemented here, does not allow it. This is because RAM is limited on the MSP430G2553. If you need file/dir deletion, you can use Elms FatFS library and try it on the Stellaris Launchpad.. or try a bigger MSP430. Quote Link to post Share on other sites
simonfrfr 1 Posted April 9, 2013 Share Posted April 9, 2013 What does rc=1 mean? That is what I get in return. (MSP430G2553) Thanks, Simon Edit: Sorry noticed that CLK and CS lines were backwards Quote Link to post Share on other sites
bluehash 1,581 Posted April 9, 2013 Author Share Posted April 9, 2013 What does rc=1 mean? That is what I get in return. (MSP430G2553) Thanks, Simon Edit: Sorry noticed that CLK and CS lines were backwards It means disk error. It should be rc=0 In diskio.h /* Results of Disk Functions */ typedef enum { RES_OK = 0, /* 0: Function succeeded */ RES_ERROR, /* 1: Disk error */ RES_NOTRDY, /* 2: Not ready */ RES_PARERR /* 3: Invalid parameter */ } DRESULT; Quote Link to post Share on other sites
Vksalian 0 Posted April 25, 2013 Share Posted April 25, 2013 Hello Bluehash, I recently tried your code (given in the first page of this thread). I got the same error rc=1. I straight away connected the pins of MSP430G2553 to corresponding pins on SD Card. Now, my question, is there any need of pullup resister or any circuit elements to be connected to CLK, DATA, CS lnes, by any chance ? Please help me in this regard. I think, now, I was suppossed to use latest version of code in the above thread, Am I right ? Thanks in adavance for the help. -- Reagards, Vksalian Quote Link to post Share on other sites
bluehash 1,581 Posted April 25, 2013 Author Share Posted April 25, 2013 @@Vksalian Use the wiki for the latest revision. Also..what command gives you rc=1? Vksalian 1 Quote Link to post Share on other sites
Vksalian 0 Posted April 26, 2013 Share Posted April 26, 2013 Hello Bluehash, Thanks for the reply and the link to wiki. 1. I got the error, rc=1 is for the "di" command I typed in the terminal window, Disk Initialize... rc=1 I think its saying DISK error. But I believe it could be because of below confusion (point 2, below). 2. Also, I have one more confusion w.r.t. CD (CARD_DETECT) or CS pin. As per My understanding both are the same pins. But in the pdf at http://store.43oh.com/download/uploads/SDCardBoosterpack/schematic/43oh_BP_CardReader_SDCard_v1.2.pdf has 2 pin connections named as CS and CD. 3. Also, as per the TI site, they have used 47k pull-up resister to CS line. But in the pdf, it is 560 only with a LED in series. But I could not understand the purpose of uasage of resisters actually. Please help me on understand the above points. Note : I am using Linux based development platform with "minicom" as the terminal emulator. CCS5.2 for compilation and mspdebug for dumping the output file to MSP430G2553. Thanks in advance. -- Thanks, Vksalian. @@Vksalian Use the wiki for the latest revision. Also..what command gives you rc=1? Quote Link to post Share on other sites
bluehash 1,581 Posted April 26, 2013 Author Share Posted April 26, 2013 2. Chip select(CD) and Card Detect(CD) are two different pins. Chip select selects the SDcard. CD is just an indication that a SDcard is inserted. It is just for convenience. 3.Resistor to CS or CD? Same as above. Can you post a pic of your setup? Vksalian 1 Quote Link to post Share on other sites
Vksalian 0 Posted April 27, 2013 Share Posted April 27, 2013 Hello Bluehash, I have attached the connection image below. I still have a doubt on CD and CS pins since the pin connection info from the datasheet (table above) says CD and CS are same pins. Please help me to get out of this connection. Also please let me know if you need any further info on this. Thanks, VKSALIAN 2. Chip select(CD) and Card Detect(CD) are two different pins. Chip select selects the SDcard. CD is just an indication that a SDcard is inserted. It is just for convenience. 3.Resistor to CS or CD? Same as above. Can you post a pic of your setup? Quote Link to post Share on other sites
Vksalian 0 Posted April 27, 2013 Share Posted April 27, 2013 Hello Bluehash, I have attached the connection image below. I still have a doubt on CD and CS pins since the pin connection info from the datasheet (table above) says CD and CS are same pins. Please help me to get out of this connection. Also please let me know if you need any further info on this. Thanks, VKSALIAN edit : Added the link Quote Link to post Share on other sites
bluehash 1,581 Posted April 27, 2013 Author Share Posted April 27, 2013 Why don't you connect it according to the schematic for the SDCard booster? The code is meant for that. It will be easier to debug. Lets see: P1.5 ->SCLK-------->Card Pin5 P1.6 ->MISO ------>Card Pin7 P1.7 ->MOSI-------->Card Pin2 P2.0 ->Chip select->Card Pin1 ..and ground/power. Forget about the CardDetect for now Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.