Hi,
I have multiple sensor data that needs to be recorded in separate files. This data is being collected in parallel. Using the FATFS xample in SDK 15, I am able to write one sensor's data to the SD Card. But I am not able to open a second file within the same directory. I use the code below to initialise and write. I tried to chnag ethe variable for FILINFO and FIL and also defined a new FILE_NAME to make a new file in the same directory but that doesnt work. Any pointers how to execute this will be really helpful. Thanks a lot!
Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
static FATFS fs;
static DIR dir;
static FILINFO fno;
static FIL file;
uint32_t bytes_written;
FRESULT ff_result;
DSTATUS disk_state = STA_NOINIT;
int sd_init(){
NRF_BLOCK_DEV_SDC_DEFINE(
m_block_dev_sdc,
NRF_BLOCK_DEV_SDC_CONFIG(
SDC_SECTOR_SIZE,
APP_SDCARD_CONFIG(12,13,14,11)
),
NFR_BLOCK_DEV_INFO_CONFIG("Nordic", "SDC", "1.00")