Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
6 years, 4 months ago.
LittleFS doesn't mount
Hi guys,
I've problems with mounting LittleFS on a dataflash blockdevice. The mount method never returns. By stepping through the code, I've found out that it always hangs when initialising the blockdevice while calling:
line 419 in stm_spi_api.c
while (!LL_SPI_IsActiveFlag_RXNE(SPI_INST(obj)));
The SPI SR is always 2 (even) instead of 1 (odd). But I have no idea what's wrong and how to fix this. Any help is appreciated.
Thanks and cheers!
1 Answer
6 years, 4 months ago.
I use SD card not dataflash but also through SPI on STM32F412/F429 and have no problems
if ( sd.init() == 0) { if (fs.mount(&sd) == 0) { printf("FS mounted\n"); struct statvfs stat; fs.statvfs(SD_ROOT, &stat); printf( "block size: %lu free blocks: %llu\n", stat.f_bsize, stat.f_bavail); } else { printf("FS not mounted\n"); } } else { printf("cound not init SD\n"); }