Index: TestSupport.c =================================================================== diff -u -rca1d590217b1bfd14f0e0682f88e04de076ff199 -r655329c72f598e0d60b4ea1bf6b461c6c599b882 --- TestSupport.c (.../TestSupport.c) (revision ca1d590217b1bfd14f0e0682f88e04de076ff199) +++ TestSupport.c (.../TestSupport.c) (revision 655329c72f598e0d60b4ea1bf6b461c6c599b882) @@ -16,6 +16,9 @@ ***************************************************************************/ #include "Common.h" +#ifdef _DD_ +#include "FpgaDD.h" +#endif #include "Messaging.h" #include "Timers.h" @@ -527,6 +530,21 @@ { testConfig[ config ] = TEST_CONFIG_ENABLE_KEY; status = TRUE; +#ifdef _DD_ + if ( config == TEST_CONFIG_DD_FP_ENABLE_BETA_2_0_HW ) + { + if ( TRUE == getTestConfigStatus( TEST_CONFIG_DD_FP_ENABLE_BETA_1_0_HW ) ) + { + // If beta 2.0 config is enabled by mistake when beta 1.0 config is active + SET_ALARM_WITH_2_U32_DATA( ALARM_ID_DD_SOFTWARE_FAULT, SW_FAULT_ID_FPGA_INVALID_STATE, config ) + } + else + { + // initialize FPGA registers to Beta 2.0 + initFPGAPerHW( TRUE ); + } + } +#endif } return status; @@ -550,6 +568,13 @@ { testConfig[ config ] = TEST_CONFIG_DISABLE_KEY; status = TRUE; +#ifdef _DD_ + if ( config == TEST_CONFIG_DD_FP_ENABLE_BETA_2_0_HW ) + { + // initialize FPGA registers to Beta 1.9 or below + initFPGAPerHW( FALSE ); + } +#endif } return status;