Hi Joffray,
Thanks for sharing your code; many others are interested in controlling this Reference Board using the .dll and this is the ideal forum for that!
The results of the CAL bit and the CAL pin are OR'd internally to the ADC, which is why an on-command calibration may be initiated via either bit or pin. In theory, there should be no difference to the calibration function whether the ADC is running with on-board or external sampling clock applied, so I suspect some bug in the code. Here are a number of ways to verify whether calibration has taken place:
1. While calibration is running, the CalRun output will be high. This signal is sent to the FPGA where it is pulse-stretched, and the resultant signal is applied to the ADC_CALIBRATION LED (as you have already noted). This is the best way to check.
2. Before calibration, the performance will not be as good as afterwards. Performance should be close to the datasheet numbers post calibration.
Kind regards,
Marjorie