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_stack
This function reads data from the stack.
Syntax
unsigned int nsdsp_debug_read_stack(
nsdsp_session_t session,
unsigned int pos
);
Parameters
session - a reference to the Debug Session Object obtained with nsdsp_session_program_for_debug or nsdsp_start_debug_session function
pos - position in the stack
Target Device | Position |
---|---|
PIC12,PIC16,PIC18 | The value in hardware call stack, as if pos was loaded into STKPTR register |
PIC24,dsPIC33 | The word from stack pointed to by W15 register. For the last word pushed to the stack set pos to 0, for previous word set pos to 1 and so on. Be careful not to go out of bounds of implemented RAM. |
PIC32M | The word from stack pointed to by SP register. For the last word pushed to the stack set pos to 0, for previous word set pos to 1 and so on. Be careful not to go out of bounds of implemented RAM. |
Return
The function returns the size of the stack word, 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_stack function.
Minimum library version - 163
© 2007-2025 Northern Software Inc. All Rights Reserved.