MIKROE-2267

Flash 2 click
Flash 2 click
IC/Module Microchip SST26VF064B
(http://ww1.microchip.com/downloads/en/DeviceDoc/20005119G.pdf)
Interface SPI (MISO, MOSI, SCK), CS, #HOLD
Power
supply
3.3V
Website www.mikroe.com/click/flash-2 (http://www.mikroe.com/click/flash-2)
Schematic also available in PDF (http://cdn-
docs.mikroe.com/images/9/96/Schematic-
Flash_2_click_v100.pdf)
1
2
3
4
5
6
7
8
9
1
0
1
1
1
2
1
3
1
4
1
5
1
6
1
7
1
8
1
9
2
0
2
1
2
2
2
3
2
4
2
5
2
6
2
7
2
8
2
9
3
0
Flash 2 click
From MikroElektonika Documentation
Flash 2 click carries Microchip’s SST26VF064B flash-memory module with 8
MB capacity. It’s a highly reliable module with a specified minimum of 100,000
write cycles and with over 100 years of Data Retention. For data security, the
module features a One-Time Programmable (OTP) 2 KB bit secure ID and a 64 bit
unique, factory pre-programmed identifier. Additional software security measures
include inidividual-block write Protection with permanent lock-down capability.
Flash 2 click communicates with the target MCU through the mikroBUS™ SPI
interface (CS#, SCK, MISO, MOSI) with additional functionality provided by the
#HOLD pin (in place of default mikroBUS™ RST pin). The board is designed to
use a 3.3V power supply.
Features and usage notes
The SST26VF064B/064BA
memory array is organized in
uniform, 4 KByte erasable
sectors with the following
erasable blocks:
- Eight 8 KB parameter
- Two 32 KByte overlay
- One-hundred twenty-six 64
KByte overlay blocks
The #HOLD pin temporarily
stops serial communication
with the SPI Flash memory
while the device is selected. This pin only works in SPI, single-bit and dual-bit Read mode and must be tied
high when not in use.
The manufacturer's data sheet has more information about the memory protection features of the chip:
"SST26VF064B/064BA offers flexible memory protection scheme that allows the protection state of each individual block to be controlled separately. In
addition, the Write-Protection Lock-Down register prevents any change of the lock status during device operation. To avoid inadvertent writes during power-up,
the device is write-protected by default after a power-on reset cycle. A Global Block Protection Unlock command offers a single command cycle that unlocks the
entire memory array for faster manufacturing throughput."
Programming
This snippet initializes all necessary pins and functions for using Flash 2 Click, and performs a test by writing test values to the click, and then reading them
back to the user through UART communication.
#include <stdint.h>
#include "flash_2_hw.h"
sbit FLASH_2_WP at GPIOA_ODR.B0;
sbit FLASH_2_CS at GPIOD_ODR.B13;
sbit FLASH_2_HLD at GPIOC_ODR.B2;
int main(void)
{
uint8_t buffer[4] = {15,20,25,30};
uint16_t count =4;
uint32_t address = 0x0100F0;
uint8_t receive_buffer[4];
char tmp[20];
GPIO_Digital_Output( &GPIOA_BASE, _GPIO_PINMASK_0 );
GPIO_Digital_Output( &GPIOC_BASE, _GPIO_PINMASK_2 );
GPIO_Digital_Output( &GPIOD_BASE, _GPIO_PINMASK_13 );
SPI1_Init_Advanced( _SPI_FPCLK_DIV64,
_SPI_MASTER | _SPI_8_BIT | _SPI_CLK_IDLE_LOW |
_SPI_FIRST_CLK_EDGE_TRANSITION | _SPI_MSB_FIRST |
_SPI_SS_DISABLE | _SPI_SSM_ENABLE |
_SPI_SSI_1,
&_GPIO_MODULE_SPI3_PC10_11_12 );
Delay_ms(300);
UART1_Init(9600);
Page 1 of 2
3
1
3
2
3
3
3
4
3
5
3
6
3
7
3
8
3
9
4
0
4
1
4
2
4
3
4
4
4
5
4
6
4
7
4
8
4
9
5
0
5
1
5
2
5
3
5
4
5
5
5
6
5
7
5
8
5
9
6
0
Delay_ms(300);
UART1_Write_Text( "Initializing Flash 2 click... " );
UART1_Write_Text( "\r\n" );
flash_2_init();
Delay_ms(300);
flash_2_global_block_unlock();
Delay_ms(400);
flash_2_write( address, buffer, count );
flash_2_read( address, receive_buffer, count );
UART1_Write_Text( "Initial Values: " );
while( count-- )
{
ByteToStr( buffer[count], tmp );
UART1_Write_Text( tmp );
}
UART1_Write_Text( "\r\n" );
count =4;
UART1_Write_Text( "Received Values: " );
while( count -- )
{
ByteToStr( receive_buffer[count], tmp );
UART1_Write_Text( tmp );
}
UART1_Write_Text( "\r\n" );
return;
}
Code examples that demonstrate the usage of Flash 2 click with MikroElektronika hardware, written for mikroC for ARM, AVR, dsPIC, FT90x, PIC and PIC32
are available on Libstock (http://libstock.mikroe.com/projects/view/1785/flash-2-click).
Resources
- Microchip SST26VF064B data sheet (http://ww1.microchip.com/downloads/en/DeviceDoc/20005119G.pdf)
- Flash 2 click examples on Libstock (http://libstock.mikroe.com/projects/view/1785/flash-2-click)
- This NAND, NOR that NAND (http://learn.mikroe.com/this-nand-nor-that-nand/), artile about Flash 2 click on learn.mikroe.com
- mikroBUS standard specifications (http://download.mikroe.com/documents/standards/mikrobus/mikrobus-standard-specification-v200.pdf)
Retrieved from "http://docs.mikroe.com/index.php?title=Flash_2_click&oldid=315"
This page was last modified on 18 May 2016, at 19:43.
Content is available under Creative Commons Attribution unless otherwise noted.
Page 2 of 2
6
/
15
/
201
6
http://docs.mikroe.com/index.php?title=Flash_2_click&printable=yes

MIKROE-2267

Mfr. #:
Manufacturer:
Mikroe
Description:
Memory IC Development Tools Flash 2 click
Lifecycle:
New from this manufacturer.
Delivery:
DHL FedEx Ups TNT EMS
Payment:
T/T Paypal Visa MoneyGram Western Union

Products related to this Datasheet