nsdsp_debug_write_ram
nsdsp_debug_write_reg nsdsp_debug_write_float_reg nsdsp_debug_write_double_regnsdsp_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,PIC16 | none |
PIC18 | none |
PIC24,dsPIC33C,dsPIC33E,dsPIC33F | 16-bit |
dsPIC33A | 32-bit |
PIC32 | 32-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,PIC16 | 1 byte |
PIC18 | 1 byte |
PIC24,dsPIC33C,dsPIC33E,dsPIC33F | 2 bytes |
dsPIC33A | 4 bytes |
PIC32 | 4 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
© 2007-2025 Northern Software Inc. All Rights Reserved.