From 636050692421e267cc639aa94c214e07b13b2ee1 Mon Sep 17 00:00:00 2001 From: Dhanya Thattil Date: Wed, 6 Oct 2021 14:39:12 +0200 Subject: [PATCH] moving rebootcontroller in programfpga to detector level to sync all modules --- slsDetectorSoftware/src/Detector.cpp | 2 +- slsDetectorSoftware/src/Module.cpp | 6 ------ 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/slsDetectorSoftware/src/Detector.cpp b/slsDetectorSoftware/src/Detector.cpp index 65cf32fae..982d7b3d2 100644 --- a/slsDetectorSoftware/src/Detector.cpp +++ b/slsDetectorSoftware/src/Detector.cpp @@ -2138,6 +2138,7 @@ void Detector::setAdditionalJsonParameter(const std::string &key, void Detector::programFPGA(const std::string &fname, Positions pos) { std::vector buffer = pimpl->readProgrammingFile(fname); pimpl->Parallel(&Module::programFPGA, pos, buffer); + rebootController(pos); } void Detector::resetFPGA(Positions pos) { @@ -2160,7 +2161,6 @@ void Detector::updateFirmwareAndServer(const std::string &sname, Positions pos) { pimpl->Parallel(&Module::copyDetectorServer, pos, sname, hostname); programFPGA(fname, pos); - rebootController(pos); } Result Detector::readRegister(uint32_t addr, Positions pos) const { diff --git a/slsDetectorSoftware/src/Module.cpp b/slsDetectorSoftware/src/Module.cpp index f05fce56f..b3a7504e3 100644 --- a/slsDetectorSoftware/src/Module.cpp +++ b/slsDetectorSoftware/src/Module.cpp @@ -3499,12 +3499,7 @@ void Module::programFPGAviaBlackfin(std::vector buffer) { << " returned error: " << client.readErrorMessage(); throw RuntimeError(os.str()); } - if (moduleIndex == 0) { - LOG(logINFO) << "Copied to flash and checksum verified"; - } - LOG(logINFO) << "FPGA programmed successfully"; - rebootController(); } void Module::programFPGAviaNios(std::vector buffer) { @@ -3582,6 +3577,5 @@ void Module::programFPGAviaNios(std::vector buffer) { throw RuntimeError(os.str()); } LOG(logINFO) << "FPGA programmed successfully"; - rebootController(); } } // namespace sls