This example demonstrates basic read write file operation to the OSPI flash using LittleFS library. Wrapper file operation APIs for the littleFS driver files such as program, read, erase and sync are implemented using Flash APIs. The underlying OSPI reads and writes are taken care by the flash APIs. The block device configuration for LittleFS library is provided from the example itself.
The example writes a counter called fileWriteCounter into a file called 'test_file_write_count'. This counter is initialized to 0 and incremented for APP_OSPI_FILE_WRITE_COUNT number of iterations. This value is read to check if the counter is actually incremented.
When fileWriteCounter matches the given APP_OSPI_FILE_WRITE_COUNT macro value, test result is passed otherwise failed.
Parameter | Value |
---|---|
CPU + OS | r5fss0-0 freertos |
r5fss0-0 nortos | |
Toolchain | ti-arm-clang |
Board | am64x-evm, am64x-sk |
Example folder | examples/drivers/ospi/ospi_flash_file_io |