MAX3267X LittleFS demo
|
Flash Control Mass Erase & Write 32-bit enabled mode Example. More...
#include <stdio.h>
#include <string.h>
#include <stdint.h>
#include "mxc_assert.h"
#include "mxc_device.h"
#include "flc.h"
#include "flash.h"
#include "littlefs/lfs.h"
Macros | |
#define | APP_PAGE_CNT 8 |
Flash memory blocks reserved for the app code. More... | |
#define | APP_SIZE (MXC_FLASH_PAGE_SIZE*APP_PAGE_CNT) |
The app code flash memory area size. More... | |
#define | TESTSIZE (MXC_FLASH_PAGE_SIZE) |
8 pages of 32 bit samples More... | |
#define | TOTAL_FLASH_PAGES (MXC_FLASH_MEM_SIZE / MXC_FLASH_PAGE_SIZE) |
Flash memory blocks reserved for internal storage. More... | |
#define | FLASH_STORAGE_START_PAGE 8 |
Internal storage first flash memory block. More... | |
#define | FLASH_STORAGE_PAGE_CNT 8 |
Flash memory blocks reserved for the internal storage. More... | |
#define | FLASH_STORAGE_START_ADDR MXC_FLASH_PAGE_ADDR(FLASH_STORAGE_START_PAGE) |
Internal storage start address. More... | |
#define | FLASH_STORAGE_SIZE FLASH_STORAGE_PAGE_CNT * MXC_FLASH_PAGE_SIZE |
Internal storage size. More... | |
#define | FULL_WRITE_TEST 0 |
#define | FULL_READ_TEST 0 |
Functions | |
int | main (void) |
Application entry point. More... | |
Variables | |
uint32_t | testdata [TESTSIZE] |
Test data buffer. More... | |
lfs_t | lfs |
File system instance. More... | |
uint32_t | start_block = FLASH_STORAGE_START_PAGE |
Internal memory start block to be passed to flash functions by littlefs. More... | |
const struct lfs_config | cfg |
Flash Control Mass Erase & Write 32-bit enabled mode Example.
This example shows how to mass erase the flash using the library and also how to Write and Verify 4 Words to the flash.
#define APP_PAGE_CNT 8 |
Flash memory blocks reserved for the app code.
#define APP_SIZE (MXC_FLASH_PAGE_SIZE*APP_PAGE_CNT) |
The app code flash memory area size.
#define FLASH_STORAGE_PAGE_CNT 8 |
Flash memory blocks reserved for the internal storage.
#define FLASH_STORAGE_SIZE FLASH_STORAGE_PAGE_CNT * MXC_FLASH_PAGE_SIZE |
Internal storage size.
#define FLASH_STORAGE_START_ADDR MXC_FLASH_PAGE_ADDR(FLASH_STORAGE_START_PAGE) |
Internal storage start address.
#define FLASH_STORAGE_START_PAGE 8 |
Internal storage first flash memory block.
#define FULL_READ_TEST 0 |
#define FULL_WRITE_TEST 0 |
#define TESTSIZE (MXC_FLASH_PAGE_SIZE) |
8 pages of 32 bit samples
#define TOTAL_FLASH_PAGES (MXC_FLASH_MEM_SIZE / MXC_FLASH_PAGE_SIZE) |
Flash memory blocks reserved for internal storage.
int main | ( | void | ) |
Application entry point.
const struct lfs_config cfg |
uint32_t start_block = FLASH_STORAGE_START_PAGE |
Internal memory start block to be passed to flash functions by littlefs.
uint32_t testdata[TESTSIZE] |
Test data buffer.