STM32Cube FW_L1 V1.10.3 library has a bug and does not support ADC regular group conversions greater than 16 (conversions) ranks.
The CubeMX correctly allows selection of up to 28 conversions, but generated code fails when set above 16. The libraries sequencer scan length definitions end at LL_ADC_REG_SEQ_SCAN_ENABLE_16RANKS and ADC_SQR1_L_4 is not found in the libraries but exists in the STM32L1x programming manual. I should make it clear that I am using the LL (not HAL) drivers. The HAL implementation may work fine.
