# How to set up sampling frequency for S5D9

Hi Forum,

I am using S5D9 device with 16 channels of ADC12 enabled.As given in datasheet r01ds0303eu0130datasheet-synergy-s5d9.pdf page no. 90,I have set PCLKC 60MHz

using adc hal driver and sampling state to max : 24,does it mean that after 24 sampling state ,adc samples will be ready? and with PCLK frequency 60Mhz what will be the sampling frequency?How sampling rate/conversion time for each channel can be determined?

I am not getting expected number of samples.

I need to congifure sampling rate of 100KHz,Can anyone help me guide through what settings needs to be set in terms of sampling state and PCLKC frequency etc?

• Hi Kirti,

Have you seen this thread: https://renesasrulz.com/synergy/f/synergy---forum/16576/s5d5-maximum-12bit-adc-rate This may not fully answer your questions but might help with the sampling rate calculation. You can also check chapter 47.3.6 of the user manual hardware for additional info regarding the conversion time.

JB
RenesasRulz Forum Moderator

Hi JB,

I have gone through the thread shared by you,

I am using 16 channels in continous mode with S/H enabled in software trigger for both unit0 and unit1,convertion time :

I am not sure about where the disconnection assisatnce time tDIS is set through configuration.xml,

So with the above equation and table 47.10 (page number 1757 of user manual),PCLKC :PCLKB set to  1:1,tSCAN

=tD + tSPLSH + (tDIS × n) + tDIAG + (tCONV × n) *5 + tED -tED+tSHED + tSPLSH + (tDIS × n)+tDIAG + tDSD + (tCONV × n) *5 + tSHED.
=4+0+0+2+13*16+2+12+2+2+13*16+2
=442/60M = 7.36 Microsec

Does its mean that each channel will take 7.36 Microsec for conversion ?

with the above setting,for input signal 50Hz(20ms) applied at adc channels,I am expecting no.of samples = 20ms/7.36Microsec = 2717.

however I am getting only 9 smaples.