How does it work?
Flash 12 Click is based on the AT25EU0041A, a 4Mbit serial flash memory from Renesas, known for its ultra-low power consumption. This memory is part of a series specifically developed for applications operating on the IoT network’s fringes, where energy efficiency is paramount. The AT25EU0041A is particularly well-suited for battery-operated systems, offering a reliable solution for both program code storage, which is then loaded into embedded systems, and serving as external RAM for direct program execution from the NOR Flash memory. Based on these features, this Click board™ is ideal for various applications from low-power reading and rapid erasure to boot/code shadow memory and straightforward event/data logging.
The AT25EU0041A sets a new standard in energy efficiency through its innovative erase architecture, which features short erase times while maintaining low power consumption across all operations, including reading, programming, and erasing. The consistent erase times, irrespective of the memory block size, and a page-erase capability that allows for as little as 256 bytes to be erased enhance the efficiency of write operations. Moreover, the AT25EU0041A adheres to the JEDEC standard for manufacturer and device identification, and it includes a 128-bit unique serial number, further enhancing its utility and security features.
Flash 12 Click communicates with MCU through a standard SPI interface supporting the two most common SPI modes, SPI Mode 0 and 3, and a maximum clock frequency of up to 108MHz. The AT25EU0041A enhances data transfer rates through Dual and Quad SPI operations, which double and quadruple the standard SPI speed, respectively. These enhanced speeds are achieved by re-purposing the SI and SO pins as bidirectional I/O pins during Dual and Quad SPI operations.
Furthermore, the board features a HOLD function, marked as HLD and routed on the default position of the INT pin of the mikroBUS™ socket. The hold function allows the suspension of serial communications without disrupting ongoing operations. The board also has a Write Protect feature, marked as WP and routed on the default position of the PWM of the mikroBUS™ socket, that safeguards all registers and memory from unintended write operations through both hardware and software mechanisms.
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. Also, it 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
Ideal for developers working on the next generation of IoT devices requiring low-power read capabilities, fast erase times, boot/code shadow memory, and event/data logging
On-board modules
AT25EU0041A – 4Mbit serial flash memory from Renesas
Key Features
4Mbit memory capacity, SPI compatible (Dual and Quad operation), ultra-low power consumption, erase architecture, security features, write protection, communication pause feature, and more
Interface
QSPI,SPI
Feature
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 12 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 12 Click electrical specifications
Description | Min | Typ | Max | Unit |
---|---|---|---|---|
Supply Voltage | – | 3.3 | – | V |
Memory Size | – | – | 4 | Mbit |
Memory Organization | 512K x 8 | |||
Write Endurance | 100k | – | – | Cycles |
Data Retention | 20 | – | – | Years |
Software Support
We provide a library for the Flash 12 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 12 Click driver.
Key functions
-
flash12_memory_write
This function writes a desired number of data bytes starting to the selected memory address by using SPI serial interface. -
flash12_memory_read
This function reads a desired number of data bytes starting from the selected memory address by using SPI serial interface. -
flash12_erase_memory
This function erases the selected amount of memory which contains the selected address.
Example Description
This example demonstrates the use of Flash 12 click board by writing specified data to the memory and reading it back.
void application_task ( void )
{
uint8_t data_buf[ 128 ] = { 0 };
log_printf( &logger, " Memory address: 0x%.6LXrn", ( uint32_t ) STARTING_ADDRESS );
if ( FLASH12_OK == flash12_erase_memory( &flash12, FLASH12_CMD_BLOCK_ERASE_4KB, STARTING_ADDRESS ) )
{
log_printf( &logger, " Erase memory block (4KB)rn" );
}
memcpy( data_buf, DEMO_TEXT_MESSAGE_1, strlen( DEMO_TEXT_MESSAGE_1 ) );
if ( FLASH12_OK == flash12_memory_write( &flash12, STARTING_ADDRESS,
data_buf,
sizeof( data_buf ) ) )
{
log_printf( &logger, " Write data: %srn", data_buf );
Delay_ms( 100 );
}
memset( data_buf, 0, sizeof( data_buf ) );
if ( FLASH12_OK == flash12_memory_read( &flash12, STARTING_ADDRESS,
data_buf,
sizeof( data_buf ) ) )
{
log_printf( &logger, " Read data: %srnn", data_buf );
Delay_ms( 3000 );
}
log_printf( &logger, " Memory address: 0x%.6LXrn", ( uint32_t ) STARTING_ADDRESS );
if ( FLASH12_OK == flash12_erase_memory( &flash12, FLASH12_CMD_BLOCK_ERASE_4KB, STARTING_ADDRESS ) )
{
log_printf( &logger, " Erase memory block (4KB)rn" );
}
memcpy( data_buf, DEMO_TEXT_MESSAGE_2, strlen( DEMO_TEXT_MESSAGE_2 ) );
if ( FLASH12_OK == flash12_memory_write( &flash12, STARTING_ADDRESS,
data_buf, sizeof( data_buf ) ) )
{
log_printf( &logger, " Write data: %srn", data_buf );
Delay_ms( 100 );
}
memset( data_buf, 0, sizeof ( data_buf ) );
if ( FLASH12_OK == flash12_memory_read( &flash12, STARTING_ADDRESS,
data_buf, sizeof ( data_buf ) ) )
{
log_printf( &logger, " Read data: %srnn", data_buf );
Delay_ms( 3000 );
}
}
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.Flash12
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.