Buy(Cart) Contact NSDSP Home

nsread - Low Level Memory Reading Utility

nsread is a command line utility which uses low level NSDSP interface to read memory from a chip. Because it uses low level interfaces, it often can be used where nsprog fails. It also can read reserved memory areas, such as configuration memory or executive memory.

nsread writes the data to the standard output and can use a number of formats.

You can use the following parameters

Parameter Description
from Mandatory. Must be the first paramter. The beginning of the range. nsread does no verify whether the memory range is readable or even if it exists. If an incorrect range is specified reading errors may occur.
to Mandatory. Must be the second paramter. The end of the range. This address is not included into the range.
 
Instead of from and to, you can specify a special memory region - one of eeprom, uid, otp, or config
-s serial Specifies the serial number of the NSDSP chip. This lets you select a particular NSDSP when several ones are connected. This parameter is optional. If not specified, NSDSP will be selected randomly. You can use nsenum to display the list of serial numbers of the NSDSPs connected to the computer.
-d device Full name of the target defice, for example dsPIC30F1010. Mandatory.
-r rate The maximum allowed rate of communucations between NSDSP and target device in kHz. Must be between 50 and 6000. Default is 6000kHz. Lower values may result in more reliable communications.
-a Use AMCLR pin instead of MCLR. For this option to work, the NSDSP must be configured to use PGM/RTS/AMCLR pin as AMCLR.
-t voltage Target voltage between 1.5 and 5.5V. Not used. Added for compatibility with other utilities.
-h High voltage programming. Requires an HVP capable programmer, NSHVX or a external high voltage circuit.
-n core Specifies the core to read for multi-core devices such as dsPIC33CH. "0" specifies master (default), "1" specifies S1 slave. Note that slave memory is volatile and is lost at every power cycle.
-f format Output format. See the table below for the list of the formats.
-k Keep the target in reset. The NSDSP programmer will be left in programming mode keeping the device in reset. Some devices may run for a short period of time before being reset.

The following formats are recognized:

Format Description
std Human readable. Combination of hex and ascii output.
hex HEX file format. Outputs a hex file which can be programmed back onto the target device.
b4 Binary. Four bytes per instruction.
b2 Binary. Two bytes per instruction (truncated if needed).
b1 Binary. One byte per instruction (truncated).
asm Disassembly.
mips32 Same as asm, but when used on PIC32 which support both MIPS32 and microMIPS instructions, forces MIPS32. Otherwise, the instruction set is determined by the BOOTISA configuration bit.
mmips Same as asm, but when used on PIC32 which support both MIPS32 and microMIPS instructions, forces microMIPS. Otherwise, the instruction set is determined by the BOOTISA configuration bit.
mmipsh Same as mmips, but skips first 2 bytes of data. This may be necessary because nsread can only read whole instruction words, but microMIPS instruction may start in the middle of the word.

Exit Code

If successful, nsread returns with exit code 0. If an error occurs, nsread prints an error message, which always starts from "ERROR:" and returns with exit code 1.

Examples

nsread 1d000000 1d000010 -dPIC32MZ1024EFG100

This example reads first 16 bytes (4 instructions) of program memory from the specified PIC32 device and displays the result in human readable format.

nsread f000 f100 -d PIC16F1939 -f b1 > eeprom.bin

This example reads the entire EEPROM from the specified PIC16 device and stores it in the "eeprom.bin" file. Note the use of b1 format. The length of the file will be 256 bytes.

nsread uid -d PIC18F1330

This example reads the entire user id area (8 bytes) from the PIC18 device.

Northern Software Home NSDSP Contact Us Purchase/Vew Cart

© 2007-2024 Northern Software Inc. All Rights Reserved.