You'r expiation was very helpful. Embarrassing obvious now that it was pointed out. If I take the fft example as a starting point. https://github.com/espressif/esp-dsp/bl ... fft_main.c
My A/D data is in bufferA[]. Would I just copy my buffer into x1: memcpy(x1, bufferA, N);
Replacing that with dsps_tone_gen_f32(x1, N, 1.0, 0.16, 0);
FWIW, I realize later in the example it will mix my signal with x2, but just want to start simple with injecting a 1k tone.
Code: Select all
void app_main()
{
esp_err_t ret;
ESP_LOGI(TAG, "Start Example.");
ret = dsps_fft2r_init_fc32(NULL, CONFIG_DSP_MAX_FFT_SIZE);
if (ret != ESP_OK)
{
ESP_LOGE(TAG, "Not possible to initialize FFT. Error = %i", ret);
return;
}
// Generate hann window
dsps_wind_hann_f32(wind, N);
// Generate input signal for x1 A=1 , F=0.1
dsps_tone_gen_f32(x1, N, 1.0, 0.16, 0);
// Generate input signal for x2 A=0.1,F=0.2
dsps_tone_gen_f32(x2, N, 0.1, 0.2, 0);