nsdsp_debug_read_reg
nsdsp_debug_read_bp_state nsdsp_debug_read_cp0 nsdsp_debug_read_stack nsdsp_debug_check_for_data nsdsp_debug_wait_for_data nsdsp_debug_fetch_data nsdsp_debug_fetch_data_nb nsdsp_debug_fetch_word nsdsp_debug_fetch_flash_word nsdsp_debug_fetch_float nsdsp_debug_fetch_double nsdsp_debug_fetch_stack nsdsp_debug_fetch_bp_state nsdsp_debug_write_ram nsdsp_debug_write_reg nsdsp_debug_write_float_reg nsdsp_debug_write_double_regnsdsp_debug_read_reg
This function reads the content of a CPU register.
Syntax
unsigned int nsdsp_debug_read_reg(
nsdsp_session_t session,
unsigned int reg
);
Parameters
session - a reference to the Debug Session Object obtained with nsdsp_session_program_for_debug or nsdsp_start_debug_session function
reg - one of the constants listed in the nsdspif.h file. These constants are device specific and are named according to the following table:
Target Device | Constant Syntax |
---|---|
PIC12,PIC16 | REG_PIC16_XXXX |
PIC18 | REG_PIC18_XXXX |
PIC24,dsPIC33C,dsPIC33E,dsPIC33F | REG_PIC24_XXXX |
dsPIC33A | REG_PIC33_XXXX |
PIC32 | REG_PIC32_XXXX |
where XXXX is the name of the register.
Return
The function returns the size of the register in bytes, or zero in case of error.
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 arrives, you can retrieve the value of the register with nsdsp_debug_fetch_word function.
If you are retrieving floating point registers, instead of nsdsp_debug_fetch_word function, call nsdsp_debug_fetch_float or nsdsp_debug_fetch_double
Minimum library version - 163
© 2007-2025 Northern Software Inc. All Rights Reserved.