Skip to content

Commit 49671ed

Browse files
committed
Fix RX calibration issue by increasing sleep
1 parent ba2fb02 commit 49671ed

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Cru/Common.cxx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ void rxcal0(std::shared_ptr<Pda::PdaBar> pdaBar, uint32_t baseAddress)
126126

127127
//b. Validate that user has control
128128
uint32_t bit = waitForBit(pdaBar, baseAddress + 4 * 0x280, 2, 0);
129-
if (bit != 0 && false) {
129+
if (bit != 0) {
130130
std::cout << "rxcal0 0" << std::endl;
131131
BOOST_THROW_EXCEPTION(Exception() << ErrorInfo::Message("rxcal0: User does not have control"));
132132
}
@@ -145,7 +145,7 @@ void rxcal0(std::shared_ptr<Pda::PdaBar> pdaBar, uint32_t baseAddress)
145145

146146
//g. Wait..
147147
bit = waitForBit(pdaBar, baseAddress + 4 * 0x281, 1, 0);
148-
if (bit != 0 && false) {
148+
if (bit != 0) {
149149
std::cout << "rxcal0 1" << std::endl;
150150
BOOST_THROW_EXCEPTION(Exception() << ErrorInfo::Message("rxcal0: User does not have control"));
151151
}
@@ -216,7 +216,7 @@ uint32_t waitForBit(std::shared_ptr<Pda::PdaBar> pdaBar,uint32_t address, uint32
216216
uint32_t readValue = pdaBar->readRegister(address/4);
217217
uint32_t bit = Utilities::getBit(readValue, position);
218218

219-
while ((elapsed <= std::chrono::milliseconds(500)) && bit != value){
219+
while ((elapsed <= std::chrono::milliseconds(800)) && bit != value){
220220
readValue = pdaBar->readRegister(address/4);
221221
bit = Utilities::getBit(readValue, position);
222222
curr = std::chrono::system_clock::now();

0 commit comments

Comments
 (0)