flash 2.0.0.0
|
Flash Click is 8,388,608 bits (8 Mbit) on a Click board, organized into 1,048,576 bytes (1 MB). In other words, this Click board is a Flash memory medium with the capacity of 1 MB. The used Flash module has very good endurance and it can withstand up to 100,000 write cycles, with the data retention period of about 20 years.
We provide a library for the Flash Click as well as a demo application (example), developed using MikroElektronika compilers. The demo can run on all the main MikroElektronika development boards.
Package can be downloaded/installed directly form compilers IDE(recommended way), or downloaded from our LibStock, or found on mikroE github account.
This library contains API for Flash Click driver.
- Click Initialization function.
flash_err_t flash_init( flash_t *ctx, flash_cfg_t *cfg );
- Page Read function.flash_err_t flash_write_page( flash_t *ctx, uint32_t mem_addr, spi_master_data_t *data_tx, uint16_t n_data );
flash_err_t flash_read_page( flash_t *ctx, uint32_t mem_addr, spi_master_data_t *data_rx, uint16_t n_data );
flash_err_t flash_erase_sector( flash_t *ctx, uint32_t mem_addr );
This example demonstrates the use (control) of the FLASH memory.
The demo application is composed of two sections :
Initializes all necessary peripherals and pins used by Flash click and also initializes uart logger to show results.
Executes memory data writing, reading from the memory to verify data writing operation and sector erasing to clear memory.
- Enter Data / Allows user to enter a desired data.
- Process Wait / Makes a delay to wait while some process be done.
The full application code, and ready to use projects can be installed directly form compilers IDE(recommneded) or found on LibStock page or mikroE GitHub accaunt.
Other mikroE Libraries used in the example:
Additional notes and informations
Depending on the development board you are using, you may need USB UART click, USB UART 2 Click or RS232 Click to connect to your PC, for development systems with no UART to USB interface available on the board. The terminal available in all Mikroelektronika compilers, or any other terminal application of your choice, can be used to read the message.