nrf52840 DK, nRF Connect SDK 2.3.0 using vsCode, FAT Filesystem Sample Application
Working with the FAT_FS sample code, I am able to communicate with the SD card perfectly fine, as far as I can tell. The call to lsdir() functions as expected. However, when calling fs_open() to open a file to write to on an external SD card, it is returning error code -2 IF the filepath (mount point + filename) is longer than 14 characters. If the filepath is less than 14 characters then it will successfully write data. I thought it might be resolved by enabling CONFIG_FS_FATFS_LFN, however it did not work. See the code below for my example.
main.c
Relevant prj.conf settings