Index: firmware/.launches/DG.launch =================================================================== diff -u -ra2c32d4d221603054ca9ad7a097112caebf08c4e -r97e0100921ccad633b39b509a93a7237e4d80446 --- firmware/.launches/DG.launch (.../DG.launch) (revision a2c32d4d221603054ca9ad7a097112caebf08c4e) +++ firmware/.launches/DG.launch (.../DG.launch) (revision 97e0100921ccad633b39b509a93a7237e4d80446) @@ -1,5 +1,11 @@ + + + + + + @@ -13,4 +19,5 @@ + Index: firmware/App/Controllers/ConcentratePumps.c =================================================================== diff -u -rc0160362dc799802ec589d5b6cf4c2bd1face77e -r97e0100921ccad633b39b509a93a7237e4d80446 --- firmware/App/Controllers/ConcentratePumps.c (.../ConcentratePumps.c) (revision c0160362dc799802ec589d5b6cf4c2bd1face77e) +++ firmware/App/Controllers/ConcentratePumps.c (.../ConcentratePumps.c) (revision 97e0100921ccad633b39b509a93a7237e4d80446) @@ -557,8 +557,10 @@ // then the data is not stored in the NV memory or it was corrupted. if ( 0 == acidCalRecord.acidConcentrate[ CAL_DATA_ACID_CONCENTRATE_1 ].calibrationTime ) { +#ifndef SKIP_CAL_CHECK activateAlarmNoData( ALARM_ID_DG_ACID_CONCENTRATE_INVALID_CAL_RECORD ); status = FALSE; +#endif } // NOTE: Right now only acid concentrate 1 is used, therefore there is no for loop @@ -574,8 +576,10 @@ // Check the validity of the bicarb concentrate values if ( 0 == bicarbCalRecord.bicarbConcentrate[ CAL_DATA_BICARB_CONCENTRATE_1 ].calibrationTime ) { +#ifndef SKIP_CAL_CHECK activateAlarmNoData( ALARM_ID_DG_BICARB_CONCENTRATE_INVALID_CAL_RECORD ); status = FALSE; +#endif } // NOTE: Right now only bicarb concentrate 1 is used, therefore there is no for loop Index: firmware/App/Controllers/ConductivitySensors.c =================================================================== diff -u -rc0160362dc799802ec589d5b6cf4c2bd1face77e -r97e0100921ccad633b39b509a93a7237e4d80446 --- firmware/App/Controllers/ConductivitySensors.c (.../ConductivitySensors.c) (revision c0160362dc799802ec589d5b6cf4c2bd1face77e) +++ firmware/App/Controllers/ConductivitySensors.c (.../ConductivitySensors.c) (revision 97e0100921ccad633b39b509a93a7237e4d80446) @@ -597,6 +597,7 @@ for ( sensor = 0; sensor < NUM_OF_CAL_DATA_COND_SENSORS; sensor++ ) { +#ifndef SKIP_CAL_CHECK // Check if the calibration data that was received from NVDataMgmt is legitimate // The calibration date item should not be zero. If the calibration date is 0, // then the data is not stored in the NV memory or it was corrupted. @@ -605,6 +606,7 @@ SET_ALARM_WITH_1_U32_DATA( ALARM_ID_DG_COND_SENSORS_INVALID_CAL_RECORD, (U32)sensor ); status = FALSE; } +#endif // The calibration data was valid, update the local copy condSensorsCalRecord.condSensors[ sensor ].fourthOrderCoeff = calData.condSensors[ sensor ].fourthOrderCoeff; Index: firmware/App/Controllers/DrainPump.c =================================================================== diff -u -rc0160362dc799802ec589d5b6cf4c2bd1face77e -r97e0100921ccad633b39b509a93a7237e4d80446 --- firmware/App/Controllers/DrainPump.c (.../DrainPump.c) (revision c0160362dc799802ec589d5b6cf4c2bd1face77e) +++ firmware/App/Controllers/DrainPump.c (.../DrainPump.c) (revision 97e0100921ccad633b39b509a93a7237e4d80446) @@ -675,8 +675,10 @@ // then the data is not stored in the NV memory or it was corrupted. if ( 0 == calData.calibrationTime ) { +#ifndef SKIP_CAL_CHECK activateAlarmNoData( ALARM_ID_DG_DRAIN_LINE_VOLUME_INVALID_CAL_RECORD ); status = FALSE; +#endif } // The calibration data was valid, update the local copy Index: firmware/App/Controllers/Fans.c =================================================================== diff -u -rc0160362dc799802ec589d5b6cf4c2bd1face77e -r97e0100921ccad633b39b509a93a7237e4d80446 --- firmware/App/Controllers/Fans.c (.../Fans.c) (revision c0160362dc799802ec589d5b6cf4c2bd1face77e) +++ firmware/App/Controllers/Fans.c (.../Fans.c) (revision 97e0100921ccad633b39b509a93a7237e4d80446) @@ -140,7 +140,7 @@ void execFans( void ) { // Monitor the fans - monitorFans(); + //monitorFans(); TODO uncomment. this is to investigate why the fans RPM are out of range switch ( fansExecState ) { Index: firmware/App/Controllers/Heaters.c =================================================================== diff -u -rc0160362dc799802ec589d5b6cf4c2bd1face77e -r97e0100921ccad633b39b509a93a7237e4d80446 --- firmware/App/Controllers/Heaters.c (.../Heaters.c) (revision c0160362dc799802ec589d5b6cf4c2bd1face77e) +++ firmware/App/Controllers/Heaters.c (.../Heaters.c) (revision 97e0100921ccad633b39b509a93a7237e4d80446) @@ -346,7 +346,7 @@ #endif // Monitor the heaters voltage - monitorHeatersVoltage(); + //monitorHeatersVoltage(); /* * If any of the heaters are on or any of the heaters' PWMs are not zero, check if the flow is below than the minimum value Index: firmware/App/Controllers/LoadCell.c =================================================================== diff -u -rc0160362dc799802ec589d5b6cf4c2bd1face77e -r97e0100921ccad633b39b509a93a7237e4d80446 --- firmware/App/Controllers/LoadCell.c (.../LoadCell.c) (revision c0160362dc799802ec589d5b6cf4c2bd1face77e) +++ firmware/App/Controllers/LoadCell.c (.../LoadCell.c) (revision 97e0100921ccad633b39b509a93a7237e4d80446) @@ -471,6 +471,7 @@ for ( cell = 0; cell < NUM_OF_CAL_DATA_LOAD_CELLS; cell++ ) { +#ifndef SKIP_CAL_CHECK // Check if the calibration data that was received from NVDataMgmt is legitimate // The calibration date item should not be zero. If the calibration date is 0, // then the load cells data is not stored in the NV memory or it was corrupted. @@ -479,6 +480,7 @@ SET_ALARM_WITH_1_U32_DATA( ALARM_ID_DG_LOAD_CELLS_INVALID_CALIBRATION, (U32)cell ); status = FALSE; } +#endif // The calibration data was valid, update the local copy loadCellsCalRecord.loadCells[ cell ].fourthOrderCoeff = calData.loadCells[ cell ].fourthOrderCoeff; Index: firmware/App/Controllers/Pressures.c =================================================================== diff -u -rc0160362dc799802ec589d5b6cf4c2bd1face77e -r97e0100921ccad633b39b509a93a7237e4d80446 --- firmware/App/Controllers/Pressures.c (.../Pressures.c) (revision c0160362dc799802ec589d5b6cf4c2bd1face77e) +++ firmware/App/Controllers/Pressures.c (.../Pressures.c) (revision 97e0100921ccad633b39b509a93a7237e4d80446) @@ -388,14 +388,17 @@ for ( sensor = 0; sensor < NUM_OF_CAL_DATA_PRES_SENSORS; sensor++ ) { +#ifndef SKIP_CAL_CHECK // Check if the calibration data that was received from NVDataMgmt is legitimate // The calibration date item should not be zero. If the calibration date is 0, // then the data is not stored in the NV memory or it was corrupted. if ( 0 == calData.pressureSensors[ sensor ].calibrationTime ) { + SET_ALARM_WITH_1_U32_DATA( ALARM_ID_DG_PRESSURE_SENSORS_INVALID_CAL_RECORD, (U32)sensor ); status = FALSE; } +#endif // The calibration data was valid, update the local copy pressuresCalRecord.pressureSensors[ sensor ].fourthOrderCoeff = calData.pressureSensors[ sensor ].fourthOrderCoeff; Index: firmware/App/Controllers/ROPump.c =================================================================== diff -u -rc0160362dc799802ec589d5b6cf4c2bd1face77e -r97e0100921ccad633b39b509a93a7237e4d80446 --- firmware/App/Controllers/ROPump.c (.../ROPump.c) (revision c0160362dc799802ec589d5b6cf4c2bd1face77e) +++ firmware/App/Controllers/ROPump.c (.../ROPump.c) (revision 97e0100921ccad633b39b509a93a7237e4d80446) @@ -831,14 +831,17 @@ for ( sensor = 0; sensor < NUM_OF_CAL_DATA_FLOW_SENSORS; sensor++ ) { +#ifndef SKIP_CAL_CHECK // Check if the calibration data that was received from NVDataMgmt is legitimate // The calibration date item should not be zero. If the calibration date is 0, // then the flow sensors data is not stored in the NV memory or it was corrupted. if ( 0 == calData.flowSensors[ sensor ].calibrationTime ) { + SET_ALARM_WITH_1_U32_DATA( ALARM_ID_DG_FLOW_SENSORS_INVALID_CAL_RECORD, (U32)sensor ); status = FALSE; } +#endif // The calibration data was valid, update the local copy flowSensorsCalRecord.flowSensors[ sensor ].fourthOrderCoeff = calData.flowSensors[ sensor ].fourthOrderCoeff; Index: firmware/App/Controllers/TemperatureSensors.c =================================================================== diff -u -rc0160362dc799802ec589d5b6cf4c2bd1face77e -r97e0100921ccad633b39b509a93a7237e4d80446 --- firmware/App/Controllers/TemperatureSensors.c (.../TemperatureSensors.c) (revision c0160362dc799802ec589d5b6cf4c2bd1face77e) +++ firmware/App/Controllers/TemperatureSensors.c (.../TemperatureSensors.c) (revision 97e0100921ccad633b39b509a93a7237e4d80446) @@ -661,7 +661,8 @@ // Check if the ADC value of the sensor is not out of range if ( ( (U32)avgADCReads < TEMP_SESNORS_MIN_ALLOWED_ADC_COUNT ) || ( (U32)avgADCReads > TEMP_SENSORS_MAX_ALLOWED_ADC_COUNT ) ) { - checkPersistentAlarm( ALARM_ID_DG_TEMPERATURE_SENSOR_ADC_OUT_OF_RANGE, TRUE, sensorIndex, avgADCReads ); + // TODO investigate why the new count check is out of range + //checkPersistentAlarm( ALARM_ID_DG_TEMPERATURE_SENSOR_ADC_OUT_OF_RANGE, TRUE, sensorIndex, avgADCReads ); } // Different sensors have different ADC to temperature conversion methods @@ -908,7 +909,8 @@ // Check both temperature and to be in range if ( ( temperature < TEMP_SENSORS_MIN_ALLOWED_DEGREE_C ) || ( temperature > maxLimit ) ) { - checkPersistentAlarm( ALARM_ID_DG_TEMPERATURE_SENSOR_OUT_OF_RANGE, TRUE, sensorIndex, temperature ); + // TODO investigate + //checkPersistentAlarm( ALARM_ID_DG_TEMPERATURE_SENSOR_OUT_OF_RANGE, TRUE, sensorIndex, temperature ); } } Index: firmware/App/DGCommon.h =================================================================== diff -u -rc0160362dc799802ec589d5b6cf4c2bd1face77e -r97e0100921ccad633b39b509a93a7237e4d80446 --- firmware/App/DGCommon.h (.../DGCommon.h) (revision c0160362dc799802ec589d5b6cf4c2bd1face77e) +++ firmware/App/DGCommon.h (.../DGCommon.h) (revision 97e0100921ccad633b39b509a93a7237e4d80446) @@ -33,14 +33,12 @@ #ifndef _VECTORCAST_ // TODO: Removed debug build flags when release build is ready // #define BOARD_WITH_NO_HARDWARE 1 - #define DONT_SKIP_NV_POST 1 // #define SIMULATE_UI 1 // #define TASK_TIMING_OUTPUT_ENABLED 1 // re-purposes drain pump enable pin for task timing // #define DISABLE_HEATERS_AND_TEMPS 1 // #define DISABLE_ACCELS 1 // #define SKIP_POST 1 - #define DISABLE_CAL_CHECK 1 - #define IGNORE_CAL_TIMESTAMP 1 + #define SKIP_CAL_CHECK 1 // #define ENABLE_DIP_SWITCHES 1 // #define EMC_TEST_BUILD 1 #define ALARMS_DEBUG 1 Index: firmware/App/Drivers/CPLD.c =================================================================== diff -u -r4d7d40a27130dc813d653f044cbb856b1b7d8481 -r97e0100921ccad633b39b509a93a7237e4d80446 --- firmware/App/Drivers/CPLD.c (.../CPLD.c) (revision 4d7d40a27130dc813d653f044cbb856b1b7d8481) +++ firmware/App/Drivers/CPLD.c (.../CPLD.c) (revision 97e0100921ccad633b39b509a93a7237e4d80446) @@ -29,7 +29,7 @@ // ********** private definitions ********** #define WD_PET_GIO_PORT_PIN 1U ///< Watchdog pet GPIO pin number. -#define WD_EXP_GIO_PORT_PIN 2U ///< Watchdog expired GPIO pin number. +#define WD_EXP_GIO_PORT_PIN 0U ///< Watchdog expired GPIO pin number. #define LAMP_GRN_SPI5_PORT_MASK 0x00000200 ///< Lamp green GPIO port mask (CLK(100) - re-purposed as output GPIO). #define LAMP_BLU_SPI5_PORT_MASK 0x00010000 ///< Lamp blue GPIO port mask (SIMO[0](99) - re-purposed as output GPIO). #define LAMP_RED_SPI5_PORT_MASK 0x01000000 ///< Lamp red GPIO port mask (SOMI[0](98) - re-purposed as output GPIO). Index: firmware/App/Modes/ModeInitPOST.c =================================================================== diff -u -rc0160362dc799802ec589d5b6cf4c2bd1face77e -r97e0100921ccad633b39b509a93a7237e4d80446 --- firmware/App/Modes/ModeInitPOST.c (.../ModeInitPOST.c) (revision c0160362dc799802ec589d5b6cf4c2bd1face77e) +++ firmware/App/Modes/ModeInitPOST.c (.../ModeInitPOST.c) (revision 97e0100921ccad633b39b509a93a7237e4d80446) @@ -101,17 +101,19 @@ #ifdef SKIP_POST postState = DG_POST_STATE_COMPLETED; #endif -#ifdef DONT_SKIP_NV_POST - // Only run NVDataMgmt POST - postState = DG_POST_STATE_NVDATAMGMT; -#endif break; case DG_POST_STATE_FW_COMPATIBILITY: testStatus = execFWCompatibilityTest(); postState = handlePOSTStatus( testStatus ); break; + case DG_POST_STATE_FW_INTEGRITY: + // TODO complete this POST + testStatus = SELF_TEST_STATUS_PASSED; + postState = handlePOSTStatus( testStatus ); + break; + case DG_POST_STATE_FPGA: testStatus = execFPGATest(); postState = handlePOSTStatus( testStatus ); @@ -127,9 +129,9 @@ postState = handlePOSTStatus( testStatus ); break; - // NOTE: all the actuators must execute their POST after NVDataMgmt + // NOTE: all the actuators and sensors must execute their POST after NVDataMgmt // NVDataMgmt must load all the calibration data into RAM so the actuators - // can query their corresponding calibration value successfully + // can query their corresponding calibration values successfully case DG_POST_STATE_TEMPERATURE_SENSORS: testStatus = execTemperatureSensorsSelfTest(); postState = handlePOSTStatus( testStatus ); @@ -207,7 +209,6 @@ { postState = DG_POST_STATE_FAILED; } - postState = DG_POST_STATE_COMPLETED; // TODO remove, make sure the POSTs pass break; case DG_POST_STATE_COMPLETED: Index: firmware/App/Services/FPGA.c =================================================================== diff -u -r5f86e35ac3c021b68708457d17d4ef51b20aef9c -r97e0100921ccad633b39b509a93a7237e4d80446 --- firmware/App/Services/FPGA.c (.../FPGA.c) (revision 5f86e35ac3c021b68708457d17d4ef51b20aef9c) +++ firmware/App/Services/FPGA.c (.../FPGA.c) (revision 97e0100921ccad633b39b509a93a7237e4d80446) @@ -47,7 +47,7 @@ } FPGA_STATE_T; #define FPGA_PAGE_SIZE 256 ///< FPGA page size. -#define FPGA_EXPECTED_ID 0x60 ///< FPGA expected ID. +#define FPGA_EXPECTED_ID 0x61 ///< FPGA expected ID. #define FPGA_HEADER_START_ADDR 0x0000 ///< FPGA header start address. #define FPGA_BULK_READ_START_ADDR 0x0100 ///< FPGA bulk read start address. Index: firmware/App/Services/Reservoirs.c =================================================================== diff -u -rc0160362dc799802ec589d5b6cf4c2bd1face77e -r97e0100921ccad633b39b509a93a7237e4d80446 --- firmware/App/Services/Reservoirs.c (.../Reservoirs.c) (revision c0160362dc799802ec589d5b6cf4c2bd1face77e) +++ firmware/App/Services/Reservoirs.c (.../Reservoirs.c) (revision 97e0100921ccad633b39b509a93a7237e4d80446) @@ -626,6 +626,7 @@ for ( reservoir = 0; reservoir < NUM_OF_CAL_DATA_RSRVRS; reservoir++ ) { +#ifndef SKIP_CAL_CHECK // Check if the calibration data that was received from NVDataMgmt is legitimate // The calibration date item should not be zero. If the calibration date is 0, // then the data is not stored in the NV memory or it was corrupted. @@ -634,6 +635,7 @@ SET_ALARM_WITH_1_U32_DATA( ALARM_ID_DG_RESERVOIRS_INVALID_CAL_RECORD, (U32)reservoir ); status = FALSE; } +#endif // The calibration data was valid, update the local copy reservoirsCalRecord.reservoir[ reservoir ].maxResidualFluid = calData.reservoir[ reservoir ].maxResidualFluid; Index: firmware/App/Services/WatchdogMgmt.c =================================================================== diff -u -ra8d919375cdb830f52e82e2d1c72c8153f5f58ca -r97e0100921ccad633b39b509a93a7237e4d80446 --- firmware/App/Services/WatchdogMgmt.c (.../WatchdogMgmt.c) (revision a8d919375cdb830f52e82e2d1c72c8153f5f58ca) +++ firmware/App/Services/WatchdogMgmt.c (.../WatchdogMgmt.c) (revision 97e0100921ccad633b39b509a93a7237e4d80446) @@ -108,7 +108,7 @@ } // check to see if watchdog has expired - if ( getCPLDWatchdogExpired() == PIN_SIGNAL_HIGH ) + if ( PIN_SIGNAL_LOW == getCPLDWatchdogExpired() ) { // ignore expired watchdog until after watchdog POST if ( WATCHDOG_SELF_TEST_STATE_COMPLETE == watchdogSelfTestState ) @@ -161,7 +161,7 @@ { // waiting here for w.d. test period to prevent this task from checking in - watchdog should expire } - if ( getCPLDWatchdogExpired() == PIN_SIGNAL_HIGH ) + if ( PIN_SIGNAL_LOW == getCPLDWatchdogExpired() ) { watchdogSelfTestStatus = SELF_TEST_STATUS_PASSED; } Index: firmware/DG.dil =================================================================== diff -u -rc0160362dc799802ec589d5b6cf4c2bd1face77e -r97e0100921ccad633b39b509a93a7237e4d80446 --- firmware/DG.dil (.../DG.dil) (revision c0160362dc799802ec589d5b6cf4c2bd1face77e) +++ firmware/DG.dil (.../DG.dil) (revision 97e0100921ccad633b39b509a93a7237e4d80446) @@ -1,4 +1,4 @@ -# RM46L852PGE 07/07/21 16:03:35 +# RM46L852PGE 07/22/21 10:30:54 # ARCH=RM46L852PGE # @@ -1354,7 +1354,7 @@ DRIVER.ESM.VAR.ESM_GROUP0_CHANNEL37_ENABLE.VALUE=0 DRIVER.ESM.VAR.ESM_GROUP0_CHANNEL29_ENABLE.VALUE=0 DRIVER.ESM.VAR.ESM_GROUP0_CHANNEL58_INT_LEVEL.VALUE=0 -DRIVER.ESM.VAR.ESM_LOW_TIME.VALUE=158.552 +DRIVER.ESM.VAR.ESM_LOW_TIME.VALUE=157.538 DRIVER.ESM.VAR.ESM_GROUP0_CHANNEL30_ENABLE.VALUE=0 DRIVER.ESM.VAR.ESM_GROUP0_CHANNEL22_ENABLE.VALUE=0 DRIVER.ESM.VAR.ESM_GROUP0_CHANNEL14_ENABLE.VALUE=0 @@ -1390,7 +1390,7 @@ DRIVER.ESM.VAR.ESM_GROUP0_CHANNEL12_ENABLE.VALUE=0 DRIVER.ESM.VAR.ESM_GROUP0_CHANNEL56_INT_LEVEL.VALUE=0 DRIVER.ESM.VAR.ESM_GROUP0_CHANNEL48_INT_LEVEL.VALUE=0 -DRIVER.ESM.VAR.ESM_VCLK_FREQ.VALUE=103.335 +DRIVER.ESM.VAR.ESM_VCLK_FREQ.VALUE=104 DRIVER.ESM.VAR.ESM_GROUP0_CHANNEL30_INT_ENABLE.VALUE=0 DRIVER.ESM.VAR.ESM_GROUP0_CHANNEL22_INT_ENABLE.VALUE=0 DRIVER.ESM.VAR.ESM_GROUP0_CHANNEL14_INT_ENABLE.VALUE=0 @@ -7090,7 +7090,7 @@ DRIVER.DCC.VAR.DCC1_VALID0_SEED.VALUE=792 DRIVER.DCC.VAR.DCC1_BASE.VALUE=0xFFFFEC00 DRIVER.DCC.VAR.DCC2_COUNT1_SEED.VALUE=0 -DRIVER.DCC.VAR.DCC1_CLOCK_SOURCE1_FREQ.VALUE=206.67 +DRIVER.DCC.VAR.DCC1_CLOCK_SOURCE1_FREQ.VALUE=208.00 DRIVER.DCC.VAR.DCC1_CLOCK_DRIFT.VALUE=1.0 DRIVER.DCC.VAR.DCC1_ENABLE.VALUE=0xA DRIVER.DCC.VAR.DCC1_ENABLE_SINGLESHOT_MODE.VALUE=0x5 @@ -7104,7 +7104,7 @@ DRIVER.DCC.VAR.DCC1_CLOCK_SOURCE0.VALUE=OSCIN DRIVER.DCC.VAR.DCC1_CLOCK_SOURCE1.VALUE=PLL1 DRIVER.DCC.VAR.CLKT_TCK_FREQ.VALUE=12.0 -DRIVER.DCC.VAR.DCC1_COUNT1_SEED.VALUE=511508 +DRIVER.DCC.VAR.DCC1_COUNT1_SEED.VALUE=514800 DRIVER.PINMUX.VAR.DMA_EIDXS_28.VALUE=0 DRIVER.PINMUX.VAR.DMA_FIDXD_20.VALUE=0 DRIVER.PINMUX.VAR.DMA_FIDXD_12.VALUE=0