If you look at the DS0Quad_SourceCode/SYS_V1.50/source directory from github, in the file Config.c on line 425 you will see the offending code DMA2_CNDTR4 = 36 // DMA2_CH4 number of data(*2 Bytes) In theory, if you call __Set(ANALOG_CNT, XXX) it should reset this value to the specified value. I haven’t looked at the ARM spec, but my guess is that you cannot change the value of the CNDTR4 register unless you first stop the DMA. You should be able to stop it by:
DMA2_CCR4 &= ~1;
and restart by
DMA2_CCR4 |= 1;