Index: firmware/App/Drivers/PAL.h =================================================================== diff -u -r01892698468068bb97a80a84c96a6d7c5d6fde9b -r3b3713c0d5445b83f339021972728ff58bd3e6e5 --- firmware/App/Drivers/PAL.h (.../PAL.h) (revision 01892698468068bb97a80a84c96a6d7c5d6fde9b) +++ firmware/App/Drivers/PAL.h (.../PAL.h) (revision 3b3713c0d5445b83f339021972728ff58bd3e6e5) @@ -15,8 +15,8 @@ * ***************************************************************************/ -#ifndef __GPIO_H__ -#define __GPIO_H__ +#ifndef __PAL_H__ +#define __PAL_H__ #include "TDCommon.h" Index: firmware/App/Services/AlarmMgmtSWFaults.h =================================================================== diff -u -r766e65a173747dd60a9faae1cac228cd5f8a55a6 -r3b3713c0d5445b83f339021972728ff58bd3e6e5 --- firmware/App/Services/AlarmMgmtSWFaults.h (.../AlarmMgmtSWFaults.h) (revision 766e65a173747dd60a9faae1cac228cd5f8a55a6) +++ firmware/App/Services/AlarmMgmtSWFaults.h (.../AlarmMgmtSWFaults.h) (revision 3b3713c0d5445b83f339021972728ff58bd3e6e5) @@ -88,19 +88,17 @@ SW_FAULT_ID_INVALID_CAN_MESSAGE_BOX = 57, SW_FAULT_ID_SYSTEM_CMMM_CAN_TRANSMIT_REJECTED = 58, SW_FAULT_ID_SYSTEM_COMM_INVALID_FRAME_SIZE = 59, - SW_FAULT_ID_HD_INVALID_TEST_CONFIG_SELECTED1 = 60, - SW_FAULT_ID_HD_INVALID_TEST_CONFIG_SELECTED2 = 61, - SW_FAULT_ID_UTIL_INVALID_WIN_MAX_COUNT = 62, - SW_FAULT_ID_UTIL_INVALID_WIN_COUNT = 63, - SW_FAULT_ID_UTIL_TIME_WINDOWED_COUNT_ERROR = 64, - SW_FAULT_ID_SEMAPHORE_IN_USE_TIMEOUT = 65, - SW_FAULT_ID_WATCHDOG_INVALID_SELF_TEST_STATE = 66, - SW_FAULT_ID_WATCHDOG_INVALID_TASK = 67, - SW_FAULT_ID_ALARM_MGMT_INVALID_ALARM_FOR_START_TIME = 68, - SW_FAULT_ID_INT_ADC_DATA_OVERRUN = 69, - SW_FAULT_ID_INT_ADC_INVALID_CHANNEL_REQUESTED1 = 70, - SW_FAULT_ID_INT_ADC_INVALID_CHANNEL_REQUESTED2 = 71, - SW_FAULT_ID_SAFETY_SHUTDOWN_INVALID_SELF_TEST_STATE = 72, + SW_FAULT_ID_UTIL_INVALID_WIN_MAX_COUNT = 60, + SW_FAULT_ID_UTIL_INVALID_WIN_COUNT = 61, + SW_FAULT_ID_UTIL_TIME_WINDOWED_COUNT_ERROR = 62, + SW_FAULT_ID_SEMAPHORE_IN_USE_TIMEOUT = 63, + SW_FAULT_ID_WATCHDOG_INVALID_SELF_TEST_STATE = 64, + SW_FAULT_ID_WATCHDOG_INVALID_TASK = 65, + SW_FAULT_ID_ALARM_MGMT_INVALID_ALARM_FOR_START_TIME = 66, + SW_FAULT_ID_INT_ADC_DATA_OVERRUN = 67, + SW_FAULT_ID_INT_ADC_INVALID_CHANNEL_REQUESTED1 = 68, + SW_FAULT_ID_INT_ADC_INVALID_CHANNEL_REQUESTED2 = 69, + SW_FAULT_ID_SAFETY_SHUTDOWN_INVALID_SELF_TEST_STATE = 70, NUM_OF_SW_FAULT_IDS } SW_FAULT_ID_T; Index: firmware/App/Services/SystemCommTD.c =================================================================== diff -u -r01892698468068bb97a80a84c96a6d7c5d6fde9b -r3b3713c0d5445b83f339021972728ff58bd3e6e5 --- firmware/App/Services/SystemCommTD.c (.../SystemCommTD.c) (revision 01892698468068bb97a80a84c96a6d7c5d6fde9b) +++ firmware/App/Services/SystemCommTD.c (.../SystemCommTD.c) (revision 3b3713c0d5445b83f339021972728ff58bd3e6e5) @@ -293,6 +293,23 @@ /*********************************************************************//** * @brief + * The checkTooManyBadMsgCRCs function checks for too many bad message CRCs + * within a set period of time. Assumed function is being called when a new + * bad CRC is detected so a new bad CRC will be added to the list. + * @details Inputs: badCRCTimeStamps[], badCRCListIdx, badCRCListCount + * @details Outputs: possibly a "too many bad CRCs" alarm + * @return none + *************************************************************************/ +void checkTooManyBadMsgCRCs( void ) +{ + if ( TRUE == incTimeWindowedCount( TIME_WINDOWED_COUNT_BAD_MSG_CRC ) ) + { + SET_ALARM_WITH_1_U32_DATA( ALARM_ID_TD_COMM_TOO_MANY_BAD_CRCS, (U32)ALARM_SOURCE_TD ); + } +} + +/*********************************************************************//** + * @brief * The getInBufferID function gets the buffer ID for a given buffer index. * @details Inputs: CAN_IN_BUFFERS[] * @details Outputs: none Index: firmware/App/Services/SystemCommTD.h =================================================================== diff -u -r01892698468068bb97a80a84c96a6d7c5d6fde9b -r3b3713c0d5445b83f339021972728ff58bd3e6e5 --- firmware/App/Services/SystemCommTD.h (.../SystemCommTD.h) (revision 01892698468068bb97a80a84c96a6d7c5d6fde9b) +++ firmware/App/Services/SystemCommTD.h (.../SystemCommTD.h) (revision 3b3713c0d5445b83f339021972728ff58bd3e6e5) @@ -47,6 +47,7 @@ COMM_BUFFER_T getInBufferID( U32 idx ); COMM_BUFFER_T getOutBufferID( U32 idx ); void checkForCommTimeouts( void ); +void checkTooManyBadMsgCRCs( void ); void checkInFromDG( void ); void checkInFromUI( void ); BOOL isDDCommunicating( void ); @@ -56,6 +57,7 @@ void setOnlyCANNode( BOOL only ); void clearCANXmitBuffers( void ); + /**@}*/ #endif Index: firmware/source/sys_main.c =================================================================== diff -u -r01892698468068bb97a80a84c96a6d7c5d6fde9b -r3b3713c0d5445b83f339021972728ff58bd3e6e5 --- firmware/source/sys_main.c (.../sys_main.c) (revision 01892698468068bb97a80a84c96a6d7c5d6fde9b) +++ firmware/source/sys_main.c (.../sys_main.c) (revision 3b3713c0d5445b83f339021972728ff58bd3e6e5) @@ -110,7 +110,6 @@ initProcessor(); // Configure processor initSoftware(); // Initialize software modules - initHardware(); // Configure external hardware initTasks(); // Setup and start the scheduled tasks // Start task background (will not return) @@ -154,9 +153,10 @@ /************************************************************************* * @brief initSoftware - * The initSoftware function calls all software module initialize functions. + * The initSoftware function calls all software unit initialization functions + * to initialize and configure the TD application. * @details Inputs: none - * @details Outputs: All modules initialized. + * @details Outputs: All software units initialized. * @return none *************************************************************************/ static void initSoftware( void ) @@ -191,17 +191,6 @@ } /************************************************************************* - * @brief initHardware - * The initHardware function initializes and configures external hardware. - * @details Inputs: none - * @details Outputs: External hardware initialized and configured. - * @return none - *************************************************************************/ -static void initHardware( void ) -{ -} - -/************************************************************************* * @brief initTasks * The initTasks function sets up and starts the scheduled tasks. * @details Inputs: none