nsdsp_session_verify
nsdsp_session_read nsdsp_session_set_timeout nsdsp_session_get_timeout nsdsp_session_check_for_data nsdsp_session_wait_for_data nsdsp_session_fetch_data nsdsp_session_fetch_data_nb nsdsp_session_flush nsdsp_session_send_uart nsdsp_session_send_spi nsdsp_session_receive_spi nsdsp_session_set_cke nsdsp_session_set_smp nsdsp_session_set_mclr nsdsp_session_set_hvp nsdsp_session_set_pgm nsdsp_session_set_pgcd nsdsp_session_set_red_led nsdsp_session_set_green_led nsdsp_session_short_delay nsdsp_session_delay_us nsdsp_session_delay_msnsdsp_session_verify
This function verifies the data on the target device
Syntax
int nsdsp_session_verify(
nsdsp_session_t session,
hex_map_t hex_map
);
Parameters
session - a reference to the Session Object
hex_map - a Hex Map object containing data to be verified. Only the ranges contained in the Hex Map object will be read and verified.
Return
The function returns non-zero if reading succeeds, or zero otherwise. The mismatch between data on the device and the data in the Hex Map is considered failure. If verification fails, you can use nsdsp_get_error to retrieve the error message.
Notes
After successful completion, the type of the session changes to idle or SPI depending on the nsdsp_reset_after_prog setting. If the operation fails, the session becomes idle.
Example
int VerifyDevice(char* DeviceName, char* HexFileName) {
hex_map_t hm;
mcu_t mcu;
nsdsp_t nsdsp;
nsdsp_session_t sess;
int ret;
ret = 0;
hm = hex_map_read(HexFileName,NULL);
if (hm) {
mcu = mcu_create(DeviceName);
if (mcu) {
nsdsp = nsdsp_connect(NULL);
if (nsdsp) {
sess = nsdsp_start_prog_session(nsdsp,mcu,0);
if (sess) {
ret = nsdsp_session_verify(sess,hm);
}
nsdsp_free(nsdsp);
}
mcu_free(mcu);
}
hex_map_free(hm);
}
return ret;
}
Supported session types: program
Minimum library version - 163
© 2007-2025 Northern Software Inc. All Rights Reserved.