Skip to content

Commit 3447258

Browse files
committed
[roc-config] Reset the GBT FIFO on config end
1 parent 6524160 commit 3447258

File tree

3 files changed

+8
-0
lines changed

3 files changed

+8
-0
lines changed

src/Cru/CruBar.cxx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -629,6 +629,7 @@ void CruBar::configure(bool force)
629629
gbt.calibrateGbt(mLinkMap);
630630
Cru::fpllref(mLinkMap, mPdaBar, 2);
631631
Cru::fpllcal(mLinkMap, mPdaBar);
632+
gbt.resetFifo();
632633
}
633634
}
634635

src/Cru/Gbt.cxx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -287,5 +287,11 @@ uint32_t Gbt::getTxClockFrequency(Link link) //In Hz
287287
return mPdaBar->readRegister(address / 4);
288288
}
289289

290+
void Gbt::resetFifo()
291+
{
292+
mPdaBar->writeRegister(Cru::Registers::BSP_USER_CONTROL.index, 0x80);
293+
mPdaBar->writeRegister(Cru::Registers::BSP_USER_CONTROL.index, 0x0);
294+
}
295+
290296
} // namespace roc
291297
} // namespace AliceO2

src/Cru/Gbt.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ class Gbt
4747
LinkStatus getStickyBit(Link link);
4848
uint32_t getRxClockFrequency(Link link);
4949
uint32_t getTxClockFrequency(Link link);
50+
void resetFifo();
5051

5152
private:
5253
uint32_t getSourceSelectAddress(Link link);

0 commit comments

Comments
 (0)