diff --git a/flight/Bootloaders/PipXtreme/main.c b/flight/Bootloaders/PipXtreme/main.c index 908589178..840009b77 100644 --- a/flight/Bootloaders/PipXtreme/main.c +++ b/flight/Bootloaders/PipXtreme/main.c @@ -70,14 +70,13 @@ uint8_t processRX(); void jump_to_app(); int main() { - PIOS_SYS_Init(); - if (BSL_HOLD_STATE == 0) - USB_connected = TRUE; - + PIOS_SYS_Init(); + PIOS_Board_Init(); PIOS_IAP_Init(); + + USB_connected = PIOS_USB_CableConnected(0); if (PIOS_IAP_CheckRequest() == TRUE) { - PIOS_Board_Init(); PIOS_DELAY_WaitmS(1000); User_DFU_request = TRUE; PIOS_IAP_ClearRequest(); diff --git a/flight/Modules/RadioComBridge/RadioComBridge.c b/flight/Modules/RadioComBridge/RadioComBridge.c index 5797f4189..3f52d0673 100644 --- a/flight/Modules/RadioComBridge/RadioComBridge.c +++ b/flight/Modules/RadioComBridge/RadioComBridge.c @@ -175,7 +175,7 @@ static int32_t RadioComBridgeStart(void) if(PIOS_COM_TRANS_COM) PIOS_WDG_RegisterFlag(PIOS_WDG_TRANSCOMM); PIOS_WDG_RegisterFlag(PIOS_WDG_RADIORECEIVE); - PIOS_WDG_RegisterFlag(PIOS_WDG_SENDPACKET); + //PIOS_WDG_RegisterFlag(PIOS_WDG_SENDPACKET); //PIOS_WDG_RegisterFlag(PIOS_WDG_SENDDATA); if(PIOS_PPM_RECEIVER) PIOS_WDG_RegisterFlag(PIOS_WDG_PPMINPUT); @@ -527,7 +527,7 @@ static void sendPacketTask(void *parameters) while (1) { #ifdef PIOS_INCLUDE_WDG // Update the watchdog timer. - PIOS_WDG_UpdateFlag(PIOS_WDG_SENDPACKET); + //PIOS_WDG_UpdateFlag(PIOS_WDG_SENDPACKET); #endif /* PIOS_INCLUDE_WDG */ // Wait for a packet on the queue. if (xQueueReceive(data->sendPacketQueue, &p, MAX_PORT_DELAY) == pdTRUE) { diff --git a/flight/PiOS/Boards/STM32103CB_PIPXTREME_Rev1.h b/flight/PiOS/Boards/STM32103CB_PIPXTREME_Rev1.h index 868bba722..5c1e5514a 100755 --- a/flight/PiOS/Boards/STM32103CB_PIPXTREME_Rev1.h +++ b/flight/PiOS/Boards/STM32103CB_PIPXTREME_Rev1.h @@ -224,14 +224,14 @@ extern uint32_t pios_ppm_rcvr_id; //------------------------ #define PIOS_RCVR_MAX_DEVS 3 #define PIOS_RCVR_MAX_CHANNELS 12 -#define PIOS_GCSRCVR_TIMEOUT_MS 100 +#define PIOS_GCSRCVR_TIMEOUT_MS 200 //------------------------- // Receiver PPM input //------------------------- #define PIOS_PPM_MAX_DEVS 1 #define PIOS_PPM_NUM_INPUTS 12 -#define PIOS_PPM_PACKET_UPDATE_PERIOD_MS 25 +#define PIOS_PPM_PACKET_UPDATE_PERIOD_MS 80 //------------------------- // Servo outputs diff --git a/flight/PiOS/STM32F10x/pios_wdg.c b/flight/PiOS/STM32F10x/pios_wdg.c index e0b5b58d9..c8f41bf29 100644 --- a/flight/PiOS/STM32F10x/pios_wdg.c +++ b/flight/PiOS/STM32F10x/pios_wdg.c @@ -73,6 +73,7 @@ uint16_t PIOS_WDG_Init() // watchdog flags now stored in backup registers PWR_BackupAccessCmd(ENABLE); + BKP_WriteBackupRegister(PIOS_WDG_REGISTER, 0x0); wdg_configuration.bootup_flags = BKP_ReadBackupRegister(PIOS_WDG_REGISTER); #endif return delay; diff --git a/flight/PipXtreme/System/pios_board.c b/flight/PipXtreme/System/pios_board.c index ab53d7611..d1ab4bcfd 100644 --- a/flight/PipXtreme/System/pios_board.c +++ b/flight/PipXtreme/System/pios_board.c @@ -296,6 +296,7 @@ void PIOS_Board_Init(void) { } } #endif /* PIOS_INCLUDE_PPM */ + break; case PIPXSETTINGS_FLEXICONFIG_PPM_OUT: case PIPXSETTINGS_FLEXICONFIG_RSSI: case PIPXSETTINGS_FLEXICONFIG_DISABLED: