Index: firmware/App/Services/Interrupts.c =================================================================== diff -u -rf688e0f8bded1f0a687437e3136cfba8b14f87b6 -r3518e8a088c32e75c0c8960d5e629a7401095feb --- firmware/App/Services/Interrupts.c (.../Interrupts.c) (revision f688e0f8bded1f0a687437e3136cfba8b14f87b6) +++ firmware/App/Services/Interrupts.c (.../Interrupts.c) (revision 3518e8a088c32e75c0c8960d5e629a7401095feb) @@ -15,18 +15,16 @@ * ***************************************************************************/ -#include #include "can.h" #include "het.h" #include "rti.h" #include "sci.h" #include "sys_dma.h" -#include "TDCommon.h" //#include "BloodFlow.h" #include "Comm.h" #include "Interrupts.h" -//#include "FPGA.h" +#include "FPGA.h" #include "SystemComm.h" #include "TaskGeneral.h" #include "TaskPriority.h" @@ -59,9 +57,9 @@ /*********************************************************************//** * @brief - * The initInterrupts function initializes the Interrupts module. - * @details Inputs: none - * @details Outputs: Interrupts module initialized. + * The initInterrupts function initializes the Interrupts unit. + * @details \b Inputs: none + * @details \b Outputs: Interrupts unit initialized. * @return none *************************************************************************/ void initInterrupts( void ) @@ -74,8 +72,9 @@ /*********************************************************************//** * @brief * The phantomInterrupt function handles phantom interrupts. - * @details Inputs: none - * @details Outputs: phantom interrupt handled. + * @details \b Alarm: ALARM_ID_TD_SOFTWARE_FAULT + * @details \b Inputs: none + * @details \b Outputs: phantom interrupt handled. * @return none *************************************************************************/ void phantomInterrupt(void) @@ -86,9 +85,10 @@ /*********************************************************************//** * @brief * The rtiNotification function handles real-time interrupt notifications. - * @details Inputs: none - * @details Outputs: RTI notification handled. - * @param notification Which RTI timer caused this interrupt + * @details \b Alarm: ALARM_ID_TD_SOFTWARE_FAULT if given notification is invalid/unexpected. + * @details \b Inputs: none + * @details \b Outputs: Task associated with given notification is executed. + * @param notification ID of RTI timer that caused this interrupt * @return none *************************************************************************/ void rtiNotification(uint32 notification) @@ -120,10 +120,10 @@ /*********************************************************************//** * @brief * The canMessageNotification function handles CAN message notifications. - * @details Inputs: none - * @details Outputs: CAN message notification handled. - * @param node which CAN controller - * @param messageBox which message box triggered the message notification + * @details \b Inputs: none + * @details \b Outputs: CAN message notification handled. + * @param node ID of CAN controller that given notification came from. + * @param messageBox ID of CAN mailbox that triggered the message notification * @return none *************************************************************************/ void canMessageNotification(canBASE_t *node, uint32 messageBox) @@ -137,8 +137,9 @@ /*********************************************************************//** * @brief * The canErrorNotification function handles CAN error notifications. - * @details Inputs: none - * @details Outputs: CAN error notification handled. + * @details \b Alarm: ALARM_ID_TD_SOFTWARE_FAULT if CAN parity or off error detected. + * @details \b Inputs: none + * @details \b Outputs: CAN error notification handled. * @param node which CAN controller * @param notification canLEVEL_PASSIVE (0x20) : When RX- or TX error counter are between 32 and 63 * canLEVEL_WARNING (0x40) : When RX- or TX error counter are between 64 and 127 @@ -183,11 +184,11 @@ /*********************************************************************//** * @brief * The sciNotification function handles UART communication error interrupts. - * Frame and Over-run errors are handled. - * @details Inputs: none - * @details Outputs: UART error interrupts handled. + * Frame and Over-run errors are recorded and cleared. + * @details \b Inputs: none + * @details \b Outputs: sci2FEOEError, sci2FEOEError * @param sci Pointer to the SCI peripheral that detected the error - * @param flags error flag(s) + * @param flags 32 bits of error flags * @return none *************************************************************************/ void sciNotification(sciBASE_t *sci, uint32 flags) @@ -214,8 +215,9 @@ /*********************************************************************//** * @brief * The dmaGroupANotification function handles communication DMA interrupts. - * @details Inputs: none - * @details Outputs: DMA interrupt is handled. + * @details \b Alarm: ALARM_ID_TD_SOFTWARE_FAULT if given DMA channel is invalid/unexpected. + * @details \b Inputs: none + * @details \b Outputs: DMA interrupt is handled. * @param inttype type of DMA interrupt * @param channel DMA channel that caused the interrupt * @return none @@ -228,12 +230,12 @@ { case DMA_CH0: // FPGA receive channel clearSCI2DMAReceiveInterrupt(); -// signalFPGAReceiptCompleted(); + signalFPGAReceiptCompleted(); break; case DMA_CH2: // FPGA transmit channel clearSCI2DMATransmitInterrupt(); -// signalFPGATransmitCompleted(); + signalFPGATransmitCompleted(); break; default: @@ -245,11 +247,12 @@ /*********************************************************************//** * @brief - * The edgeNotification function handles rotor hall sensor interrupts. - * @details Inputs: none - * @details Outputs: Rotor hall sensor interrupt is handled according to pin associated with given edge. + * The edgeNotification function handles hall sensor interrupts. + * @details \b Alarm: ALARM_ID_TD_SOFTWARE_FAULT if given edge is invalid/unexpected. + * @details \b Inputs: none + * @details \b Outputs: Hall sensor interrupt is handled according given pulse edge. * @param hetREG HET controller associated with the edge - * @param edge Which edge was detected + * @param edge ID of pulse edge that triggered this interrupt * @return none *************************************************************************/ void edgeNotification(hetBASE_t * hetREG, uint32 edge) @@ -273,8 +276,8 @@ * @brief * The getSci2FEOEError function returns the sci2FEOEError (OE - Overrun, * FE - Framing Error) status and resets the status if TRUE - * @details Inputs: sci2FEOEError - * @details Outputs: none + * @details \b Inputs: sci2FEOEError + * @details \b Outputs: none * @return sci2 FE / OE error *************************************************************************/ BOOL getSci2FEOEError( void )