Other Parts Discussed in Thread: CC3220SF-LAUNCHXL, , CC3220SF,
Hello, I use CC3220SF-LAUNCHXL and a custom AFE4403 module which uses an SPH7050.
In my previous question, I receive the answer that I can apply FFT to obtain the heart rate.
I wish to ask in detail. Suppose I sample 256 samples of LED data from AFE4403's registers.
1. Regardless of the LED color (Green/Red), I can apply FFT of the "LED2-ALED2VAL" samples to calculate the heart rate, right?
2. As mentioned in this post, (Fs = sample rate, N = FFT size, which is 256 in this case)
frequency = nth bin(which has the absolute maximum FFT value) * Fs / N
// Ref. AFE4403EVM FW SRCv2.3
#define PRF 500 /* Typical ADC sample rate = 4 * PRF, Max ADC conversion time = PRF / 4 */ #define DUTYCYCLE 25 #define ADCRESET_DELAY 5 #define PRP ((AFECLK/PRF)-1) #define DELTA (((PRP+1)*DUTYCYCLE)/100) #define CONV_DELTA ((PRP+1)/4) #define LED2STC_VAL ((((PRP+1)*3)/4)+80) #define LED2ENDC_VAL (LED2STC_VAL-80+DELTA-2) #define LED2LEDSTC_VAL (LED2STC_VAL-80) #define LED2LEDENDC_VAL (LED2ENDC_VAL+1) #define ALED2STC_VAL 80 #define ALED2ENDC_VAL (DELTA-2) #define LED1STC_VAL (((PRP+1)/4)+80) #define LED1ENDC_VAL (LED1STC_VAL-80+DELTA-2)
// CONTROL1 register-NUMAV[7:0] is configured as 7. // ...
Since CC3220SF is based on Cortex-M4F, I chose
arm_cfft_q31 or
to calculate the FFT amplitude.
As expected, the ADC data ready pin signal shows the 500Hz frequency.
Is the PRF (Pulse repetition frequency) value identical to the sampling frequency (Fs) when calculating the frequency of "LED2-ALED2VAL" samples?
Or, as described in the datasheet, is Fs == 4 x PRF or Fs = NUMAV[7:0] x PRF? I wish to double check.
3. Lastly, if
Fs == 4 x PRF
why is 4 multiplied?