02.03.2014 Views

BSP Developer's Guide

BSP Developer's Guide

BSP Developer's Guide

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

J<br />

<strong>BSP</strong> Validation Test Suite Reference Entries<br />

Tests PASSED 2<br />

Tests FAILED 0<br />

Tests SKIPPED 0<br />

SEE ALSO<br />

bspVal.sh, networkLib.tcl, pkLib.c<br />

nvRam<br />

NAME<br />

SYNOPSIS<br />

DESCRIPTION<br />

nvRam – non-volatile RAM tests<br />

bspVal options nvRam<br />

This test verifies sysNvRamGet( ) and sysNvRamSet( ), the sysLib.c routines that<br />

manipulate non-volatile memory. See bspVal.sh for an explanation of options.<br />

NOTE: This reference entry lists the most likely reasons for a test’s failure. However, it<br />

does not list all possible reasons.<br />

On targets without non-volatile RAM, NV_RAM_SIZE should be set to NONE (-1) in the<br />

<strong>BSP</strong>. On such boards, only parameter checking of sysNvRamSet( ) and sysNvRamGet( )<br />

is performed. If only a portion of NVRAM is writable, or some amount is reserved for<br />

hardware operations, be sure to specify the writable size with the<br />

NV_RAM_SIZE_WRITEABLE macro in config.h.<br />

The execution time of the tests run by this script is dependent on the size of NVRAM<br />

being tested and the CPU speed. The entire test script should not take more than a few<br />

minutes to run to completion.<br />

This script merely calls pkTestNvRam( ) eight times to perform different non-volatile<br />

RAM functionality tests.<br />

The first test verifies the operation of a sysNvRamGet( ) read of NV_RAM_SIZE bytes. If<br />

this test fails, check that NV_RAM_SIZE is set to the size of NVRAM and that<br />

NV_BOOT_OFFSET is defined and used properly. Also check that sysNvRamGet( ) is<br />

copying the entire length requested from NVRAM into the passed-in buffer.<br />

The second test reads, writes, and reads NV_RAM_SIZE bytes of NVRAM to check<br />

sysNvRamSet( ) functionality. If this test fails, check the same problem areas as the first<br />

test. Also check that sysNvRamSet( ) is copying the entire length requested from the<br />

passed-in buffer into NVRAM.<br />

The third test checks the operation of a sysNvRamGet( ) read of zero bytes. If this test<br />

fails, check that reads of zero length are allowed by sysNvRamGet( ). The buffer should<br />

be properly terminated with EOS, and the routine should return OK.<br />

J<br />

387

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!