beautypg.com

8 ppc_flash_rw, Ppc_flash_rw - 20, Diagnostics running on the carrier at8402 – Kontron AT8402 Diagnostics Manual User Manual

Page 28

background image

Diagnostics running on the Carrier

AT8402

Page 2 - 20

AT8402 CLI Reference Manual

Description

This tests reads all images and data stored on the on-board flash and checks the

embedded checksums.

Failure impact

PPC-00060007 diagnostic code results from an flash read error. The impact is loss
of applications running on carrier host processor if the active images and/or config-
urations are corrupted. This impacts at least Ethernet functionality and command
line interface.

2.7.8

PPC_FLASH_RW

Flash read/write test. This test can be run automatically. The test script is executed on

the SUT.
Test group:

Diagnostics

Test case:

ppc

Test procedure: PPC_FLASH_RW
Test host:

Carrier

Test IC:

full

Test mode:

destructive

Diagnostic code: PPC-00060008

Description

This test is used to check if the flash is attached properly to the PPC405 external bus

controller. Similar to SDRAM tests, a data and address bus check is performed. It has

been taken into concern, that single flash bits can only be changed from ‘1’ to ‘0’ and

that changing a flash bit from ‘0’ to ‘1’ requires erasing of a complete flash sector (all

bits in this sector are changed from ‘0’ to ‘1’.

The test uses the ppc-flash utility which is based on the linux MTD layer and is thus

running from linux user space. The utility provides 4 basic modes to test flash sectors:

erase: This mode allows erasing flash sectors in a given MTD partition. To erase

sectors, ppc-flash is called with the following syntax:

ppc-flash erase MTD-DEV startaddr endaddr

fill: This mode allows writing a testpattern into the sectors of a given MTD partition. It

is important to note that the flash sector is checked to be erased before writing the

testpattern. This way can ensure, that address errors are detected because the resulting

overlapping address ranges will lead to sectors already written during filling procedure.

The syntax to fill sectors is the same as for erasing:

ppc-flash fill MTD-DEV startaddr endaddr

compare: This mode allows comparing the sector contents of a given MTD partition

with the testpattern written before. The syntax is as follows:

ppc-flash comp MTD-DEV startaddr endaddr

test: This mode allows testing if the flash sectors of a given MTD partition are empty

or not. Syntax is the same as for compare:

ppc-flash test MTD-DEV startaddr endaddr