@@ -363,7 +363,8 @@ void ROCCosmicRayVetoInterface::pause(void) {}
363363void ROCCosmicRayVetoInterface::resume (void ) {}
364364
365365// ==============================================================================
366- void ROCCosmicRayVetoInterface::start (std::string) { // runNumber)
366+ void ROCCosmicRayVetoInterface::start (std::string) { // runNumber)
367+ ResetRxBuffers ();
367368 // take pedestrals
368369 // this->writeRegister(FEB::AllFEB|FEB::AllFPGA|FEB::CSRBroadCast, 0x100);
369370 // TLOG(TLVL_Start) << "Taking pedestrals" << __E__;
@@ -421,6 +422,7 @@ void ROCCosmicRayVetoInterface::ResetRxBuffers() {
421422 this ->writeRegister (ROC::GTP_CRC, 0x1 );
422423 this ->writeRegister (ROC::CRS, 0x300 );
423424 this ->writeRegister (ROC::GTP_CRC, 0x1 );
425+ sleep (1 );
424426}
425427void ROCCosmicRayVetoInterface::SoftReset (__ARGS__)
426428{
@@ -572,15 +574,17 @@ void ROCCosmicRayVetoInterface::RocConfigure(bool gr, uint16_t grn, uint16_t uBo
572574
573575 // enable package forwarding based on markers
574576 // this->writeRegister(ROC::CR, 0x20);
577+ usleep (1000000 );
578+ // return;
575579 SetMarkerSync (true );
576580
577- this ->writeRegister (ROC::Clk80MHz, 0x0 ); // enable the 80MHz clock alignment
581+ this ->writeRegister (ROC::Clk80MHz, 0x1 ); // enable the 80MHz clock alignment
578582
579583 // Set CSR of data-FPGAs
580584 // bit 3: FM Rx Enable
581585 // bit 5: DDR Write Sequencer Enable
582586 // bit 7: DDR read sequencer Enable
583- this ->writeRegister (ROC::Data_Broadcast|ROC::Data_CRC, 0xA8 ); //
587+ this ->writeRegister (ROC::Data_Broadcast|ROC::Data_CRC, 0xA8 ); //
584588
585589 // Reset input buffers
586590 ResetRxBuffers ();
0 commit comments