Some info of my setup:
Module: ESP32-C3-MINI
IDF: V4.4.2
ADC configuration:
Sampling frequency 10kHz
ADC Unit 1, Channel 2
Attenuation 11dB
Below are some screenshots of the signal going into the ADC pin (shown by oscilloscope) and values read back by ADC (printed out in MS Excel)
100mV 50Hz signal
Oscilloscope:

Raw ADC:

40mV 50Hz signal
Oscilloscope:

Raw ADC:

15mV 50Hz signal
Oscilloscope:

Raw ADC:

Any help to find the cause of the 'stepping' of the raw adc values would be greatly appreciated.
Thank you.