Skip to content

Commit 7da5453

Browse files
committed
[cru] Reset TX and RX FIFO on config
1 parent ef80c63 commit 7da5453

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/Cru/Gbt.cxx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -291,8 +291,11 @@ uint32_t Gbt::getTxClockFrequency(Link link) //In Hz
291291

292292
void Gbt::resetFifo()
293293
{
294-
mPdaBar->writeRegister(Cru::Registers::BSP_USER_CONTROL.index, 0x80);
295-
mPdaBar->writeRegister(Cru::Registers::BSP_USER_CONTROL.index, 0x0);
294+
mPdaBar->modifyRegister(Cru::Registers::BSP_USER_CONTROL.index, 7, 1, 0x1); // reset TX
295+
mPdaBar->modifyRegister(Cru::Registers::BSP_USER_CONTROL.index, 8, 1, 0x1); // reset RX
296+
297+
mPdaBar->modifyRegister(Cru::Registers::BSP_USER_CONTROL.index, 7, 1, 0x0);
298+
mPdaBar->modifyRegister(Cru::Registers::BSP_USER_CONTROL.index, 8, 1, 0x0);
296299
}
297300

298301
} // namespace roc

0 commit comments

Comments
 (0)