; RESET_TLM - Resets Telemetry output board to ; i) halt current downlink or ; ii) Recover from a board hang. ; ; Restrictions: ; 1) Resets Prime Telemetry board only ; 2) Resets only page 8 or 9 ; 3) A page must be initialised as list (8 byte EDAC) memory ; with it's parameters in IP registers 136-143. ; ; Side Effects: ; 1) First 550 words of page 11 are clobbered. ; 2) IP Registers 552-560 are clobbered. ; ; Parameters: ; 1) $IPRL_TLM_STATUS - Status of the reset operation ; 0 - Successful ; 1 - Failed ; 0xff - Reset not attempted ; ; History: ; Written by Dnyanesh Mathur, 17-Oct-95 ; V01 - 9-Jan-96 Dnyanesh Mathur ; 1. R81 set on exit. If board hang condition is detected R26 is ; set to request savemode. ;-------------------------------------------------------------------------- ; QSR_TLM_RESET:: ; BRANCHNE R0081 0 &SKIP_RESET ; HR Not OK => Skip Reset ; CKPAGE: BRANCHNR 0x4000 &DOHRDINIT ; Page 8 busy => Do Reset BRANCHNR 0x4800 &DOHRDINIT ; Page 9 Busy => Do Reset ; SETREG $IPRL_TLM_STATUS 0 ; Clear Error Status RTNQUE ; No Page Busy => Exit DOHRDINIT: ; SETREGS R552 6 1 0x0000 0x5800 0x00 0xCFFF 0xFF98 HRDINIT R552 SETREGS R558 2 0x00001L START1HR 0x33 0x5800 R558 ; D/L P11 to free P8 (or P9) ; COPYREG R143 R552 ; Save Block Count SETREG R143 16 ; Set Block count to 16 PURGELST R136 ; While away 82 ms COPYREG R552 R143 ; Restore Block Count ; BRANCHNR 0x4000 &ERR_RESET ; P8 still busy => HR NOK BRANCHNR 0x4800 &ERR_RESET ; P9 still busy => HR NOK ; ;-------------------------------------------------------------------------- ; FIN_RESET: SETREG R0081 0 ; Clear NOK flag SETREG $IPRL_TLM_STATUS 0 ; No Error RTNQUE ; SKIP_RESET: SETREG $IPRL_TLM_STATUS 0x00ff ; Status Code = "RESET not attempted" ADDREGD R0081 0xFFFF ; R81 <- R81 - 1 RTNQUE ; HR NOK => Skip Reset ERR_RESET: SETREG $IPRL_TLM_STATUS 1 ; Set Status = "Error" SETREG R0081 3 ; Set NOK flag SETREG R0026 1 ; Request "Savemode" RTNQUE ;=========================================================================