This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CCS/MSP430F169: How to creat a file in a SD Card using MSP430F169 and code composer?

Part Number: MSP430F169
Other Parts Discussed in Thread: MSP430FR5994

Tool/software: Code Composer Studio

Hi,

i use a MSP430F169 to make a Datenlogger. And to do this I have to write in a SD Card using msp430f169.

I use Code Composer. What i want to do ist to creat a file (excel file) and write some information into.

I searched and fund that it could be possible with a FAT Library. I also fund an example from texas instrument using the same microcontroller. But this don't show how

to creat file or something like that.

Could someone help me?

  • Please refer to this E2E thread on file system of MSP430: e2e.ti.com/.../610527
  • Hi,

    thanks. I found the FatFs library there and downloded it. All functions, that I need are define in the file.h.

    I tried to creat a File in a SD Card but i always get the same error:

    >> Compilation failure
    makefile:147: recipe for target 'Datenlogger__.out' failed
    get_fattime ./ff.obj

    error #10234-D: unresolved symbols remain
    error #10010: errors encountered during linking; "Datenlogger__.out" not built
    gmake[1]: *** [Datenlogger__.out] Error 1
    makefile:143: recipe for target 'all' failed
    gmake: *** [all] Error 2

    I don't get this error when I comment the line fr = f_open(&fil,"message.txt", FA_CREATE_NEW);

    Know someone how to resolve this? The code look like this:

       #include <stdio.h>

    #include <stdint.h>
    #include <msp430x16x.h>
    
    #include "hal_hardware_board.h"
    #include "mmc.h"
    #include "ff.h"
    #include "ffconf.h"
    #include "hal_SPI.h"
    
    
    int main( void )
    {
      WDTCTL = WDTPW + WDTHOLD;//disable watchdog
    
      FIL fil;        /* File object */
      char line[100]; /* Line buffer */
      FRESULT fr;     /* FatFs return code */
    
    
         /* Open a text file */
         fr = f_open(&fil,"message.txt", FA_CREATE_NEW);
    
      return 0;
     }
    
    

  • Hi,

    thanks. I found the FatFs library there and downloded it. All functions, that I need are define in the file.h.

    I tried to creat a File in a SD Card but i always get the same error:

    >> Compilation failure

    makefile:147: recipe for target 'Datenlogger__.out' failed

    get_fattime ./ff.obj

    error #10234-D: unresolved symbols remain

    error #10010: errors encountered during linking; "Datenlogger__.out" not built

    gmake[1]: *** [Datenlogger__.out] Error 1

    makefile:143: recipe for target 'all' failed

    gmake: *** [all] Error 2

    I don't get this error when I comment the line fr = f_open(&fil,"message.txt", FA_CREATE_NEW);

    Know someone how to resolve this? The code look like this:

    #include <stdio.h>
    #include <stdint.h>
    #include <msp430x16x.h>

    #include "hal_hardware_board.h"
    #include "mmc.h"
    #include "ff.h"
    #include "ffconf.h"
    #include "hal_SPI.h"


    int main( void )
    {
    WDTCTL = WDTPW + WDTHOLD;//disable watchdog

    FIL fil; /* File object */
    char line[100]; /* Line buffer */
    FRESULT fr; /* FatFs return code */


    /* Open a text file */
    fr = f_open(&fil,"message.txt", FA_CREATE_NEW);

    return 0;
    }

  • Hi, The file system is included in MSP430FR5994 LaunchPad Development Kit software example. Could you please port this code in MSP430F169 platform? The file system should not be much related with different MSP platform. I am sorry that so far I haven't bandwidth to debug this problem on F169 platform.
  • Hi you can find the hardware and software example in www.ti.com/.../msp-exp430fr5994

**Attention** This is a public forum