How check the firmware safety functions (distance threshold and CrateBCU watchdog)

Distance thresholding

for testing the counter of the occurrences of distance thresholding (causing coil disabling) the following function (in fsm_func_check.pro) shows the memory locations to read. To be checked if there is some variable filled by the Housekeeper (here is: DSPPosCheckCnt) with those data and if those variables are stored in some Log/Telemetry.

Function func_dist_th_test
@adsec_common
err = read_seq_dsp(sc.all, dsp_map.pos_check_internal_cnt, 1l, scnt, /UL)
if err ne adsec_error.ok then return, err
err = read_seq_dsp(sc.all, dsp_map.pos_check_internal_cnt, 1l, bcnt, /UL)
if err ne adsec_error.ok then return, err
id = where(scnt-bcnt eq 0)
if id[0] ne -1 then begin
log_print, "Failed on "+strjoin(string(id, format='(" #", I3)'))
endif else begin
log_print, "All ok."
endelse
return, adsec_error.ok
End

CrateBCU watchdog

same as before for the CrateBCU watchdog. Variables already exist in Housekeeper ('*WatchdogExpired*'). To be checked if those variables are stored somewhere.

Function func_wd_test
@adsec_common
err = getdiagnvalue('HOUSEKPR00', '*WatchdogExpired*', -1,-1, wd)
if err ne adsec_error.ok then return, err
val = wd.last
nval = [transpose(val[0:(adsec.n_board_per_bcu*adsec.n_crates*adsec.n_dsp_per_board)/2-1]), $
transpose(val[(adsec.n_board_per_bcu*adsec.n_crates*adsec.n_dsp_per_board)/2:*])]
nval = reform(nval, adsec.n_board_per_bcu*adsec.n_crates*adsec.n_dsp_per_board)
wd_fault = where(nval, cc)
if cc gt 0 then begin
log_print, "Watchdog expired for DSP ID: "+strjoin(string(wd_fault , format='(" #", I3)'))
return, adsec_error.generic_error
endif else begin
return, adsec_error.ok
endelse
End

-- ArmandoRiccardi - 01 Mar 2010
Topic revision: r2 - 03 Mar 2010, ArmandoRiccardi
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback