Skip to content

Commit c2ef032

Browse files
committed
[crorc] Update Registers for fw v2.7.0
1 parent dd6c7f3 commit c2ef032

File tree

3 files changed

+12
-5
lines changed

3 files changed

+12
-5
lines changed

src/Crorc/Constants.h

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -359,6 +359,12 @@ static constexpr Register I2C_CMD(0x000000D0);
359359
// [0] -> FIXED/DYNAMIC OFFSET
360360
static constexpr Register CFG_CONTROL(0x000001F0);
361361

362+
// Register to control CRORC configuration
363+
// [16] -> SUPERPAGE FLUSH
364+
// [12] -> TF DETECTION
365+
// [11-0] -> TF LENGTH
366+
static constexpr Register CFG_CONTROL_B(0x000001F4);
367+
362368
// Register that contains the firmware hash
363369
static constexpr Register FIRMWARE_HASH(0x0000019C);
364370

@@ -375,7 +381,7 @@ static constexpr Register CHANNEL_CSR(0x00000010);
375381
static constexpr uint32_t CRORC_RESET(0x00000003);
376382
static constexpr uint32_t DATA_RX_ON_OFF(0x00000200);
377383
static constexpr uint32_t RXSTAT_NOT_EMPTY(0x00800000);
378-
static constexpr uint32_t LOOPBACK_ON_OFF = 0x00001000;
384+
static constexpr uint32_t LOOPBACK_ON_OFF(0x00001000);
379385

380386
// Channel Receive Report Base Address
381387
static constexpr Register CHANNEL_RRBAR(0x00000034);

src/Crorc/CrorcBar.cxx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -209,22 +209,22 @@ void CrorcBar::setTimeFrameLength(uint16_t timeFrameLength)
209209
if (timeFrameLength > 256) {
210210
BOOST_THROW_EXCEPTION(Exception() << ErrorInfo::Message("BAD TF LENGTH, should be less or equal to 256") << ErrorInfo::ConfigValue(timeFrameLength));
211211
}
212-
modifyRegister(Crorc::Registers::CFG_CONTROL.index, 16, 12, timeFrameLength);
212+
modifyRegister(Crorc::Registers::CFG_CONTROL_B.index, 0, 11, timeFrameLength);
213213
}
214214

215215
uint16_t CrorcBar::getTimeFrameLength()
216216
{
217-
return (readRegister(Crorc::Registers::CFG_CONTROL.index) >> 16) & 0x0fff;
217+
return readRegister(Crorc::Registers::CFG_CONTROL_B.index) & 0x0fff;
218218
}
219219

220220
void CrorcBar::setTimeFrameDetectionEnabled(bool enabled)
221221
{
222-
modifyRegister(Crorc::Registers::CFG_CONTROL.index, 28, 1, enabled ? 0x1 : 0x0);
222+
modifyRegister(Crorc::Registers::CFG_CONTROL_B.index, 12, 1, enabled ? 0x1 : 0x0);
223223
}
224224

225225
bool CrorcBar::getTimeFrameDetectionEnabled()
226226
{
227-
return (readRegister(Crorc::Registers::CFG_CONTROL.index) >> 28) & 0x1;
227+
return (readRegister(Crorc::Registers::CFG_CONTROL_B.index) >> 12) & 0x1;
228228
}
229229

230230
void CrorcBar::getOpticalPowers(std::map<int, Crorc::Link>& linkMap)

src/FirmwareChecker.cxx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ FirmwareChecker::FirmwareChecker() : mCompatibleFirmwareList({ /* CRU */
3030
{ "6baf11da", "v3.5.1" },
3131
/* CRORC */
3232
{ "72cdb92", "v2.4.1" },
33+
{ "474f9e1", "v2.7.0" },
3334
{ "8e3a98e", "v2.6.1" } })
3435
{
3536
}

0 commit comments

Comments
 (0)