Cart Contact NSDSP Home

nsdsp_debug_read_ram

This function reads RAM from the target device.

Syntax

unsigned int nsdsp_debug_read_ram(
        nsdsp_session_t   session,
        unsigned int      addr,
        unsigned int      size
);

Parameters

session - a reference to the Debug Session Object obtained with nsdsp_session_program_for_debug or nsdsp_start_debug_session function

addr - the address of memory to be read. The address must be appropriately aligned:

Target Device Alignment Requirements
PIC12,PIC16none
PIC18none
PIC24,dsPIC33C,dsPIC33E,dsPIC33F16-bit
dsPIC33A32-bit
PIC3232-bit

size - a number of bytes to read. Must be rounded the same as addr alignment.

Return

The function returns the number of bytes containing memory information which will be returned back, or zero in case of error. Normally, the value returned must be equal to size.

Notes

This instruction only queues a command. The command will be sent to NSDSP when you queue enough commands to fill the buffer or when you call nsdsp_session_flush.

Once the data carrying the memory content arrives, you can retrieve the data with nsdsp_debug_fetch_data or nsdsp_debug_fetch_data_nb functions.

The functions used to fetch data during debug are different from functions used for other types of sessions. Do not use nsdsp_session_fetch_data and nsdsp_session_fetch_data_nb functions when debugging.

 

Minimum library version - 163

Northern Software Home NSDSP Contact Us Purchase/View Cart

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