diff --git a/developHw.pro b/developHw.pro index 06fa1ff..a6e4e02 100644 --- a/developHw.pro +++ b/developHw.pro @@ -36,7 +36,6 @@ INCLUDEPATH += \ "/usr/lib/x86_64-linux-gnu/hdf5/serial/include" \ "/usr/include/hdf5/serial" - FORMS += \ mainwindow.ui @@ -48,4 +47,3 @@ else: unix:!android: target.path = /opt/$${TARGET}/bin unix|win32: LIBS += -lSonoPcieDevice unix|win32: LIBS += -L "/usr/lib/x86_64-linux-gnu/hdf5/serial" -lhdf5 unix|win32: LIBS += -L "/usr/lib/x86_64-linux-gnu/hdf5/serial" -lhdf5_cpp - diff --git a/developHw.pro.user b/developHw.pro.user index 2b87529..42078c5 100644 --- a/developHw.pro.user +++ b/developHw.pro.user @@ -1,6 +1,6 @@ - + EnvironmentId diff --git a/hdf5Scenario/hdf5Scenario.cpp b/hdf5Scenario/hdf5Scenario.cpp index d491918..161bec1 100644 --- a/hdf5Scenario/hdf5Scenario.cpp +++ b/hdf5Scenario/hdf5Scenario.cpp @@ -647,9 +647,9 @@ void Hdf5::prbDependParamsRead(ScenPrbDepHardwareParam &prbDepParams) for (quint32 i = 0; i < 4; i++) { tempLpf.clear(); - for (quint32 j = 0; j < 48; j++) + for (quint32 j = 0; j < 64; j++) { - tempLpf.push_back(static_cast(floatArray[j + i * 48])); + tempLpf.push_back(static_cast(floatArray[j + i * 64])); } prbDepParams.prbDepParams.lpfLut.push_back(tempLpf); } diff --git a/include/model/hardware/core/lowLevelApi/TrxBoardUtils/PreProcessorDef.h b/include/model/hardware/core/lowLevelApi/TrxBoardUtils/PreProcessorDef.h index ed2d061..2063672 100644 --- a/include/model/hardware/core/lowLevelApi/TrxBoardUtils/PreProcessorDef.h +++ b/include/model/hardware/core/lowLevelApi/TrxBoardUtils/PreProcessorDef.h @@ -2,6 +2,6 @@ #define PREPROCESSORDEF_H #define MPS_BOARD -#define DEVELOP_UI +//#define DEVELOP_UI #endif //PREPROCESSORDEF_H diff --git a/include/model/hardware/core/lowLevelApi/register/dsp/registerDefinition/LpfLut.h b/include/model/hardware/core/lowLevelApi/register/dsp/registerDefinition/LpfLut.h index e0e1b25..7639012 100644 --- a/include/model/hardware/core/lowLevelApi/register/dsp/registerDefinition/LpfLut.h +++ b/include/model/hardware/core/lowLevelApi/register/dsp/registerDefinition/LpfLut.h @@ -10,7 +10,7 @@ #define BAR 0 #define OFFSET 0x81000 -#define LENGTH 48U +#define LENGTH 64U class LpfLut : public Register { diff --git a/include/model/hardware/core/lowLevelApi/register/sram/registerDefinition/RxParams.h b/include/model/hardware/core/lowLevelApi/register/sram/registerDefinition/RxParams.h index be752a9..59c991c 100644 --- a/include/model/hardware/core/lowLevelApi/register/sram/registerDefinition/RxParams.h +++ b/include/model/hardware/core/lowLevelApi/register/sram/registerDefinition/RxParams.h @@ -46,7 +46,7 @@ public: { _rx = rx; rxActiveElementStepQ = - Calculation::qntzr(_rx->rxActiveElementStep, 0, 8, 8, 0, true, false); + Calculation::qntzr(_rx->rxActiveElementStep, 0, 8, 5, 0, true, false); r0PositionQ = Calculation::qntzr(_rx->r0Position, 0, 17, 0, 0, true); } diff --git a/include/model/hardware/device/SonoDeviceConstant.h b/include/model/hardware/device/SonoDeviceConstant.h index d4383f1..d233475 100644 --- a/include/model/hardware/device/SonoDeviceConstant.h +++ b/include/model/hardware/device/SonoDeviceConstant.h @@ -20,7 +20,7 @@ #define DMA_CTRL_REG 0x00000008 #define START_COMMAND 0x00000001 -#define STOP_COMMAND 0x00000000 +#define STOP_COMMAND 0x11111110 #define COUNTER_MASK 0x0000001F diff --git a/mainwindow.cpp b/mainwindow.cpp index 75f6101..8d17722 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -4740,8 +4740,35 @@ void MainWindow::on_btn_scenChange_clicked() } } +/*************************************************************************************************/ +void MainWindow::on_btn_seRead_clicked() +{ + quint32 offset = 0x26028; + quint32 bar(0); + + quint32 value1 = 0x29301; + quint32 value2 = 0x9301; + quint32 value3 = 0x1E900; + quint32 value4 = 0xE900; + quint32 value5 = 0x29300; + quint32 value6 = 0x9300; + + _usd->writeWord(offset, bar,value1); + _usd->writeWord(offset, bar,value2); + delay(1); + _usd->writeWord(offset, bar,value3); + _usd->writeWord(offset, bar,value4); + delay(1); + quint32 value7 = _usd->readWord(0x26090, bar); + ui->tb_seRead->setText(QString::number(value7)); + + _usd->writeWord(offset, bar, value5); + _usd->writeWord(offset, bar, value6); +} + /*************************************************************************************************/ void MainWindow::on_btn_discard_clicked(void) { _discardTempTest = true; } + diff --git a/mainwindow.h b/mainwindow.h index fbd2569..cef90a1 100644 --- a/mainwindow.h +++ b/mainwindow.h @@ -413,6 +413,8 @@ private slots: void on_chk_statusLogPS_clicked(bool checked); + void on_btn_seRead_clicked(); + signals: void showMessage(QString message); void threeDReady(); diff --git a/mainwindow.ui b/mainwindow.ui index 414695f..e348689 100644 --- a/mainwindow.ui +++ b/mainwindow.ui @@ -42,7 +42,7 @@ - 0 + 6 @@ -5967,7 +5967,7 @@ 720 - 60 + 30 75 23 @@ -5992,7 +5992,7 @@ - 720 + 640 30 85 21 @@ -6002,12 +6002,63 @@ MPS Init + + + + 540 + 30 + 85 + 21 + + + + AO Power + + + + + + 720 + 70 + 81 + 21 + + + + + 75 + true + + + + SE Read + + + + + + 720 + 100 + 81 + 31 + + + + + 50 + false + + + + + + 710 - 120 - 114 + 150 + 101 63 @@ -6049,19 +6100,6 @@ - - - - 540 - 30 - 85 - 21 - - - - AO Power - - diff --git a/src/model/hardware/core/lowLevelApi/register/boardsCtrlMngt/BoardsCtrlMngt.cpp b/src/model/hardware/core/lowLevelApi/register/boardsCtrlMngt/BoardsCtrlMngt.cpp index b24d205..718a9f1 100644 --- a/src/model/hardware/core/lowLevelApi/register/boardsCtrlMngt/BoardsCtrlMngt.cpp +++ b/src/model/hardware/core/lowLevelApi/register/boardsCtrlMngt/BoardsCtrlMngt.cpp @@ -747,17 +747,20 @@ void BoardsCtrlMngt::mpsDeInit() const void BoardsCtrlMngt::setMpsReset() const { + getSupervisorI2cTimeout(); + setSetupCmdJmp(true); + setSetupCmdJmp(false); + getSupervisorI2cDone(); + + timerShot(110); + while(!checkTimeout()); + if(getSetupCmdP24vOnOff()) { getSupervisorI2cTimeout(); setSetupCmdP24vOnOff(false); getSupervisorI2cDone(); } - - getSupervisorI2cTimeout(); - setSetupCmdJmp(true); - setSetupCmdJmp(false); - getSupervisorI2cDone(); } void BoardsCtrlMngt::mpsDacsOff() const diff --git a/src/model/hardware/device/SonoDevice.cpp b/src/model/hardware/device/SonoDevice.cpp index 5833ae2..c68304f 100644 --- a/src/model/hardware/device/SonoDevice.cpp +++ b/src/model/hardware/device/SonoDevice.cpp @@ -34,7 +34,7 @@ void SonoDevice::startDma() void SonoDevice::stopDma() { quint32 dmaCtrl = device.readWord(BAR_REG, DMA_CTRL_REG); - device.writeWord(BAR_REG, DMA_CTRL_REG, STOP_COMMAND|dmaCtrl); + device.writeWord(BAR_REG, DMA_CTRL_REG, STOP_COMMAND&dmaCtrl); } int SonoDevice::getCounter()