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

Problem about fatfs and QSPI on nRF52840

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
static bool fatfs_init(void)
{
FRESULT ff_result;
bool init_result = true;
DSTATUS disk_state = STA_NOINIT;
bool flag = false;
memset(&m_filesystem, 0, sizeof(FATFS));
// Initialize FATFS disk I/O interface by providing the block device.
static diskio_blkdev_t drives[] =
{
#if USE_SD_CARD
DISKIO_BLOCKDEV_CONFIG(NRF_BLOCKDEV_BASE_ADDR(m_block_dev_sdc, block_dev), NULL)
#else
DISKIO_BLOCKDEV_CONFIG(NRF_BLOCKDEV_BASE_ADDR(m_block_dev_qspi, block_dev), NULL)
#endif
};
diskio_blockdev_register(drives, ARRAY_SIZE(drives));
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Hi, I was using nRF52840 , flash is mx25L25645GM2, I used fatfs with QSPI ,but I found fatfs was unstable,After some time, the stored file would dispear.Sometime there were scrambling symbols in my files