
TWRS08PT60LAB
TWR
‐
S08PT60
Lab
Guide
Page
8
of
11
10
Lab
7
—Flash and EEPROM demo
This lab will show how to use Flash and EEPROM typical operational commands: Erase Verify All Blocks,
Erase Verify Flash/EEPROM block, Erase Verify Flash/EEPROM section, Program EEPROM/Flash, Erase
EEPROM/Flash sector, Erase EEPROM/Flash block, Erase all blocks. Follow steps below to play with this
demo:
1.
Make sure the latest P&E OSBDM Virtual Serial Toolkit is installed. Please refer to TWR-S08PT60
Quick Start Guide for installation details
2.
Make sure the board is powered with USB connection and the S08PT60_Flash_Lab code is
downloaded into the board.
3.
Open P&E Terminal Utility, configure properties as below followed by clicking on
“
Open Serial Port
”
:
Port: USB COM; Baud: 9600; Parity: None; Bits: 8
4.
Press and release SW4 (RESET) button, the welcome message and the commands list will be
printed on Terminal.
5.
Enter
“
help
”
in the command line beginning with
“CMD>”.
The command list will be printed on
Terminal.
6.
Enter the command
“
ev_fb fc00
”
to erase verify (blank check) the whole flash block containing
address 0xfc00, where
“
fc00
”
is the address in hex in the flash block. The following message will be
shown as a result of the command:
“EraseVerify
flash
block
failed
(i.e.,
flash
is
not
blank)!”
. This is
correct because the flash block contains code that is running.
7.
Enter the command
“
ev_eep 3100
”
to erase verify (blank check) the whole EEPROM block
containing address 0x3100. The following message will be shown as a result of this command
:
“EraseVerify
EEPROM
block
success
(EEPROM
is
blank)!”
. This is correct because the EEPROM block
has not been programmed.
8.
Enter the command
“
ev_fs fc00 10
”
to erase verify (blank check) the flash section starting from
0xfc00 with size of 10 longwords. The following message will be shown as a result of the command:
“EraseVerify
flash
section
success
(flash
section
is
blank)!”
This is correct because this flash section has
not been programmed.
9.
Enter the command
“
ev_fs 3200 100
”
to erase verify (blank check) the flash section starting from
0x3200 with size of 100 longwords. The following message will be shown as a result of the
command:
“EraseVerify
flash
section
failed
(i.e.,
flash
section
is
not
blank)!”
This is correct because this
flash section has been programmed with the LAB code.
10.
Enter the command
“
ev_eeps 3100 100
”
to erase verify (blank check) the EEPROM section starting
from 0x3100 with size of 100 bytes. The following message will be shown as a result of the
command:
“EraseVerify
EEPROM
section
success
(EEPROM
section
is
blank)!”
This is correct because
this EEPROM section has not been programmed.
11.
Enter the command
“
ev_all
”
to erase verify (blank check) all blocks including the flash block and
EEPROM block. The following message will be shown as a result of the command:
“EraseVerify
all