Cart Contact NSDSP Home

nsdsp_debug_write_ram

This function writes one word of RAM.

Syntax

int nsdsp_debug_write_ram(
        nsdsp_session_t   session,
        unsigned int      addr,
        unsigned int      mask,
        unsigned int      value
);

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 written. The address must be appropriately aligned:

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

mask - the bitwise mask. If a bit in the mask is '1' the corresponding bit of the value will be written to the destination memory. If a bit in the mask is '0' the corresponding bit of the destination memory will not change.

value - the value to write

Return

The function returns non-zero if the write command has been succesfully queued, or zero otherwise

Notes

The size of the word depends on the target device.

Target Device Word Size
PIC12,PIC161 byte
PIC181 byte
PIC24,dsPIC33C,dsPIC33E,dsPIC33F2 bytes
dsPIC33A4 bytes
PIC324 bytes

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.

 

Minimum library version - 163

Northern Software Home NSDSP Contact Us Purchase/View Cart

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