How does it work?
Flash 9 Click as its foundation uses the W25Q02JV, a highly reliable serial Flash memory solution offering flexibility and performance well beyond ordinary Serial Flash devices from Winbond Electronics. The W25Q02JV represents a four 512Mb stack die where only one can be active at any given time to communicate with the external SPI controller. It supports linear addressing for the full 2Gb memory address range (continuously-read accessible only into four separate 512Mb address memory segments). The W25Q02JV array is organized into 1,048,576 programmable pages of 256-bytes each, where up to 256 bytes can be programmed at a time.
Pages of the W25Q02JV can be erased in groups of 16 (4KB sector erase), groups of 128 (32KB block erase), groups of 256 (64KB block erase), or the entire chip (chip erase). This IC has 32,768 erasable 4KB sectors and 2,048 erasable 64KB blocks, respectively. The small 4KB sectors allow for greater flexibility in applications that require data and parameter storage. Also, it specifies a minimum of 100.000 endurance cycles with data retention of a minimum of 20 years, which gives the W25Q02JV the capability to handle unlimited reads/writes to the memory.
Flash 9 Click communicates with MCU through a standard SPI interface that enables high clock speed, supporting the two most common SPI modes, SPI Mode 0 and 3. Alongside the internal software Reset sequence, this board also has an active-low reset signal routed on the RST pin of the mikroBUS™ socket used to reset the W25Q02JV to the initial power-on state. When this signal is asserted low, any ongoing program/erase operation will be interrupted, and data corruption may happen (the device will not accept any command input).
An additional feature of this Click board™ represents the configurable Write Protection function labeled as WP routed on the AN pin of the mikroBUS™ socket. The WP pin protects the entire memory and all registers from write operations and must be set to a low logic state to inhibit all the write operations. Besides, the Flash 9 Click also has an additional hold pin, labeled as HLD and routed to the PWM pin of the mikroBUS™ socket, allowing the device to be paused while it’s still actively selected.
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
Can be used to provide a storage solution for limited space and power systems in various embedded applications
On-board modules
W25Q02JV – SPI configurable serial Flash memory solution from Winbond Electronics
Key Features
High performance, low power consumption, reliability, flexible architecture with 4KB sectors, advanced security features, data retention, and more.
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 9 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 9 Click electrical specifications
Description | Min | Typ | Max | Unit |
---|---|---|---|---|
Supply Voltage | – | 3.3 | – | V |
Memory Size | – | – | 2 | Gbit |
Write Endurance | 100.000 | – | – | cycles |
Write Endurance | 20 | – | – | years |
Operating Temperature Range | -40 | +25 | +85 | °C |
Software Support
We provide a library for the Flash 9 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 from NECTO Studio Package Manager(recommended way), downloaded from our LibStock™ or found on Mikroe github account.
Library Description
This library contains API for Flash 9 Click driver.
Key functions
-
flash9_erase_memory
This function erases the selected amount of memory which contains the selected address. -
flash9_memory_write
This function writes a desired number of data bytes to the memory starting from the selected address. -
flash9_memory_read_fast
This function reads a desired number of data bytes from the memory starting from the selected address performing the fast read command.
Example Description
This example demonstrates the use of Flash 9 Click board™ by writing specified data to the memory and reading it back.
void application_task ( void )
{
uint8_t data_buf[ 128 ] = { 0 };
if ( FLASH9_OK == flash9_erase_memory ( &flash9, FLASH9_CMD_SECTOR_ERASE_WITH_4BYTE_ADDRESS,
STARTING_ADDRESS ) )
{
log_printf ( &logger, "Sector from address 0x%.8LX has been erased!rn", STARTING_ADDRESS );
}
Delay_ms ( 500 );
if ( FLASH9_OK == flash9_memory_write ( &flash9, STARTING_ADDRESS, DEMO_TEXT_MESSAGE,
strlen ( DEMO_TEXT_MESSAGE ) ) )
{
log_printf ( &logger, "Data written to address 0x%.8LX: "%s"rn", STARTING_ADDRESS,
( char * ) DEMO_TEXT_MESSAGE );
}
Delay_ms ( 500 );
if ( FLASH9_OK == flash9_memory_read_fast ( &flash9, STARTING_ADDRESS, data_buf,
strlen ( DEMO_TEXT_MESSAGE ) ) )
{
log_printf ( &logger, "Data read from address 0x%.8LX: "%s"rnn", STARTING_ADDRESS,
data_buf );
}
Delay_ms ( 2000 );
}
The full application code, and ready to use projects can be installed directly from NECTO Studio Package Manager(recommended way), downloaded from our LibStock™ or found on Mikroe github account.
Other Mikroe Libraries used in the example:
- MikroSDK.Board
- MikroSDK.Log
- Click.Flash9
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 MikroElektronika compilers.
mikroSDK
This Click board™ is supported with 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.
For more information about mikroSDK, visit the official page.