Line 146... |
Line 146... |
146 |
MRange=TDC_MRANGE2; // sets measurement mode |
146 |
MRange=TDC_MRANGE2; // sets measurement mode |
147 |
hit1=TDC_MRANGE2_HIT1_START; // time is always counted from start pulse at this measurement mode |
147 |
hit1=TDC_MRANGE2_HIT1_START; // time is always counted from start pulse at this measurement mode |
148 |
hitin2=TDC_HITIN2_0; // disable channel 2 (normal state for this mode) |
148 |
hitin2=TDC_HITIN2_0; // disable channel 2 (normal state for this mode) |
149 |
en_int= TDC_INT_ALU | TDC_INT_ENDHIT | TDC_INT_TIMEOUT; // eneble all possible interrupt flags |
149 |
en_int= TDC_INT_ALU | TDC_INT_ENDHIT | TDC_INT_TIMEOUT; // eneble all possible interrupt flags |
150 |
en_err_val=TDC_ERRVAL_EN; // enable of error value output |
150 |
en_err_val=TDC_ERRVAL_EN; // enable of error value output |
151 |
clkhsdiv=TDC_CLKHSDIV_2; // divide clkHS by 4 |
151 |
clkhsdiv=TDC_CLKHSDIV_4; // divide clkHS by 4 |
152 |
firenum=TDC_FIRENUM_1; |
152 |
firenum=TDC_FIRENUM_1; |
153 |
|
153 |
|
154 |
switch(hits) // sets number of hits on channel 1 |
154 |
switch(hits) // sets number of hits on channel 1 |
155 |
{ |
155 |
{ |
156 |
case 1: |
156 |
case 1: |