aggiunto oscillatore

This commit is contained in:
nzasch
2021-12-31 04:22:22 +01:00
parent 36ef31c453
commit 9306bc9852
16 changed files with 743 additions and 240 deletions

View File

@@ -6,7 +6,6 @@
#define NCO2_INCREMENT (343597383L)
#define NCO2_FREQUENCY (DAC_SAMPLE_RATE/((0xFFFFFFFF)/NCO2_INCREMENT))
#define LF_BUFFER_SIZE (ST2_BUFFER_SIZE/ST2_DECIMATION_FACTOR)
// 1° stadio
// decimazione del singolo stadio
@@ -28,16 +27,21 @@
#define ST2_FILTER_BLOCK_SIZE (ST2_BUFFER_SIZE)
#define ST2_FILTER_TAP_NUM (128)
#define LF_BUFFER_SIZE (ST2_BUFFER_SIZE/ST2_DECIMATION_FACTOR)
// audio filter
#define AUDIO_FILTER_TAP_NUM 128
#define AUDIO_FILTER_FREQ_DEF (1350)
#define AUDIO_FILTER_FREQ_DEF (1250)
#define AUDIO_FILTER_FREQ_MAX (DAC_SAMPLE_RATE/2)
#define AUDIO_FILTER_BW_DEF (2000)
#define AUDIO_FILTER_BW_MAX (DAC_SAMPLE_RATE/2)
#define AUDIO_FILTER_BETA_DEF (16)
#define AUDIO_FILTER_BLOCK_SIZE LF_BUFFER_SIZE
extern int32_t rx_signal;
#define RX_SMETER_SCALE 4
extern uint8_t rx_signal, rx_signal_last;
extern q31_t rx_nco1_increment;
// filtro st2
extern arm_fir_decimate_instance_q31 st2_filter_I_struct;
@@ -67,6 +71,4 @@ void audio_filter_init(void);
void audio_filter_generate_coeffs(int32_t *Coeffs, uint32_t freq, uint32_t bw, uint8_t beta);
q31_t hb_fir15(q31_t * samples_ringbuf, uint8_t sample_index, uint8_t buff_size_mask, q31_t * coefficients);
void rx_measure_signal(q31_t *samples, uint16_t size);
#endif