User's Manual

F
drv
_
drv
_
drv
_
drv
_
drv
_
dr
v
drv
_
drv
_
drv
_
SPI
Pag
e
6.4
S
F
unction n
a
_
flash_init
_
flash_get
_
_
flash_get
_
_
flash_writ
e
_
flash_wai
t
v
_flash_wai
t
_
flash_writ
e
_
flash_sect
o
_
flash_pag
e
6.5
H
command
t
e
program
AI6
0
S
PI Fla
s
a
me
_
cache_add
r
_
base_add
r
e
_cmd
t
_spi_busy
t
_spi_statu
s
e
_enable
o
r_erase
e
_program
H
ow SP
t
ype Pro
c
Step
1
Set u
p
impl
e
In
R
E
R
E
Step
2
Step
3
kno
w
0
60
H
s
h Drive
r
s
_regsite
r
I
Flash
D
c
edures
1
:initializatio
n
p
register to l
e
e
mentation in
our impleme
n
E
G32(SPI_A
D
E
G32(SPI_A
D
2
:write comm
a
3
:trigger HW
t
w
many bytes
c
H
Us
e
-36-
r introd
u
Descriptio
To setup s
p
now only
s
1).read st
a
2).read st
a
3).write e
n
4).erase s
e
5).page pr
o
Get start a
in sram ra
n
Get start a
0x300-00
0
When all
c
This will t
r
Use this f
u
Use this f
u
SPI flash
n
program
m
Since IOT
only provi
This funct
i
would be
flash.
D
river
m
n
e
t HW know
t
drv_flash_in
t
n
tation. I allo
c
D
DR_CMD_
S
D
DR_DATAI
N
a
nd into au8s
p
t
o send com
m
c
ommand ne
e
e
r M
a
u
ction
n
p
i comman
d
s
etup follo
w
a
tus1
a
tus2
n
able
e
cto
r
o
gram
d
dress of 4
K
n
ge.
d
dress of s
p
0
0
c
ommand o
r
r
iggr HW t
o
u
nction to c
h
u
nction to c
h
n
eed to wri
t
m
ing data in
t
won’t hav
e
de sector(4
K
i
on is the
m
Copy data
m
ake us
e
t
he exact sra
m
t
():
c
ate two (256
+
S
RAM_ADD
R
N
_SRAM_A
D
p
i_cmd[0].
m
and.It means
e
d to be sent
o
a
nual
Copyrigh
d
related in
f
w
ing spi fla
s
K
B driver
c
p
i flash. In
c
r
data relat
e
o
send data
h
eck if our
h
eck if SPI
e this com
m
o spi flash.
e
large size
f
K
B) level e
m
ajor functi
o
to specific
e
of HW
m
address of s
p
+
4) byte buff
e
R
) = (unsigne
d
D
DR) = (unsi
g
you set up th
e
ut.
h
t@2016 A
f
ormation.
I
s
h comman
c
ache buffe
r
c
urrent tira
m
e
d informat
i
into spi bu
s
HW busy.
bus busy
m
and on sp
i
flash. In o
u
e
rase.
o
n to write
d
SRAM” ->
p
i command.
Y
e
rs.
d
int)(&au8s
p
g
ned int)(&a
u
e command l
e
c
SiP
I
n our driv
e
d
:
r
. It’s addre
s
m
isu syste
m
i
on being s
e
s
.
i
bus first b
e
u
r driver,we
d
ata. The fl
SPI bus->
S
Y
ou can see t
h
p
i_cmd[0]);
u
8spi_data[0])
e
ngth,thus H
W
e
r,we
s
s is
m
,it’s
e
tup.
e
fore
now
ow
S
PI
h
e
;
W
will