I get only 4 values in adc polling. Could anyone suggest where am i going wrong
Again, that's something for ST - not Keil.
https://community.st.com/s/
And look at the Product Page for your particular STM32 for examples, application notes, etc.
Keil just make the software tools - the details of the particular chip, how it works, and how to use it have nothing to do with Keil.
See: https://community.arm.com/developer/tools-software/tools/f/keil-forum/43684/lpc2148-timer0-not-working-as-expected/158950#158950
Thank you sir for your quick response.