How does it work?
Flash Click is based on the EN25Q80B, a serial flash memory from EON Electric. The EN25Q80B features Serial Flash Discoverable Parameters (SFDP) mode, used to retrieve advanced information from the device, such as the operating characteristics, structure and vendor-specified information, memory size, operating voltage, timing information, and more. Page Program instruction allows up to 256 bytes to be written during one write cycle, although it is possible to write less than that. By automatically incrementing the addresses, it is possible to read the entire memory by a single command. The EN25Q80B allows the erasure of one sector at a time, half a block at a time, block at a time, and the entire memory. The addition of 512 bytes of one-time programmable (OTP) memory can be useful for building secure storage devices and similar secure storage applications.
Flash Click uses a standard 4-wire SPI serial interface to communicate with the host MCU, supporting Dual SPI and Quad SPI modes, which utilize these two additional modes, allowing faster data transfer speeds several times. There are additional WP for the write protect function and HLD pins. If using Quad SPI, the SDI and SDO become DQ0 and DQ1, while WP and HLD become DQ2 and DQ3, respectively. Due to a small number of MCUs that support Dual and Quad SPI, MIRKOE offers library functions that work only with standard SPI communication, ensuring absolute compatibility with all the supported MCUs.
This Click board™ can be operated only with a 3.3V logic voltage level. The board must perform appropriate logic voltage level conversion before using MCUs with different logic levels. However, the Click board™ comes equipped with a library containing functions and an example code that can be used as a reference for further development.
Specifications
Type
FLASH
Applications
Mass storage option in multimedia devices, data drives, non-volatile data storage in embedded applications, secure storage, and similar applications that require reliable permanent storage of digital information.
On-board modules
EN25Q80B, an 8 Mbit serial Flash memory with 4 KB Uniform Sector, from EON Silicon Solutions.
Key Features
High durability of 100,000 write cycles, data retention of 20 years, secure OTP memory block, high transfer speed, SFDP mode for easy retrieval of IC-specific information.
Interface
SPI
Feature
No ClickID
Compatibility
mikroBUS™
Click board size
S (28.6 x 25.4 mm)
Input Voltage
3.3V
Pinout diagram
This table shows how the pinout on Flash click corresponds to the pinout on the mikroBUS™ socket (the latter shown in the two middle columns).
Onboard settings and indicators
Label | Name | Default | Description |
---|---|---|---|
LD1 | PWR | – | Power LED indicator |
Flash Click electrical specifications
Description | Min | Typ | Max | Unit |
---|---|---|---|---|
Supply Voltage | – | 3.3 | – | V |
Memory Size | – | – | 8 | Mbit |
Write Endurance | 100k | – | – | cycles |
Data Retention | 20 | – | – | Years |
Software Support
We provide a library for the Flash Click as well as a demo application (example), developed using MIKROE compilers. The demo can run on all the main MIKROE development boards.
Package can be downloaded/installed directly from NECTO Studio Package Manager(recommended), downloaded from our LibStock™ or found on Mikroe github account.
Library Description
This library contains API for Flash Click driver.
Key functions
-
Page Write function.
-
Page Read function.
-
Sector Erase function.
Example Description
This example demonstrates the use (control) of the FLASH memory.
void application_task( void )
{
enter_data( "Mikroelektronika (MikroE)" );
log_printf( &logger, "> Data content to be written: %srn", data_buf );
log_printf( &logger, "> Data writing to memory...rn" );
flash_write_page( &flash, FLASH_MEM_ADDR_FIRST_PAGE_START, data_buf, n_data );
log_printf( &logger, "> Done.rn" );
memset( data_buf, 0, sizeof( data_buf ) );
process_wait( );
log_printf( &logger, "> Data reading from memory...rn" );
flash_read_page( &flash, FLASH_MEM_ADDR_FIRST_PAGE_START, data_buf, n_data );
log_printf( &logger, "> Done.rn> Read data content: %srn", data_buf );
process_wait( );
log_printf( &logger, "> Sector erasing...rn" );
flash_erase_sector( &flash, FLASH_MEM_ADDR_FIRST_SECTOR_START );
log_printf( &logger, "> Done.rn" );
process_wait( );
}
The full application code, and ready to use projects can be installed directly from NECTO Studio Package Manager(recommended), downloaded from our LibStock™ or found on Mikroe github account.
Other Mikroe Libraries used in the example:
- MikroSDK.Board
- MikroSDK.Log
- Click.Flash
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. UART terminal is available in all MIKROE compilers.
mikroSDK
This Click board™ is supported with mikroSDK – MIKROE Software Development Kit. To ensure proper operation of mikroSDK compliant Click board™ demo applications, mikroSDK should be downloaded from the LibStock and installed for the compiler you are using.
For more information about mikroSDK, visit the official page.