mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-12 04:47:14 +02:00
blackfin fpga programming: if client socket killed or failure while writing to flash, only file pointer closed but fpga not asked to pick up from flash and client exception thrown. If all good and picking up from flash takes more than 10s, it will also throw exception in client. Client exception will prevent a reboot and hence allowing user to try to flash again.
This commit is contained in:
@ -3166,6 +3166,15 @@ void Module::programFPGAviaBlackfin(std::vector<char> buffer) {
|
||||
std::cout << std::flush;
|
||||
}
|
||||
std::cout << '\n';
|
||||
|
||||
// fpga has picked up from flash successfully
|
||||
if (client.Receive<int>() == FAIL) {
|
||||
std::ostringstream os;
|
||||
os << "Detector " << moduleId << " (" << shm()->hostname << ")"
|
||||
<< " returned error: " << client.readErrorMessage();
|
||||
throw RuntimeError(os.str());
|
||||
}
|
||||
|
||||
LOG(logINFO) << "FPGA programmed successfully";
|
||||
rebootController();
|
||||
}
|
||||
|
Reference in New Issue
Block a user