To fix the hang problem
Dependencies: FreescaleIAP SimpleDMA mbed-rtos mbed
Fork of CDMS_CODE by
Diff: CDMS_HK.h
- Revision:
- 229:42624b9a08b4
- Parent:
- 224:3ac1f91e0ebc
- Child:
- 230:3d52da8826d3
--- a/CDMS_HK.h Mon Jul 04 23:13:24 2016 +0000 +++ b/CDMS_HK.h Tue Jul 05 09:35:50 2016 +0000 @@ -261,7 +261,7 @@ GPIO_STATUS=(PL_BEE_SW_OC_FAULT)?(GPIO_STATUS)||((uint16_t)(0x1<<5)):(GPIO_STATUS)&(~((uint16_t)(0x1<<5))); //PL_EPS_LATCH_SW_OC_FAULT // to be verified GPIO_STATUS=(PL_EPS_LATCH_SW_OC_FAULT)?(GPIO_STATUS)||((uint16_t)(0x1<<4)):(GPIO_STATUS)&(~((uint16_t)(0x1<<4))); - + } void VERIFY_COMRX() @@ -342,16 +342,35 @@ void HANDLE_HW_FAULT_PL() { if(PL_STATUS != DEVICE_DISABLED) { - if(PL_STATUS == DEVICE_OC_FAULT) - PL_SW_EN_DS = 0; //Power ON PL - + if(PL_STATUS == DEVICE_OC_FAULT){ + PYLD_DFF_CLK = 0; + PYLD_DFF = 1; // Switching ON PL + wait_us(1); + PYLD_DFF_CLK = 1; + wait_us(1); + PYLD_DFF_CLK = 0; + wait_us(1); + } if(PL_BEE_SW_OC_FAULT == 0) { // if OC Fault - PL_SW_EN_DS = 1; // switching OFF PL + PYLD_DFF_CLK = 0; + PYLD_DFF = 0; //Switching OFF PL + wait_us(1); + PYLD_DFF_CLK = 1; + wait_us(1); + PYLD_DFF_CLK = 0; + wait_us(1); PL_FAULTCOUNT++; PL_STATUS = (PL_FAULTCOUNT == 3)?DEVICE_DISABLED:DEVICE_OC_FAULT; } else { - if(PL_STATUS == DEVICE_OC_FAULT) - PL_SW_EN_DS = 0; //Switching OFF PL + if(PL_STATUS == DEVICE_OC_FAULT){ + PYLD_DFF_CLK = 0; + PYLD_DFF = 0; //Switching OFF PL + wait_us(1); + PYLD_DFF_CLK = 1; + wait_us(1); + PYLD_DFF_CLK = 0; + wait_us(1); + } PL_STATUS = DEVICE_ENABLED; PL_FAULTCOUNT = 0; }