User`s guide

Flash memory is a non-volatile storage chip that
can be electrically erased and reprogrammed. It
was developed from EEPROM (electrically erasable
programmable read-only memory) and must be
erased in fairly large blocks before these can be
rewritten with new data. The high density NAND type
must also be programmed and read in (smaller) blocks,
or pages, while the NOR type allows a single machine
word (byte) to be written or read independently. Flash
memories come in dierent sizes and supporting dierent
clock speeds. They are mostly used for mass storage, as in
USB Flash Drives, which are very popular today.
EasyMx PRO
v7 features M25P80 serial Serial Flash Memory which
uses SPI communication interface and has 8 Mbits of available memory,
organized as 16 sectors, each containing 256 pages. Each page is 256 bytes
wide. Thus, the whole memory can be viewed as consisting of 4096 pages, or
1,048,576 bytes. Maximum clock frequency for READ instructions is 40MHz.
other modules
page 36
Serial Flash Memory
In order to connect Serial Flash Memory to
the microcontroller you must enable SW13.1,
SW13.2, SW13.3 and SW13.6 switches, as
shown on Figure 22-2. This connects SPI lines to
PA5 (MOSI), PA4 (MISO), PA2 (SCK) and PC7 (CS)
microcontroller pins. Prior to using Serial Flash in
your application, make sure to disconnect other
peripherals, LEDs and additional pull-up or pull-
down resistors from the communication lines
that could interfere with data signals and cause
data corruption.
The Serial Peripheral Interface Bus or SPI bus is a synchronous serial data link standard that operates in full
duplex mode. It consists of four lines MISO (Master Input Slave Output), MOSI (Master Output Slave Input), SCK
(Clock) and CS (Chip Select). Devices communicate in master/slave mode where the master device initiates the
data frame. Multiple slave devices are allowed with individual slave select (chip select) lines.
Enabling Serial Flash
What is SPI?
Figure 22-2:
Activate
SW13.1,
SW13.2,
SW13.3 and
SW13.6 in
order to use
Serial Flash
Memory
Figure 22-1:
Schematics of
Serial Flash
Memory
module
EasyMx PRO
v7
C26
100nF
VCC-3.3V
1
2
3
5 4
6
7
8
CS
SDO
WP
GNDSDI
SCK
HOLD
VCC
U5
25P80
VCC-3.3V
R35
100K
FLASH-CS#
SPI-MISO
R36 27
VCC-3.3V
O
N
SW13
FLASH-CS#
SPI-MOSI
SPI-MISO
SPI-SCK
PA2
PA4
PA5
PC7
1 2 3 4 5
6
7 8
DATA BUS