Error_Recovery IDNT ; Title of the Error Recovery routines ; program section. SECTION Sect_Error_Recovery,4,C ; Declare a noncommon code section. ; Align to Longwords. **************************************************************************** * * * Error Recovery Routines Rev. 26-MAY-1995 * * * * This is the Error Recovery routine to "un-stick" the DSP's. This * * routine is called if in Thats_Me_Processing the Global DSP never * * reaches Step D3, i.e. if the Global DSP never reports back with its * * answers for the L15CT Terms that needed to be evaluated. * * * * This routine is called by a JMP because we will not be returning * * to the Thats_Me_Processing routine. * * * * This routine uses and does not restore registers: A1, * **************************************************************************** *************************************************************************** * * * This section defines program-specific macros: * * * * WrIO: Write bit(s) to the IRONICS I/O card * * * *************************************************************************** WrIO MACRO ; Write byte to Ironics I/O Port. Not.B \1 ; Complement data byte \1. Move.B \1,\2 ; Move to Ironics port at adrs \2. Not.B \1 ; Complement data byte \1 to restore it. ENDM **************************************************************************** * * * Send an "e" to the 68k_Services console terminal. Ignore the * * character print prescale counter when sending out the "e" character. * * * * Increment the counter in the 68k_Service_to_TCC Status Block that * * indicates how many times we have executed the Error Recovery routine. * * * **************************************************************************** Begin_Step_D3_Error_Recovery: PEA.L Error_Recovery_Msg_1 ; Push message address on stack. JSR ChrStrgOut ; Send the message to the console. ADDQ.L #1,Stat_Blk_to_TCC_Sml_e_Count ; Increment the counter in ; the 68k to TCC Status Blk. **************************************************************************** * * * Now hold here for ever if we want to "trap" this error. * * * **************************************************************************** **;;:: Wait_Here: NOP ; Just for Testing **;;:: NOP ; **;;:: JMP Wait_Here ; Wait in this loop forever. **************************************************************************** * * * This routine uses the following steps to perform the error recovery. * * * * Get and save that DSP_to_68k_Services status from each of the 12 * * DSP's. Save this in the 68k_Services_to_TCC Status Block. * * Clear the previously valid Wake Up Word and the previously valid * * GDSP Transfer to 214 Required word. * * Then it sends an IIOF2 interrupt to all 12 DSP's. * * Then it checks that all 12 DSP's are at Step D0. * * Then it increments an error counter and sends a message to the console. * * Then it sets all of the L15CT Term answers to true and returns to * * the "That's_Me_Processing" routine where the Term Dones are set. * * * **************************************************************************** **************************************************************************** * * * Get and save that DSP_to_68k_Services status from each of the 12 * * DSP's. Save this in the 68k_Services_to_TCC Status Block. * * * **************************************************************************** Move.L LDSP_A2_Status_Adrs,Stat_Blk_to_TCC_A2s_Status ; Read DSP A2's ; status and ; store it. Move.L LDSP_A3_Status_Adrs,Stat_Blk_to_TCC_A3s_Status ; Read DSP A3's Move.L LDSP_A4_Status_Adrs,Stat_Blk_to_TCC_A4s_Status ; Read DSP A4's Move.L LDSP_A1_Status_Adrs,Stat_Blk_to_TCC_A1s_Status ; Read DSP A1's Move.L LDSP_B3_Status_Adrs,Stat_Blk_to_TCC_B3s_Status ; Read DSP B3's ; status and ; store it. Move.L LDSP_B4_Status_Adrs,Stat_Blk_to_TCC_B4s_Status ; Read DSP B4's Move.L LDSP_B1_Status_Adrs,Stat_Blk_to_TCC_B1s_Status ; Read DSP B1's Move.L LDSP_C3_Status_Adrs,Stat_Blk_to_TCC_C3s_Status ; Read DSP C3's ; status and ; store it. Move.L LDSP_C4_Status_Adrs,Stat_Blk_to_TCC_C4s_Status ; Read DSP C4's Move.L LDSP_C1_Status_Adrs,Stat_Blk_to_TCC_C1s_Status ; Read DSP C1's Move.L LDSP_C2_Status_Adrs,Stat_Blk_to_TCC_C2s_Status ; Read DSP C2's Move.L GDSP_B2_Status_Adrs,Stat_Blk_to_TCC_B2s_Status ; Read DSP B2's ; status and ; store it. **************************************************************************** * * * Clear the previously valid Wake Up Word and the previously valid * * GDSP Transfer to 214 Required word. * * * **************************************************************************** ****** CLEAR the previously valid Wake_Up_Word. ******* Move.L #$0000FF00,Ser68_to_Hydra_A_Adrs ; Local DSP's Hydra-II A. Move.L #$0000FF00,Ser68_to_Hydra_B_Adrs ; Local DSP's Hydra-II B. Move.L #$0000FF00,Ser68_to_Hydra_C_Adrs ; Local DSP's Hydra-II C. Move.L #$0000FF00,Ser68_to_Hydra_B_Adrs+4 ; Global DSP's Hydra-II B. ****** CLEAR the previously valid "Transfer to 214 Required ****** ****** Word" that is used by the Global DSP. ****** Move.L #$000000FF,Ser68_to_Hydra_B_Adrs+8 ; Global DSPs card "B". *************************************************************************** * * * Now send an IIOF2 Interrupt to each of the 12 DSP's. * * * *************************************************************************** Move.L #DSP_A1_ICR,A1 ; Put DSP #A1 Interrupt Control Reg JSR Generate_IIOF2 ; Addrs in A1. Send IIOF2 to DSP A1. Move.L #DSP_A2_ICR,A1 ; Put DSP #A2 Interrupt Control Reg JSR Generate_IIOF2 ; Addrs in A1. Send IIOF2 to DSP A2. Move.L #DSP_A3_ICR,A1 ; Put DSP #A3 Interrupt Control Reg JSR Generate_IIOF2 ; Addrs in A1. Send IIOF2 to DSP A3. Move.L #DSP_A4_ICR,A1 ; Put DSP #A4 Interrupt Control Reg JSR Generate_IIOF2 ; Addrs in A1. Send IIOF2 to DSP A4. Move.L #DSP_B1_ICR,A1 ; Put DSP #B1 Interrupt Control Reg JSR Generate_IIOF2 ; Addrs in A1. Send IIOF2 to DSP B1. Move.L #DSP_B2_ICR,A1 ; Put DSP #B2 Interrupt Control Reg JSR Generate_IIOF2 ; Addrs in A1. Send IIOF2 to DSP B2. Move.L #DSP_B3_ICR,A1 ; Put DSP #B3 Interrupt Control Reg JSR Generate_IIOF2 ; Addrs in A1. Send IIOF2 to DSP B3. Move.L #DSP_B4_ICR,A1 ; Put DSP #B4 Interrupt Control Reg JSR Generate_IIOF2 ; Addrs in A1. Send IIOF2 to DSP B4. Move.L #DSP_C1_ICR,A1 ; Put DSP #C1 Interrupt Control Reg JSR Generate_IIOF2 ; Addrs in A1. Send IIOF2 to DSP C1. Move.L #DSP_C2_ICR,A1 ; Put DSP #C2 Interrupt Control Reg JSR Generate_IIOF2 ; Addrs in A1. Send IIOF2 to DSP C2. Move.L #DSP_C3_ICR,A1 ; Put DSP #C3 Interrupt Control Reg JSR Generate_IIOF2 ; Addrs in A1. Send IIOF2 to DSP C3. Move.L #DSP_C4_ICR,A1 ; Put DSP #C4 Interrupt Control Reg JSR Generate_IIOF2 ; Addrs in A1. Send IIOF2 to DSP C4. *************************************************************************** * * * Now check to see that all DSP's are at Step D0. * * * *************************************************************************** Wait_A1 Move.L LDSP_A1_Status_Adrs,D4 ; Read the current status of IF.W D4 #LDSP_at_D0 THEN.S ; DSP A1. If it is not at JMP Wait_A1 ; Step D0 then wait for it ENDI ; to reach Step D0. Wait_A2 Move.L LDSP_A2_Status_Adrs,D4 ; Read the current status of IF.W D4 #LDSP_at_D0 THEN.S ; DSP A2. If it is not at JMP Wait_A2 ; Step D0 then wait for it ENDI ; to reach Step D0. Wait_A3 Move.L LDSP_A3_Status_Adrs,D4 ; Read the current status of IF.W D4 #LDSP_at_D0 THEN.S ; DSP A3. If it is not at JMP Wait_A3 ; Step D0 then wait for it ENDI ; to reach Step D0. Wait_A4 Move.L LDSP_A4_Status_Adrs,D4 ; Read the current status of IF.W D4 #LDSP_at_D0 THEN.S ; DSP A4. If it is not at JMP Wait_A4 ; Step D0 then wait for it ENDI ; to reach Step D0. Wait_B1 Move.L LDSP_B1_Status_Adrs,D4 ; Read the current status of IF.W D4 #LDSP_at_D0 THEN.S ; DSP B1. If it is not at JMP Wait_B1 ; Step D0 then wait for it ENDI ; to reach Step D0. Wait_B2 Move.L GDSP_B2_Status_Adrs,D4 ; Read the current status of IF.W D4 #GDSP_at_D0 THEN.S ; DSP B2. If it is not at JMP Wait_B2 ; Step D0 then wait for it ENDI ; to reach Step D0. Wait_B3 Move.L LDSP_B3_Status_Adrs,D4 ; Read the current status of IF.W D4 #LDSP_at_D0 THEN.S ; DSP B3. If it is not at JMP Wait_B3 ; Step D0 then wait for it ENDI ; to reach Step D0. Wait_B4 Move.L LDSP_B4_Status_Adrs,D4 ; Read the current status of IF.W D4 #LDSP_at_D0 THEN.S ; DSP B4. If it is not at JMP Wait_B4 ; Step D0 then wait for it ENDI ; to reach Step D0. Wait_C1 Move.L LDSP_C1_Status_Adrs,D4 ; Read the current status of IF.W D4 #LDSP_at_D0 THEN.S ; DSP C1. If it is not at JMP Wait_C1 ; Step D0 then wait for it ENDI ; to reach Step D0. Wait_C2 Move.L LDSP_C2_Status_Adrs,D4 ; Read the current status of IF.W D4 #LDSP_at_D0 THEN.S ; DSP C2. If it is not at JMP Wait_C2 ; Step D0 then wait for it ENDI ; to reach Step D0. Wait_C3 Move.L LDSP_C3_Status_Adrs,D4 ; Read the current status of IF.W D4 #LDSP_at_D0 THEN.S ; DSP C3. If it is not at JMP Wait_C3 ; Step D0 then wait for it ENDI ; to reach Step D0. Wait_C4 Move.L LDSP_C4_Status_Adrs,D4 ; Read the current status of IF.W D4 #LDSP_at_D0 THEN.S ; DSP C4. If it is not at JMP Wait_C4 ; Step D0 then wait for it ENDI ; to reach Step D0. ****** OK, we have verified that all 12 DSP's are at Step D0, so ****** ****** SET the All_DSPs_at_Step_D0 software flag. ****** Move.B #Flag_SET,All_DSPs_at_Step_D0 ; SET the All_DSPs_at_Step_D0 ; software flag. *************************************************************************** * * * Always clear the software flag that requests and MFP transfer. * * * *************************************************************************** Clr.B If_Transfer_Want_MFP_Transfer ; CLEAR Want MFP Transfer. *************************************************************************** * * * Increment a counter that shows how often the DPS's have been un-stuck * * when they failed to reach Step D3 set the word in the 68K_Services * * to TCC Status Block that shows what the most recent type of error was. * * * *************************************************************************** AddQ.L #1,Stat_Blk_to_TCC_Error_D3_Cnt ; Increment the Error ; Counter. Move.L #$000000D3,Stat_Blk_to_TCC_Last_Error ; Show that the most ; recent error was a ; failure to reach D3. *************************************************************************** * * * Now Reset the Readout Control P2 and the Path Select P2. * * Do this via the standard include file for doing this. * * This action drops the automatic hardware generated Front-End Busy. * * * *************************************************************************** INCLUDE Ser68_Clear_RC_and_PS_1.Include ; Get the include file that ; clears the RC and PS P2's. *************************************************************************** * * * We are just about finished with the error recovery routine. But we * * need to do one final thing before returning to the Orbit Master; we * * need to re-enable the Transmit_Trigger signal to come out of the * * L15CT MTG. * * * *************************************************************************** ; Re_Enable the ExtEnb Move.B #$00,Path_Select_Port_1 ; Signal to Ch #7 of the ; L15CT MTG. *************************************************************************** * * * Set all Term Answers True and then Return to "That's Me Processing" * * just in time to set the Term Done lines to the M103 L15 Framework. * * * * * * -----> LET'S JUST TRY RETURNING TO ORBIT MASTER AND NOT TRANSFERING. * * * *************************************************************************** JMP Begin_Orbit_Master ; <<<<------- DO THIS Move.B #$00,Terms_to_M103_Port_4 ; Set all Term Answers Hi. JMP Dones_to_M103 ; Return to the "That's Me ; Processing" routine just in time ; for it to set the Done lines to ; M103 L15 Framework. *************************************************************************** * * * This is the routine to generate an IIOF2 Interrupt to the DSP with * * the address of its Interrupt Control Register in Adrs Reg A1. * * * *************************************************************************** Generate_IIOF2: ; Set the Interrupt Control Register Move.L #Gen_IIOF2,(A1) ; of the target DSP to generate an ; IIOF2 interrupt. Move.L #Default_ICR,(A1) ; Set the Interrupt Control Register of ; the target DSP to its default value. RTS ************************************************************************* * * * Define Constants: * * * ************************************************************************* ALIGN 4 ; Align to longword address. Gen_IIOF2 EQU $00000014 ; Enable IIOF2 and connect it to GND. ; Disable NMI. Default_ICR EQU $00000004 ; Enable IIOF2 and connect it to the ; push button. Disable NMI. Error_Recovery_Msg_1 DC.B 3,$0D,$0A,'e' ************************************************************************* * * * Define some symbols as exported and others as imported. * * * ************************************************************************* XDEF Begin_Step_D3_Error_Recovery ; Symbol exported to ; other modules. ; Symbols used in this module but defined in another program module. XREF DSP_A1_ICR,DSP_A2_ICR,DSP_A3_ICR,DSP_A4_ICR XREF DSP_B1_ICR,DSP_B2_ICR,DSP_B3_ICR,DSP_B4_ICR XREF DSP_C1_ICR,DSP_C2_ICR,DSP_C3_ICR,DSP_C4_ICR XREF LDSP_A1_Status_Adrs,LDSP_A2_Status_Adrs XREF LDSP_A3_Status_Adrs,LDSP_A4_Status_Adrs XREF LDSP_B1_Status_Adrs XREF LDSP_B3_Status_Adrs,LDSP_B4_Status_Adrs XREF LDSP_C1_Status_Adrs,LDSP_C2_Status_Adrs XREF LDSP_C3_Status_Adrs,LDSP_C4_Status_Adrs XREF GDSP_B2_Status_Adrs XREF Stat_Blk_to_TCC_Last_Error XREF Stat_Blk_to_TCC_Error_D3_Cnt XREF Readout_Ctrl_Port_4 XREF Path_Select_Port_3 XREF Flag_CLR XREF Flag_SET XREF Which_214_Is_Load_Buf XREF State_of_RC_FE_Busy XREF All_DSPs_at_Step_D0 XREF If_Transfer_Want_MFP_Transfer XREF Begin_Orbit_Master XREF Dones_to_M103 XREF ChrStrgOut XREF LDSP_at_D0 XREF GDSP_at_D0 XREF Terms_to_M103_Port_4 XREF Path_Select_Port_1 XREF Ser68_to_Hydra_A_Adrs XREF Ser68_to_Hydra_B_Adrs XREF Ser68_to_Hydra_C_Adrs XREF Stat_Blk_to_TCC_A2s_Status XREF Stat_Blk_to_TCC_A3s_Status XREF Stat_Blk_to_TCC_A4s_Status XREF Stat_Blk_to_TCC_A1s_Status XREF Stat_Blk_to_TCC_B3s_Status XREF Stat_Blk_to_TCC_B4s_Status XREF Stat_Blk_to_TCC_B1s_Status XREF Stat_Blk_to_TCC_C3s_Status XREF Stat_Blk_to_TCC_C4s_Status XREF Stat_Blk_to_TCC_C1s_Status XREF Stat_Blk_to_TCC_C2s_Status XREF Stat_Blk_to_TCC_B2s_Status XREF Stat_Blk_to_TCC_Sml_e_Count END