From dbf09cabf44c2bfff767e350b65f92a586819b34 Mon Sep 17 00:00:00 2001 From: Nicholas Corgan Date: Mon, 17 Aug 2015 10:21:20 -0700 Subject: OctoClock: shortened bootloader's wait for burner signal --- firmware/octoclock/bootloader/main.c | 8 ++------ host/utils/octoclock_firmware_burner.cpp | 4 ++-- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/firmware/octoclock/bootloader/main.c b/firmware/octoclock/bootloader/main.c index 09f740d31..15e4f893c 100644 --- a/firmware/octoclock/bootloader/main.c +++ b/firmware/octoclock/bootloader/main.c @@ -1,5 +1,5 @@ /* - * Copyright 2014 Ettus Research LLC + * Copyright 2014-2015 Ettus Research LLC * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -34,11 +34,7 @@ #include "octoclock/common.h" -/* - * The number for 5 seconds is close enough to 65535 that the - * timer may have overflowed before the main loop queries it. - */ -#define TIME_PASSED (TCNT1 > (TIMER1_ONE_SECOND*5) || (TIFR & _BV(TOV1))) +#define TIME_PASSED (TCNT1 > TIMER1_ONE_SECOND) /* * States diff --git a/host/utils/octoclock_firmware_burner.cpp b/host/utils/octoclock_firmware_burner.cpp index 272394860..c338cd818 100644 --- a/host/utils/octoclock_firmware_burner.cpp +++ b/host/utils/octoclock_firmware_burner.cpp @@ -273,7 +273,7 @@ bool reset_octoclock(const std::string &ip_addr){ throw uhd::runtime_error("Failed to place device in state to receive firmware."); } - boost::this_thread::sleep(boost::posix_time::milliseconds(3000)); + boost::this_thread::sleep(boost::posix_time::milliseconds(500)); return (bootloader_find(ip_addr).size() == 1); } @@ -416,7 +416,7 @@ int UHD_SAFE_MAIN(UHD_UNUSED(int argc), UHD_UNUSED(char *argv[])){ std::cout << "done." << std::endl; std::cout << "Waiting for OctoClock to reinitialize..." << std::flush; - boost::this_thread::sleep(boost::posix_time::milliseconds(5000)); + boost::this_thread::sleep(boost::posix_time::milliseconds(500)); octoclocks = device::find(str(boost::format("addr=%s") % ip_addr), device::CLOCK); if(octoclocks.size() == 1){ if(octoclocks[0]["type"] == "octoclock-bootloader"){ -- cgit v1.2.3