Changeset 10813


Ignore:
Timestamp:
May 25, 2011, 12:14:42 PM (9 years ago)
Author:
ogrimm
Message:
Corrected dcm_ready and dcm_lock bit evaluation
Location:
fact/FADctrl
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • fact/FADctrl/FAD.cc

    r10757 r10813  
    656656
    657657        // Other data
    658         PrintMessage("Frequency %.2f GHz    Phase shift %d    PLL lock %d %d %d %d\n", S.Frequency, S.PhaseShift, S.Lock[0], S.Lock[1], S.Lock[2], S.Lock[3]);
     658        PrintMessage("Frequency %.2f GHz (%s)    Phase shift %d    PLL lock %d %d %d %d\n", S.Frequency, S.RefClk_low ? "too low":"OK", S.PhaseShift, S.Lock[0], S.Lock[1], S.Lock[2], S.Lock[3]);
    659659        PrintMessage("DENABLE %d   DWRITE %d   SPI_clk %d   DCM_lock %d   DCM_ready %d\n", S.denable, S.dwrite, S.spi_clk, S.DCM_lock, S.DCM_ready);   
    660660        PrintMessage("DAC %d %d %d %d   %d %d %d %d\n", S.DAC[0], S.DAC[1], S.DAC[2], S.DAC[3], S.DAC[4], S.DAC[5], S.DAC[6], S.DAC[7] );
     
    11211121 
    11221122  // Print to console
    1123   if (Text[strlen(Text)-1] == '\n') printf("\r");               // Overwrite prompt
     1123  //if (Text[strlen(Text)-1] == '\n') printf("\r");             // Overwrite prompt
    11241124  printf("%s", Text);
    11251125  fflush(stdout);
    1126   if (Text[strlen(Text)-1]=='\n') rl_on_new_line();             // New prompt
     1126  if (Text[strlen(Text)-1] == '\n') rl_on_new_line();
    11271127
    11281128  // Send to DIM text service
  • fact/FADctrl/FADBoard.cc

    r10757 r10813  
    508508          Status.denable = (bool) ( ntohs(Header->PLLLCK) & (1<<11) );
    509509          Status.dwrite = (bool) ( ntohs(Header->PLLLCK) & (1<<10) );
    510           Status.DCM_lock = (bool) ( ntohs(Header->PLLLCK) & (1<<9) );
    511           Status.DCM_ready = (bool) ( ntohs(Header->PLLLCK) & (1<<8) );
    512           Status.spi_clk = (bool) ( ntohs(Header->PLLLCK) & (1<<7) );
     510          Status.DCM_lock = (bool) ( ntohs(Header->PLLLCK) & (1<<7) );
     511          Status.DCM_ready = (bool) ( ntohs(Header->PLLLCK) & (1<<6) );
     512          Status.spi_clk = (bool) ( ntohs(Header->PLLLCK) & (1<<5) );
     513          Status.RefClk_low = (bool) ( ntohs(Header->PLLLCK) & (1<<8) );
    513514
    514515          // Extract temperatures (MSB indicates if temperature is positive or negative)
  • fact/FADctrl/FADBoard.h

    r10757 r10813  
    6767          bool DCM_ready;
    6868          bool spi_clk;
    69 
     69          bool RefClk_low;
     70         
    7071          uint16_t ROI[NChips][NChannels];
    7172          uint16_t DAC[NDAC];
  • fact/FADctrl/FADctrl.cc

    r10186 r10813  
    4242
    4343  while (!M.ExitRequest) {
    44     Command = readline("\rFADctrl> ");
    45 
     44    Command = readline("FADctrl> ");
     45       
    4646        // Check for interruption by signal
    4747    if (Command == NULL) continue;
  • fact/FADctrl/History.txt

    r10757 r10813  
    2929                        Added cleanup handler to thread in FADBoard class to ensure mutex is unlocked when thread
    3030                        cancelled
     3125/5/2011       dcm_lock and dcm_ready bits were incorrectly evaluated.
Note: See TracChangeset for help on using the changeset viewer.