Skip to content

Commit 4aa7cba

Browse files
committed
[cru] Add 5ms sleep after triggering the Serial read
1 parent 320abc9 commit 4aa7cba

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/Cru/CruBar.cxx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@
3030
#include "boost/format.hpp"
3131
#include "Utilities/Util.h"
3232

33+
using namespace std::literals;
34+
3335
namespace AliceO2
3436
{
3537
namespace roc
@@ -269,6 +271,7 @@ boost::optional<int32_t> CruBar::getSerialNumber()
269271
uint32_t serial = readRegister(Cru::Registers::SERIAL_NUMBER.index);
270272
if (serial == 0x0) { // Try to populate the serial register in case it's empty
271273
writeRegister(Cru::Registers::SERIAL_NUMBER_CTRL.index, Cru::Registers::SERIAL_NUMBER_TRG);
274+
std::this_thread::sleep_for(5ms); // Wait some time for the I2C calls
272275
serial = readRegister(Cru::Registers::SERIAL_NUMBER.index);
273276
}
274277

0 commit comments

Comments
 (0)