Mikroelektronika d.o.o.
Flash Click Board
Flash Click Board
Couldn't load pickup availability
Introduce additional flash memory to your design with the Flash Click Board™. This small accessory board offers an easy and reliable solution for externally storing large amounts of data to be used in the project. The board features an EN25F80 8 megabit serial flash memory with uniform 4 Kbytes sector architecture. Designed for applications that need high performance and low power consumption, it supports clock frequency up to 75 MHz. EN25F80 module comes with software and hardware Write protection that enables the user to Write Protect all or portion of memory via software. The memory is divided into 16 sectors, each containing 256 pages; each page is 256 bytes wide. Flash Click Board™ communicates with the target board microcontroller through the SPI interface. The board is designed to use a 3.3V power supply only. The green LED diode denotes the power supply status.
The Flash Click Board™ is an ideal choice for a mass storage option in multimedia devices, drives, optical and printing devices.
![Mikroelektronika d.o.o. MIKROE-1199 Flash Click Board - The Debug Store UK](http://thedebugstore.com/cdn/shop/products/mikroelektronika-d-o-o-click-board-flash-click-board-30252615663805.jpg?v=1685017731&width=1445)
![Mikroelektronika d.o.o. MIKROE-1199 Flash Click Board - The Debug Store UK](http://thedebugstore.com/cdn/shop/products/mikroelektronika-d-o-o-click-board-flash-click-board-30252615270589.jpg?v=1685017737&width=1445)
![Mikroelektronika d.o.o. MIKROE-1199 Flash Click Board - The Debug Store UK](http://thedebugstore.com/cdn/shop/products/mikroelektronika-d-o-o-click-board-flash-click-board-28878049116349.jpg?v=1685097479&width=1445)
![Mikroelektronika d.o.o. MIKROE-1199 Flash Click Board - The Debug Store UK](http://thedebugstore.com/cdn/shop/products/mikroelektronika-d-o-o-click-board-flash-click-board-28878049181885.jpg?v=1685154357&width=1445)
The Flash Click Board™ contains 8,388,608 bits (8 Mbit) of Flash memory organized into 1,048,576 bytes (1 MB). In other words, the Flash 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. The flash memory IC used on this Click board™, features Serial Flash Discoverable Parameters (SFDP) mode, used to retrieve the advanced information from the device, such as the operating characteristics, structure and vendor specified information, memory size, operating voltage, timing information, and more.
Due to the high data transfer speed via the standard SPI interface, as well as the improved reliability of the stored information, the Flash Click Board™ can be used as a mass storage option in multimedia devices, data drives, non-volatile data storage in embedded applications, and similar applications that require reliable permanent storage of data blocks. Addition of 512 bytes of one-time programmable (OTP) memory can be useful for building secure storage devices and similar secure storage applications.
How Does The Flash Click Board™ Work?
The flash memory module used on the Flash Click Board™ is the EN25Q80B, an 8 Mbit serial flash memory with 4 KB Uniform Sector, from EON Silicon Solutions. The flash memory density is usually expressed in bits, so exactly 8,388,608 bits are organized in units of 8 bits (bytes), which gives 1,048,576 bytes of data memory. This memory module contains 256 sectors of 4 KB, each, as well as 16 blocks of 64 KB, each. Furthermore, the memory is organized in pages. One page holds 256 bytes and there are 4096 pages (4096 pages x 256 bytes = 1,048,576 bytes total). Having insight into how the memory cells are organized, is very important for understanding the Write and Erase operations. The SPI pins are routed to the mikroBUS™ so the interfacing with the microcontroller unit (MCU) is easy and straightforward. The EN25Q80B communication consists of sending the instruction from the host MCU, followed by either an address, data, or both.
Before attempting any write operations to the flash memory, the Write Enable bit (WEL) of the Status Register needs to be set to 1. This bit is automatically set to 0 after some instructions, as well as during the Write operation itself, preventing accidental damage to the memory content. There are special instructions used to set and clear the WEN bit of the Status Register. Usually, every write operation will be prefixed with the WREN instruction.
Page Program instruction allows up to 256 bytes to be written during one write cycle. After the initial command, three more address bytes are sent, followed by the data that needs to be written. It is possible to write less than 256 bytes, which will be written at the starting address, not affecting the rest of the data on the same page. After successful write cycle, the state of the Write in Progress (WIP) bit is set to 0 automatically, and the device is ready to accept another erase or write instruction. Therefore, the status register can be polled for the status of the WIP bit, in order to shorten the wait time for the next operation.
Data can be read by the Read Data Bytes instruction. This instruction is followed by an address, from which the data is shifted to the output register and read by the host MCU. The address increment is automatically executed, making it possible to read the entire memory by a single Read Data command. HIGH logic level on the chip select pin (CS) will terminate the operation.
An interesting fact is that Page Program instruction can only reset the bits to 0. Therefore, a segment of memory needs to be erased prior to programming, or in this case - filled with 1s (0xFF). The EN25Q80B IC allows erasure of one sector at a time (Sector Erase instruction, 0x20), half a block at a time (Half Block Erase instruction, 0x52), block at a time (Block Erase instruction, 0xD8), and the entire memory (using the Chip Erase instruction, 0x60). The same mechanism applies here too: polling the WIP bit helps to shorten the wait for the total time for the next operation.
A dedicated #WP write protect pin is used to put the device into the hardware write protect mode. This pin is routed to the RST pin of the mikroBUS™. A LOW logic level on this pin allows locking down of the Block Protect bits and the Status Register Protect (SRP) bit. Locking down the Status Register will block changes of the WEN bit, which is required for the Write and Erase operations, effectively preventing the memory content changes. The Write Protect disable (WPDIS) non-volatile bit is used to control the function of the #WP pin: if set to 1, the #WP pin function is disabled.
Besides working in SPI mode, the EN25Q80B IC is capable of working in Dual SPI and Quad SPI modes. There are special Dual and Quad SPI instructions, which utilize these two additional modes, allowing several times faster data transfer speeds. When using Quad SPI instructions, the SDI and SDO pins become DQ0 and DQ1, while the WP and HLD pins become DQ2 and DQ3, respectively. All other operations use the standard SPI interface with single output signal. Due to a small number of MCUs that support Dual and Quad SPI, MikroElektronika offers library functions which work only with the standard SPI communication, ensuring the absolute compatibility with all the supported MCUs.
There are 512 bytes of OTP memory, which can be used to store various security data. Once programmed, this memory can be permanently locked, without a possibility to reprogram it ever again. This feature utilizes the OTP_LOCK bit. Until this bit is 0, the OTP memory block can be freely programmed, just like any other block. When this bit is set to 1, this block won't be programmable anymore. Once set, the OTP_LOCK bit cannot be reset.
EN25Q80B features Serial Flash Discoverable Parameters (SFDP) mode. Host MCU can retrieve the operating characteristics, structure and vendor specified information such as identifying information, memory size, operating voltage and timing information of this device by sending the SFDP Read command (0x5A), followed by 3 bytes of address and one dummy byte. This will initiate a cyclic transfer from the SFDP memory table, which can be stopped at any moment by driving the chip select pin (CS) to a HIGH logic level.
For the detailed commands explanation and more in-depth information, please consult the included datasheet. However, MikroElektronika provides a library which contains functions that simplify and speed up working with this device. The provided application example demonstrates the functionality of the library functions. It can be used as a reference for a custom project development.
SPECIFICATIONS
Type | FLASH |
Applications | The Flash Click Board™ is a 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 |
Compatibility | mikroBUS |
Click board size | S (28.6 x 25.4 mm) |
Input Voltage | 3.3V |
PINOUT DIAGRAM
This table shows how the pinout of the Flash Click Board™ corresponds to the pinout on the mikroBUS™ socket (the latter shown in the two middle columns).
Notes | Pin | ![]() |
Pin | Notes | |||
---|---|---|---|---|---|---|---|
NC | 1 | AN | PWM | 16 | WP | Write Protect/QSPI D2 | |
Not Used/QSPI D3 | HLD | 2 | RST | INT | 15 | NC | |
Chip Select | CS | 3 | CS | RX | 14 | NC | |
SPI Clock | SCK | 4 | SCK | TX | 13 | NC | |
SPI Data OUT/QSPI D1 | SDO | 5 | MISO | SCL | 12 | NC | |
SPI Data IN/QSPI D0 | SDI | 6 | MOSI | SDA | 11 | NC | |
Power supply | +3.3V | 7 | 3.3V | 5V | 10 | NC | |
Ground | GND | 8 | GND | GND | 9 | GND | Ground |
ONBOARD SETTINGS AND INDICATORS
Label | Name | Default | Description |
---|---|---|---|
LD1 | PWR | - | Power LED indicator |
Software Support
We provide a library for Flash click on our LibStock page, as well as a demo application (example), developed using MikroElektronika compilers and mikroSDK. The provided click library is mikroSDK standard compliant. The demo application can run on all the main MikroElektronika development boards.
Key Functions
uint8_t flash_WriteArray(uint32_t address, uint8_t* pData, uint16_t nCount);
- The function writes data to successive addresses.void flash_ReadArray(uint32_t address, uint8_t* pData, uint16_t nCount)
- The function reads the data to successive addresses.
Example Description
The application is composed of three sections:
- System Initialization - CS GPIO and SPI module initialization.
- Application Initialization - Flash click driver and click initialization.
- Application Task - (code snippet) - Writing data to click memory and displaying the read data via UART.
void applicationTask() { flash_SectorErase(0x015015); mikrobus_logWrite("Writing MikroE to Flash memory, from address 0x015015:",_LOG_LINE); flash_WriteArray (0x015015, &wrData[0], 9); mikrobus_logWrite("Reading 9 bytes of Flash memory, from address 0x015015:",_LOG_LINE); flash_ReadArray (0x015015,&rdData[0],9); mikrobus_logWrite("Data read: ",_LOG_TEXT); mikrobus_logWrite(rdData,_LOG_LINE); Delay_ms(1000); }
The full application code, and ready to use libraries can be found on our Libstock page.
Other mikroE Libraries used in the example:
- SPI
- UART
Additional Notes and Information
Depending on the development board you are using, you may need a 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.
MIKROSDK
The Flash Click Board™ is supported by mikroSDK - MikroElektronika 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.
Flash Click Board
Frequently Asked Questions
Have a Question?
Be the first to ask a question about this.
![banner Image](http://thedebugstore.com/cdn/shopifycloud/shopify/assets/no-image-2048-5e88c1b20e087fb7bbe9a3771824e743c244f437e4f8ba93bbf7b11b53f7824c_medium.gif)