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.

RTOS/MSP430FR5994: Write string to MSP430FR5994 with Fatfs shows wrong

Part Number: MSP430FR5994
Other Parts Discussed in Thread: MSP-EXP430FR5994

Tool/software: TI-RTOS

Hi all,

    Here is a question form customer as below:

    Customer have added the Fatfs file system in MSP430FR5994, and when he wanted to write string "ADC12MEM0" to file with binary form, it shows wrong code.

Here is his code: "f_write(&fil,ADC12MEM0,16,&bw);". Is there any method to solve this question? Thanks a lot.

  • Hi Sean,

    The f_write function expects a string input whereas the ADC12MEM0 register is an integer value. A conversion must take place in order to get data in the expected format, there are several examples provided online. You could also refer to the SDCardLogMode.c file from the OutOfBox_MSP430FR5994 code designed for the MSP-EXP430FR5994 to see how the itoa and f_puts functions can be used to convert and store values accordingly.

    Regards,
    Ryan

**Attention** This is a public forum