This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

data sampling of SD card

Hi

I am using fatfs of nRF5_SDK_15.0.0_a53641a. Iam writing a program with keil.

I am trying to save data using SD card now.

By using fatfs example it was possible to weite the specified string in the text file.

Here are two things you want to do.

First of all, I want to sample as a period of 1 ms and want to write data (a character string determined for now) to a text file.

Secondly, since the character strings are written without line breaks, I would like to know how to break them.

in fatfs example

    ff_result = f_write(&file, TEST_STRING, sizeof(TEST_STRING) - 1, (UINT *) &bytes_written);

To

    ff_result = f_write(&file, TEST_STRING"\r\n", sizeof(TEST_STRING) - 1, (UINT *) &bytes_written);

it was not broken as a line.

Is there any other special way?

Thank you!

Related