The whole CCR register is written, clearing these two bits. As a result any previous calls to adcSTM32EnableTSVREFE() or adcSTM32EnableVBATE() are ineffective.
1- start ADC1
2- enable VREF and/or VBAT
3- start ADC2.
Step (3) disables VREF and VBAT. One might argue that the developer should know better and enable VREF and/or VBAT after all ADCs have been started, but that approach hinders code modularity.
See attached trivial patch.
BTW: I\'ve noticed that whenever the reference manual describes a bit as \"reserved, must be kept at reset value\", the ChibiOS/RT code just sets it to zero. Maybe I\'m being a bit overzealous, but isn\'t it asking for trouble in the future? (for example when new silicon revisions are rolled out).