I need help to compute (or define) the ADC sampling frequency.
I am using CCES and BF506 EZ-kit to sample I and Q data and apply FFT.
I am now testing the code I wrote by injecting a sin wave of 1 MHz.
the ADC is sampling the signal and the FFT (rfftf_fr16()) on 512 points is giving a reasonable spectrum.
Nevertheless, the spectrum doesn't seem to give a correct info about the signal frequency.
I think I am misunderstanding the values of the sampling frequency of the ADC.
In the CCES example project (AD7266_and_ACM), the initial variables are defined as follow:
#define ACM_DEV_NUM 0
#define SPORT_DEV_NUM 1
#define ACLK 5000000u
#define MHZTOHZ (1000000)
#define CLKIN (25 * MHZTOHZ)
#define CORE_MAX (400 * MHZTOHZ)
#define SYSTEM_MAX (100 * MHZTOHZ)
#define VCO_MIN (72 * MHZTOHZ)
#define NUM_ACM_EVENTS 6
#define TIME_PER_EVENT 350
#define START_TIME 100
#define GP_TIMER 2
#define PERIOD (START_TIME + NUM_ACM_EVENTS*TIME_PER_EVENT)
#define WIDTH 10
is the ADC sampling rage of 5 MHz?
Is it defined as SCLK/Period? (with SCLK = 100 MHz in this case)?
thanks a lot for your help!