TOT Tuning algorithm not converging
The binary search algorithm of ToT tuning seems to have a bug, where the success is determined by the user-given range. For example, if the optimal KRUM_CURR_LIN value for a ToT target of 5.3 is 15, and the range is set to 10 - 40, binary search will converge to 16 and then complain that it could not tune ToT. If you set the range to 10 - 50, it will converge to 15 and everything is fine.
See logfile:
2019-06-28 14:06:50,118 - [Periphery ] - INFO Periphery is disabled.
2019-06-28 14:06:50,125 - [BDAQ53 ] - SUCCESS Found board BDAQ53 with Displayport running firmware version 0.12
2019-06-28 14:06:50,125 - [BDAQ53 ] - INFO Found 1 Aurora receiver channel(s) with 1 lane(s)
2019-06-28 14:06:50,125 - [BDAQ53 ] - INFO Si570 oscillator is already configured
2019-06-28 14:06:50,236 - [BDAQ53 ] - INFO Aurora receiver running at 640Mb/s
2019-06-28 14:06:50,238 - [RD53A ] - INFO Initializing communication...
2019-06-28 14:06:50,340 - [RD53A ] - INFO Chip is running at 640Mb/s
2019-06-28 14:06:50,340 - [RD53A ] - INFO 1 Aurora lane active
2019-06-28 14:06:50,354 - [RD53A ] - SUCCESS Communication established
2019-06-28 14:06:51,350 - [RD53A ] - INFO Mean chip temperature is (35 +- 6)°C
2019-06-28 14:06:51,351 - [TuneTot ] - INFO Configuring chip...
2019-06-28 14:06:53,988 - [TuneTot ] - INFO Starting scan...
2019-06-28 14:06:53,988 - [TuneTot ] - INFO Tune ToT for: LIN
2019-06-28 14:06:54,011 - [TuneTot ] - INFO Setting KRUM_CURR_LIN = 25 (iteration 1)
2019-06-28 14:06:57,740 - [TuneTot ] - INFO Mean ToT at KRUM_CURR_LIN = 25 is 2.86
2019-06-28 14:06:57,740 - [TuneTot ] - INFO Setting KRUM_CURR_LIN = 18 (iteration 2)
2019-06-28 14:07:00,793 - [TuneTot ] - INFO Mean ToT at KRUM_CURR_LIN = 18 is 4.27
2019-06-28 14:07:00,793 - [TuneTot ] - INFO Setting KRUM_CURR_LIN = 14 (iteration 3)
2019-06-28 14:07:03,854 - [TuneTot ] - INFO Mean ToT at KRUM_CURR_LIN = 14 is 5.60
2019-06-28 14:07:03,854 - [TuneTot ] - INFO Setting KRUM_CURR_LIN = 17 (iteration 4)
2019-06-28 14:07:06,910 - [TuneTot ] - INFO Mean ToT at KRUM_CURR_LIN = 17 is 4.57
2019-06-28 14:07:06,910 - [TuneTot ] - INFO Setting KRUM_CURR_LIN = 16 (iteration 5)
2019-06-28 14:07:09,966 - [TuneTot ] - INFO Mean ToT at KRUM_CURR_LIN = 16 is 4.87
2019-06-28 14:07:09,966 - [TuneTot ] - INFO Setting KRUM_CURR_LIN = 16 (iteration 6)
2019-06-28 14:07:13,073 - [TuneTot ] - INFO Mean ToT at KRUM_CURR_LIN = 16 is 4.88
2019-06-28 14:07:13,073 - [TuneTot ] - INFO Setting KRUM_CURR_LIN = 16 (iteration 7)
2019-06-28 14:07:16,133 - [TuneTot ] - INFO Mean ToT at KRUM_CURR_LIN = 16 is 4.89
2019-06-28 14:07:16,134 - [TuneTot ] - INFO Setting KRUM_CURR_LIN = 16 (iteration 8)
2019-06-28 14:07:19,310 - [TuneTot ] - INFO Mean ToT at KRUM_CURR_LIN = 16 is 4.87
2019-06-28 14:07:19,310 - [TuneTot ] - INFO Setting KRUM_CURR_LIN = 16 (iteration 9)
2019-06-28 14:07:22,376 - [TuneTot ] - INFO Mean ToT at KRUM_CURR_LIN = 16 is 4.88
2019-06-28 14:07:22,376 - [TuneTot ] - INFO Setting KRUM_CURR_LIN = 16 (iteration 10)
2019-06-28 14:07:25,434 - [TuneTot ] - INFO Mean ToT at KRUM_CURR_LIN = 16 is 4.88
2019-06-28 14:07:25,534 - [TuneTot ] - WARNING Number of maximum iteration is reached. Could not tune ToT for: LIN
2019-06-28 14:07:25,534 - [TuneTot ] - SUCCESS Scan finished
2019-06-28 14:07:25,537 - [RD53A ] - INFO Recording chip status...
2019-06-28 14:07:27,920 - [TuneTot ] - INFO Closing raw data file: /home/michael/git/bdaq53/bdaq53/scans/output_data/20190628_140649_tot_tuning.h5
2019-06-28 14:07:27,923 - [Analysis ] - INFO Analyzing data...
2019-06-28 14:07:33,304 - [Plotting ] - INFO Creating selected plots...
2019-06-28 14:07:34,722 - [Plotting ] - INFO Closing output PDF file: /home/michael/git/bdaq53/bdaq53/scans/output_data/20190628_140649_tot_tuning_interpreted.pdf
2019-06-28 14:07:34,796 - [TuneTot ] - SUCCESS All done! ```
Edited by Michael Daas