Updated version: 2nd DNR and CW decoder

Added two main function:
Second stage in DNR nouse reduction
CW decoder.
master
Giuseppe Callipo 2019-01-25 22:12:37 +01:00
rodzic ba8944a697
commit 0cf67a4de3
135 zmienionych plików z 55933 dodań i 17443 usunięć

Plik binarny nie jest wyświetlany.

Wyświetl plik

@ -260,7 +260,7 @@
1537907867 source:c:\work\radiodsp_cortexm4\src\system_stm32f4xx.c
"stm32f4xx.h"
1546269028 source:c:\work\radiodsp_cortexm4\src\main.c
1548449301 source:c:\work\radiodsp_cortexm4\src\main.c
"stm32f4xx_conf.h"
"io_audio.h"
"io_display.h"
@ -276,6 +276,7 @@
"tm_stm32f4_ili9341.h"
"tm_stm32f4_fonts.h"
"tm_stm32f4_rotary_encoder.h"
"morseDecode.h"
"filter_noise_reduction.h"
"filter_audio_segnal.h"
"general.h"
@ -412,9 +413,9 @@
1438082751 source:c:\work\radiodsp_cortexm4\src\tm\tm_stm32f4_spi_dma.c
"tm_stm32f4_spi_dma.h"
1545254063 c:\work\radiodsp_cortexm4\src\tm_spi\defines.h
1546900566 c:\work\radiodsp_cortexm4\src\tm_spi\defines.h
1541547923 c:\work\radiodsp_cortexm4\src\tm_spi\tm_stm32f4_delay.h
1546896124 c:\work\radiodsp_cortexm4\src\tm_spi\tm_stm32f4_delay.h
"stm32f4xx.h"
"stm32f4xx_rcc.h"
"defines.h"
@ -464,7 +465,7 @@
"stm32f4xx.h"
"defines.h"
1542490793 source:c:\work\radiodsp_cortexm4\src\tm_spi\tm_stm32f4_delay.c
1546895956 source:c:\work\radiodsp_cortexm4\src\tm_spi\tm_stm32f4_delay.c
"tm_stm32f4_delay.h"
1426331066 source:c:\work\radiodsp_cortexm4\src\tm_spi\tm_stm32f4_disco.c
@ -507,7 +508,7 @@
"tm_stm32f4_gpio.h"
"tm_stm32f4_exti.h"
1546267026 source:c:\work\radiodsp_cortexm4\src\filter_noise_reduction.c
1548449747 source:c:\work\radiodsp_cortexm4\src\filter_noise_reduction.c
"stm32f4xx_conf.h"
"io_audio.h"
"arm_math.h"
@ -519,18 +520,19 @@
<complex.h>
"filter_noise_reduction.h"
"filter_audio_segnal.h"
"morseDecode.h"
1546120482 c:\work\radiodsp_cortexm4\inc\filter_noise_reduction.h
1548449786 c:\work\radiodsp_cortexm4\inc\filter_noise_reduction.h
1546006247 source:c:\work\radiodsp_cortexm4\src\io_audio.c
1546722282 source:c:\work\radiodsp_cortexm4\src\io_audio.c
"io_audio.h"
1546120490 c:\work\radiodsp_cortexm4\inc\io_audio.h
1547849090 c:\work\radiodsp_cortexm4\inc\io_audio.h
"stm32f4xx.h"
"arm_math.h"
"general.h"
1546268445 source:c:\work\radiodsp_cortexm4\src\io_display.c
1548449220 source:c:\work\radiodsp_cortexm4\src\io_display.c
"io_display.h"
"stm32f4xx_conf.h"
"defines.h"
@ -540,21 +542,21 @@
"tm_stm32f4_ili9341.h"
"tm_stm32f4_fonts.h"
1546268665 c:\work\radiodsp_cortexm4\inc\io_display.h
1547847520 c:\work\radiodsp_cortexm4\inc\io_display.h
"stm32f4xx.h"
"arm_math.h"
"general.h"
1546264609 source:c:\work\radiodsp_cortexm4\src\filter_audio_segnal.c
1548003885 source:c:\work\radiodsp_cortexm4\src\filter_audio_segnal.c
"stm32f4xx_conf.h"
"filter_audio_segnal.h"
1546264609 c:\work\radiodsp_cortexm4\inc\filter_audio_segnal.h
1548001655 c:\work\radiodsp_cortexm4\inc\filter_audio_segnal.h
"stm32f4xx_conf.h"
"arm_math.h"
"general.h"
1546267359 c:\work\radiodsp_cortexm4\inc\general.h
1548000322 c:\work\radiodsp_cortexm4\inc\general.h
1545859316 c:\work\radiodsp_cortexm4\inc\dynamicfilters.h
@ -651,3 +653,19 @@
1545848924 c:\work\cmsis_5-5.4.0\cmsis_5-5.4.0\cmsis\dsp\include\arm_common_tables.h
"arm_math.h"
1548449946 c:\work\radiodsp_cortexm4\inc\morsedecode.h
1548449573 source:c:\work\radiodsp_cortexm4\src\morsedecode.c
"stm32f4xx_conf.h"
"morseDecode.h"
"io_display.h"
1426443584 source:c:\work\radiodsp_cortexm4\src\tm_stm32f4_timer_properties.c
"tm_stm32f4_timer_properties.h"
1453109823 c:\work\radiodsp_cortexm4\inc\tm_stm32f4_timer_properties.h
"stm32f4xx.h"
"stm32f4xx_rcc.h"
"stm32f4xx_tim.h"
"defines.h"

Wyświetl plik

@ -16,6 +16,9 @@
<Option projectDeviceOptionsRelation="0" />
<Compiler>
<Add option="-Wall" />
<Add option="-fsingle-precision-constant" />
<Add option="-fschedule-insns2" />
<Add option="-fschedule-insns" />
<Add option="-fdata-sections" />
<Add option="-ffunction-sections" />
<Add option="-O3" />
@ -58,6 +61,8 @@
<Add option="$heap=0x0000" />
</Device>
<Compiler>
<Add option="-fschedule-insns2" />
<Add option="-fschedule-insns" />
<Add option="-fdata-sections" />
<Add option="-ffunction-sections" />
<Add option="-O3" />
@ -117,6 +122,7 @@
<Unit filename="inc\general.h" />
<Unit filename="inc\io_audio.h" />
<Unit filename="inc\io_display.h" />
<Unit filename="inc\morseDecode.h" />
<Unit filename="inc\stm32f4xx.h" />
<Unit filename="inc\stm32f4xx_conf.h" />
<Unit filename="inc\system_stm32f4xx.h" />
@ -254,6 +260,9 @@
<Unit filename="src\main.c">
<Option compilerVar="CC" />
</Unit>
<Unit filename="src\morseDecode.c">
<Option compilerVar="CC" />
</Unit>
<Unit filename="src\startup_stm32f4xx.S">
<Option compilerVar="CC" />
</Unit>
@ -270,10 +279,6 @@
<Unit filename="src\tm_enc\tm_stm32f4_rotary_encoder.h" />
<Unit filename="src\tm_spi\attributes.h" />
<Unit filename="src\tm_spi\defines.h" />
<Unit filename="src\tm_spi\tm_stm32f4_delay.c">
<Option compilerVar="CC" />
</Unit>
<Unit filename="src\tm_spi\tm_stm32f4_delay.h" />
<Unit filename="src\tm_spi\tm_stm32f4_disco.c">
<Option compilerVar="CC" />
</Unit>

Wyświetl plik

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<EmBitz_layout_file>
<ActiveTarget name="Release" />
<File name="..\CMSIS_5-5.4.0\CMSIS_5-5.4.0\CMSIS\Core\Include\core_cm4.h" open="1" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="..\CMSIS_5-5.4.0\CMSIS_5-5.4.0\CMSIS\Core\Include\core_cm4.h" open="0" top="0" tabpos="11" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="3736" topLine="96" />
</Cursor>
@ -16,34 +16,49 @@
<Cursor1 position="114273" topLine="3702" />
</Cursor>
</File>
<File name="inc\filter_audio_segnal.h" open="1" top="0" tabpos="10" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="inc\filter_audio_segnal.h" open="1" top="0" tabpos="9" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="1572" topLine="25" />
<Cursor1 position="716" topLine="14" />
</Cursor>
</File>
<File name="inc\filter_noise_reduction.h" open="0" top="0" tabpos="10" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="inc\filter_noise_reduction.h" open="1" top="0" tabpos="12" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="869" topLine="7" />
<Cursor1 position="1322" topLine="32" />
</Cursor>
</File>
<File name="inc\general.h" open="1" top="0" tabpos="4" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="inc\general.h" open="1" top="0" tabpos="10" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="718" topLine="15" />
<Cursor1 position="1257" topLine="32" />
</Cursor>
</File>
<File name="inc\io_audio.h" open="1" top="0" tabpos="9" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="inc\io_audio.h" open="1" top="0" tabpos="13" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="1640" topLine="29" />
<Cursor1 position="1115" topLine="30" />
</Cursor>
</File>
<File name="inc\io_display.h" open="1" top="0" tabpos="8" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="inc\io_display.h" open="1" top="0" tabpos="14" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="1768" topLine="35" />
<Cursor1 position="991" topLine="27" />
</Cursor>
</File>
<File name="inc\stm32f4xx.h" open="0" top="0" tabpos="15" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="inc\morseDecode.h" open="1" top="0" tabpos="19" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="92933" topLine="42" />
<Cursor1 position="520" topLine="0" />
</Cursor>
</File>
<File name="inc\stm32f4xx.h" open="1" top="0" tabpos="20" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="92933" topLine="490" />
</Cursor>
</File>
<File name="inc\stm32f4xx_conf.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="0" topLine="60" />
</Cursor>
</File>
<File name="inc\tm_stm32f4_timer_properties.h" open="1" top="0" tabpos="11" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="2041" topLine="46" />
</Cursor>
</File>
<File name="SPL\inc\stm32f4xx_gpio.h" open="0" top="0" tabpos="11" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
@ -51,6 +66,11 @@
<Cursor1 position="16472" topLine="364" />
</Cursor>
</File>
<File name="SPL\inc\stm32f4xx_rcc.h" open="1" top="0" tabpos="18" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="1839" topLine="76" />
</Cursor>
</File>
<File name="SPL\inc\stm32f4xx_spi.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="8144" topLine="174" />
@ -61,42 +81,52 @@
<Cursor1 position="34015" topLine="767" />
</Cursor>
</File>
<File name="SPL\src\stm32f4xx_rcc.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="13243" topLine="290" />
</Cursor>
</File>
<File name="SPL\src\stm32f4xx_tim.c" open="0" top="0" tabpos="8" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="16627" topLine="411" />
</Cursor>
</File>
<File name="src\filter_audio_segnal.c" open="1" top="0" tabpos="11" split="0" active="1" splitpos="0" zoom_1="-1" zoom_2="0">
<File name="src\filter_audio_segnal.c" open="1" top="0" tabpos="8" split="0" active="1" splitpos="0" zoom_1="-1" zoom_2="0">
<Cursor>
<Cursor1 position="3237" topLine="189" />
<Cursor1 position="2773" topLine="166" />
</Cursor>
</File>
<File name="src\filter_noise_reduction.c" open="1" top="0" tabpos="5" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="src\filter_noise_reduction.c" open="1" top="0" tabpos="3" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="4819" topLine="124" />
<Cursor1 position="5587" topLine="166" />
</Cursor>
</File>
<File name="src\io_audio.c" open="1" top="0" tabpos="7" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="src\io_audio.c" open="1" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="496" topLine="172" />
<Cursor1 position="8310" topLine="102" />
</Cursor>
</File>
<File name="src\io_display.c" open="1" top="1" tabpos="6" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="src\io_display.c" open="1" top="1" tabpos="4" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="4449" topLine="84" />
<Cursor1 position="6312" topLine="35" />
</Cursor>
</File>
<File name="src\main.c" open="1" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="-1" zoom_2="0">
<File name="src\main.c" open="1" top="0" tabpos="7" split="0" active="1" splitpos="0" zoom_1="-1" zoom_2="0">
<Cursor>
<Cursor1 position="6138" topLine="197" />
<Cursor1 position="3920" topLine="53" />
</Cursor>
</File>
<File name="src\startup_stm32f4xx.S" open="1" top="0" tabpos="3" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="src\morseDecode.c" open="1" top="0" tabpos="6" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="9439" topLine="181" />
<Cursor1 position="3070" topLine="61" />
</Cursor>
</File>
<File name="src\system_stm32f4xx.c" open="0" top="0" tabpos="12" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="src\startup_stm32f4xx.S" open="1" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="9439" topLine="187" />
</Cursor>
</File>
<File name="src\system_stm32f4xx.c" open="1" top="0" tabpos="17" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="10382" topLine="255" />
</Cursor>
@ -108,32 +138,22 @@
</File>
<File name="src\tm_spi\attributes.h" open="0" top="0" tabpos="15" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="0" topLine="18" />
<Cursor1 position="0" topLine="14" />
</Cursor>
</File>
<File name="src\tm_spi\defines.h" open="0" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="src\tm_spi\defines.h" open="1" top="0" tabpos="16" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="2553" topLine="45" />
</Cursor>
</File>
<File name="src\tm_spi\tm_stm32f4_delay.c" open="0" top="0" tabpos="7" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="1492" topLine="41" />
</Cursor>
</File>
<File name="src\tm_spi\tm_stm32f4_delay.h" open="0" top="0" tabpos="8" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="6011" topLine="219" />
<Cursor1 position="2798" topLine="31" />
</Cursor>
</File>
<File name="src\tm_spi\tm_stm32f4_disco.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="0" topLine="30" />
<Cursor1 position="0" topLine="3" />
</Cursor>
</File>
<File name="src\tm_spi\tm_stm32f4_disco.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="4238" topLine="108" />
<Cursor1 position="4238" topLine="141" />
</Cursor>
</File>
<File name="src\tm_spi\tm_stm32f4_fonts.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
@ -148,27 +168,32 @@
</File>
<File name="src\tm_spi\tm_stm32f4_gpio.h" open="0" top="0" tabpos="4" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="10073" topLine="331" />
<Cursor1 position="10073" topLine="57" />
</Cursor>
</File>
<File name="src\tm_spi\tm_stm32f4_ili9341.c" open="0" top="0" tabpos="3" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="7334" topLine="0" />
<Cursor1 position="7334" topLine="21" />
</Cursor>
</File>
<File name="src\tm_spi\tm_stm32f4_ili9341.h" open="0" top="0" tabpos="8" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="4771" topLine="131" />
<Cursor1 position="4771" topLine="89" />
</Cursor>
</File>
<File name="src\tm_spi\tm_stm32f4_spi.c" open="0" top="0" tabpos="8" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="14362" topLine="489" />
<Cursor1 position="14362" topLine="18" />
</Cursor>
</File>
<File name="src\tm_spi\tm_stm32f4_spi.h" open="0" top="0" tabpos="13" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="src\tm_spi\tm_stm32f4_spi.h" open="1" top="0" tabpos="15" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="5870" topLine="206" />
<Cursor1 position="5620" topLine="197" />
</Cursor>
</File>
<File name="src\tm_stm32f4_timer_properties.c" open="1" top="0" tabpos="5" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="4792" topLine="167" />
</Cursor>
</File>
</EmBitz_layout_file>

Plik binarny nie jest wyświetlany.

Plik binarny nie jest wyświetlany.

Wyświetl plik

@ -0,0 +1,79 @@
//---------------------------------------------------------------
/*
Windowed Sinc FIR Generator
Bob Maling (BobM.DSP@gmail.com)
Contributed to musicdsp.org Source Code Archive
Last Updated: April 12, 2005
http://www.musicdsp.org/showone.php?id=194
Usage:
Lowpass: wsfirLP(h, N, WINDOW, fc)
Highpass: wsfirHP(h, N, WINDOW, fc)
Bandpass: wsfirBP(h, N, WINDOW, fc1, fc2)
Bandstop: wsfirBS(h, N, WINDOW, fc1, fc2)
where:
h (float32_t[N]): filter coefficients will be written to this array
N (int): number of taps
WINDOW (int): Window (W_BLACKMAN, W_HANNING, or W_HAMMING)
fc (float32_t): cutoff (0 < fc < 0.5, fc = f/fs)
--> for fs=48kHz and cutoff f=12kHz, fc = 12k/48k => 0.25
fc1 (float32_t): low cutoff (0 < fc < 0.5, fc = f/fs)
fc2 (float32_t): high cutoff (0 < fc < 0.5, fc = f/fs)
Windows included here are Blackman, Hanning, and Hamming. Other windows can be
added by doing the following:
1. "Window type constants" section: Define a global constant for the new window.
2. wsfirLP() function: Add the new window as a case in the switch() statement.
3. Create the function for the window
For windows with a design parameter, such as Kaiser, some modification
will be needed for each function in order to pass the parameter.
*/
#ifndef WSFIR_H
#define WSFIR_H
#ifdef __cplusplus
extern "C" {
#endif
// Filter selection pin (Toggle low to select next)
#define SELECT_PIN 0
// ID's for the different types of filters
#define ID_LOWPASS 1
#define ID_HIGHPASS 2
#define ID_BANDPASS 3
#define ID_BANDSTOP 4
// ID's for window type contstants
static const int W_BLACKMAN = 1;
static const int W_HANNING = 2;
static const int W_HAMMING = 3;
// Function prototypes
void audioFilter(float32_t h[], const int N, const int TYPE, const int WINDOW, float32_t fc1, float32_t fc2);
void bandpass(float32_t h[], const int N, const int WINDOW, float32_t fc1, float32_t fc2);
void wsfirLP(float32_t h[], const int N, const int WINDOW, float32_t fc);
void wsfirHP(float32_t h[], const int N, const int WINDOW, float32_t fc);
void wsfirBS(float32_t h[], const int N, const int WINDOW, float32_t fc1, float32_t fc2);
void wsfirBP(float32_t h[], const int N, const int WINDOW, float32_t fc1, float32_t fc2);
void genSinc(float32_t sinc[], const int N, float32_t fc);
void wBlackman(float32_t w[], const int N);
void wHanning(float32_t w[], const int N);
void wHamming(float32_t w[], const int N);
#ifdef __cplusplus
}
#endif
#endif

Plik diff jest za duży Load Diff

Wyświetl plik

@ -22,7 +22,7 @@
#include "general.h"
#define NUM_TAPS 25
#define NUM_TAPS_2 121
#define NUM_TAPS_2 101
#define NUM_TAPS_3 17
#define NUM_TAPS_4 17
@ -31,6 +31,23 @@
* VARIABLES
*
********************************************************************/
//******************************************************
// LMS TEST
float32_t errOutput[BLOCK_SIZE];
//static float32_t LMSBufferOut[BLOCK_SIZE];
#define NUMTAPS_LMS 32
#define MU 0.95f
float32_t lmsStateF32[NUMTAPS_LMS + BLOCK_SIZE];
float32_t pCoeffs[NUMTAPS_LMS];
arm_lms_instance_f32 Sl_LMS;
//******************************************************
extern const float32_t firCoeffs32[NUM_TAPS];
extern const float32_t firCoeffs32_2[NUM_TAPS_2];
extern const float32_t firCoeffs32_3[NUM_TAPS_3];

Wyświetl plik

@ -28,6 +28,9 @@
float32_t FFTBufferOut[BLOCK_SIZE*2];
float32_t FFTBufferTmp[BLOCK_SIZE*2];
float32_t FFTBufferMag[BLOCK_SIZE*2];
float32_t bufferPreOut[BLOCK_SIZE];
/********************************************************************
*
@ -35,6 +38,7 @@ float32_t FFTBufferMag[BLOCK_SIZE*2];
*
********************************************************************/
void processing_noise_reduction(float* bufferIn, float* bufferOut2);
void doToneDetect(float32_t level);
#ifdef __cplusplus

Wyświetl plik

@ -18,6 +18,8 @@
extern "C" {
#endif
#define SW_VERSION "1.0.1"
/*- Size of sampleing block and fft */
#define BLOCK_SIZE 256
#define FFT_SIZE 256
@ -25,13 +27,20 @@
#define FFT_BAR_MAX_HEIGHT 100
#define MAX_WF_ROWS 100
#define COLOR_WF_SKIP FFT_BAR_MAX_HEIGHT/6
#define COLOR_WF_SKIP_5 COLOR_WF_SKIP*6
#define COLOR_WF_SKIP_4 COLOR_WF_SKIP*5
#define COLOR_WF_SKIP_3 COLOR_WF_SKIP*4
#define COLOR_WF_SKIP_2 COLOR_WF_SKIP*3
#define COLOR_WF_SKIP_1 COLOR_WF_SKIP*2
#define COLOR_WF_SKIP_0 COLOR_WF_SKIP
#define COLOR_WF_SKIP FFT_BAR_MAX_HEIGHT/6
#define COLOR_WF_SKIP_5 COLOR_WF_SKIP*6
#define COLOR_WF_SKIP_4 COLOR_WF_SKIP*5
#define COLOR_WF_SKIP_3 COLOR_WF_SKIP*4
#define COLOR_WF_SKIP_2 COLOR_WF_SKIP*3
#define COLOR_WF_SKIP_1 COLOR_WF_SKIP*2
#define COLOR_WF_SKIP_0 COLOR_WF_SKIP
#define CW_FFT_MIN_BIN 6
#define CW_FFT_MAX_BIN 16
#define CW_THRESHOLD 500
//#define EXP_SMOOTING
/********************************************************************
*
@ -46,6 +55,14 @@ static float32_t Buffer1 [BLOCK_SIZE];
//static float32_t Buffer3 [BLOCK_SIZE];
//static float32_t Buffer4 [BLOCK_SIZE];
/********************************************************************
*
* METHODS
*
********************************************************************/
uint32_t millis(void);
#ifdef __cplusplus
}
#endif

Wyświetl plik

@ -39,6 +39,8 @@
extern int ict;
extern uint8_t iCmdDnr;
extern uint8_t iCmdScp;
extern uint8_t iCmdFnc;
static int semaphorePlot = 0;
float32_t maxValue; /* Max FFT value is stored here */

Wyświetl plik

@ -35,8 +35,12 @@ extern uint8_t menu_voice;
extern uint8_t iCmdDnr;
extern uint8_t iCmdFlt;
extern uint8_t iCmdScp;
extern uint8_t iCmdFnc;
extern int iLastict;
extern int cw_tone;
extern int cw_tone_idx;
extern int cw_tone_val;
/********************************************************************
*
@ -51,6 +55,8 @@ void decodeMenuValue();
void decodeMenuVoice();
void GPIO_Switch_Setup();
void fillDisplay(uint8_t signal);
void showMorseChar(char c);
#ifdef __cplusplus
}

Wyświetl plik

@ -0,0 +1,25 @@
/**
******************************************************************************
* @file io_display.h
* @author Giuseppe Callipo - IK8YFW - ik8yfw@libero.it
* @version V2.0.0
* @date 25-09-2018
* @brief morseDecoder.h
*
*
* NOTE: This file is part of RadioDSP project.
* See main.c file for additional project informations.
******************************************************************************/
#ifndef MORSE_H
#define MORSE_H
// Function prototypes
void morseInit();
void morseKeyUp();
void morseKeyDown();
#endif
/**************************************END OF FILE****/

Wyświetl plik

@ -0,0 +1,166 @@
/**
* @author Tilen Majerle
* @email tilen@majerle.eu
* @website http://stm32f4-discovery.com
* @link
* @version v1.0
* @ide Keil uVision
* @license GNU GPL v3
* @brief Timer properties for all STM32F4xx timers
*
@verbatim
----------------------------------------------------------------------
Copyright (C) Tilen Majerle, 2015
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
----------------------------------------------------------------------
@endverbatim
*/
#ifndef TM_TIMER_PROPERTIES_H
#define TM_TIMER_PROPERTIES_H 110
/* C++ detection */
#ifdef __cplusplus
extern "C" {
#endif
/**
* @addtogroup TM_STM32F4xx_Libraries
* @{
*/
/**
* @defgroup TM_TIMER_PROPERTIES
* @brief Timer properties for all STM32F4xx timers
* @{
*
* This library allows you to enable/disable clock for specific timer,
* and returns you settings for timer, ex. max period, max prescaler and timer's clock
*
* Also, it is used in every library where timers are used, such as PWM, PWMIN and so on.
*
* \par Changelog
*
@verbatim
Version 1.1
- March 15, 2015
- Removed unnecessary function calls, used register access
Version 1.0
- First release
@endverbatim
*
* \par Dependencies
*
@verbatim
- STM32F4xx
- STM32F4xx RCC
- STM32F4xx TIM
- defines.h
@endverbatim
*/
#include "stm32f4xx.h"
#include "stm32f4xx_rcc.h"
#include "stm32f4xx_tim.h"
#include "defines.h"
/**
* @defgroup TM_TIMER_PROPERTIES_Typedefs
* @brief Library Typedefs
* @{
*/
/**
* @brief Timer result enumeration
*/
typedef enum {
TM_TIMER_PROPERTIES_Result_Ok, /*!< Everything OK */
TM_TIMER_PROPERTIES_Result_Error, /*!< An error occurred */
TM_TIMER_PROPERTIES_Result_TimerNotValid, /*!< Timer is not valid */
TM_TIMER_PROPERTIES_Result_FrequencyTooHigh, /*!< Frequency for timer is too high */
TM_TIMER_PROPERTIES_Result_FrequencyTooLow /*!< Frequency for timer is too low */
} TM_TIMER_PROPERTIES_Result_t;
/**
* @brief Structure for timer data
*/
typedef struct {
uint32_t TimerFrequency; /*!< timer's working frequency */
uint32_t MaxPeriod; /*!< Max timer period */
uint32_t MaxPrescaler; /*!< Max timer prescaler */
uint32_t Period; /*!< Timer's working period */
uint32_t Prescaler; /*!< Timer's working prescaler */
uint32_t Frequency; /*!< Timer's reload frequency */
} TM_TIMER_PROPERTIES_t;
/**
* @}
*/
/**
* @defgroup TM_TIMER_PROPERTIES_Functions
* @brief Library Functions
* @{
*/
/**
* @brief Gets timer properties
* @param *TIMx: Timer used to get settings for
* @param *Timer_Data: Pointer to @ref TM_TIMER_PROPERTIES_t structure to store data to
* @retval Member of @ref TM_TIMER_PROPERTIES_Result_t
*/
TM_TIMER_PROPERTIES_Result_t TM_TIMER_PROPERTIES_GetTimerProperties(TIM_TypeDef* TIMx, TM_TIMER_PROPERTIES_t* Timer_Data);
/**
* @brief Generates period and prescaler for given timer frequency
* @param *Timer_Data: Pointer to @ref TM_TIMER_PROPERTIES_t structure
* @param frequency: Frequency used to generate period and prescaler values
* @retval Member of @ref TM_TIMER_PROPERTIES_Result_t
*/
TM_TIMER_PROPERTIES_Result_t TM_TIMER_PROPERTIES_GenerateDataForWorkingFrequency(TM_TIMER_PROPERTIES_t* Timer_Data, double frequency);
/**
* @brief Enables timer clock
* @param *TIMx: Timer used to enable clock for it
* @retval Member of @ref TM_TIMER_PROPERTIES_Result_t
*/
TM_TIMER_PROPERTIES_Result_t TM_TIMER_PROPERTIES_EnableClock(TIM_TypeDef* TIMx);
/**
* @brief Disables timer clock
* @param *TIMx: Timer used to disable clock for it
* @retval Member of @ref TM_TIMER_PROPERTIES_Result_t
*/
TM_TIMER_PROPERTIES_Result_t TM_TIMER_PROPERTIES_DisableClock(TIM_TypeDef* TIMx);
/**
* @}
*/
/**
* @}
*/
/**
* @}
*/
/* C++ detection */
#ifdef __cplusplus
}
#endif
#endif

Plik binarny nie jest wyświetlany.

Plik binarny nie jest wyświetlany.

Plik binarny nie jest wyświetlany.

Plik binarny nie jest wyświetlany.

Plik binarny nie jest wyświetlany.

Plik binarny nie jest wyświetlany.

Plik binarny nie jest wyświetlany.

Plik binarny nie jest wyświetlany.

Plik binarny nie jest wyświetlany.

Plik binarny nie jest wyświetlany.

Plik binarny nie jest wyświetlany.

Plik binarny nie jest wyświetlany.

Plik binarny nie jest wyświetlany.

Plik binarny nie jest wyświetlany.

Plik binarny nie jest wyświetlany.

Plik binarny nie jest wyświetlany.

Plik binarny nie jest wyświetlany.

Plik binarny nie jest wyświetlany.

Plik binarny nie jest wyświetlany.

Plik binarny nie jest wyświetlany.

Plik binarny nie jest wyświetlany.

Plik binarny nie jest wyświetlany.

Plik binarny nie jest wyświetlany.

Plik binarny nie jest wyświetlany.

Plik binarny nie jest wyświetlany.

Plik binarny nie jest wyświetlany.

Plik binarny nie jest wyświetlany.

Plik binarny nie jest wyświetlany.

Plik binarny nie jest wyświetlany.

Plik binarny nie jest wyświetlany.

Plik binarny nie jest wyświetlany.

Plik binarny nie jest wyświetlany.

Wyświetl plik

@ -26,4 +26,4 @@ obj\debug\src\filter_noise_reduction.o: src\filter_noise_reduction.c \
src\tm_spi/tm_stm32f4_spi.h src\tm_spi/attributes.h \
src\tm_spi/tm_stm32f4_gpio.h src\tm_spi/tm_stm32f4_fonts.h \
src\tm_spi/tm_stm32f4_fonts.h inc/filter_noise_reduction.h \
inc/filter_audio_segnal.h
inc/filter_audio_segnal.h inc/morseDecode.h

Plik binarny nie jest wyświetlany.

Plik binarny nie jest wyświetlany.

Plik binarny nie jest wyświetlany.

Wyświetl plik

@ -28,5 +28,5 @@ obj\debug\src\main.o: src\main.c inc/stm32f4xx_conf.h \
src\tm_spi/tm_stm32f4_ili9341.h src\tm_spi/tm_stm32f4_spi.h \
src\tm_spi/tm_stm32f4_fonts.h src\tm_spi/tm_stm32f4_fonts.h \
src\tm_enc/tm_stm32f4_rotary_encoder.h src\tm_spi/tm_stm32f4_gpio.h \
src\tm_enc/tm_stm32f4_exti.h src\tm_spi/attributes.h \
src\tm_enc/tm_stm32f4_exti.h src\tm_spi/attributes.h inc/morseDecode.h \
inc/filter_noise_reduction.h inc/filter_audio_segnal.h inc/general.h

Plik binarny nie jest wyświetlany.

Wyświetl plik

@ -0,0 +1,21 @@
obj\debug\src\morsedecode.o: src\morseDecode.c inc/stm32f4xx_conf.h \
SPL\inc/stm32f4xx_adc.h inc/stm32f4xx.h \
..\CMSIS_5-5.4.0\CMSIS_5-5.4.0\CMSIS\Core\Include/core_cm4.h \
..\CMSIS_5-5.4.0\CMSIS_5-5.4.0\CMSIS\Core\Include/cmsis_version.h \
..\CMSIS_5-5.4.0\CMSIS_5-5.4.0\CMSIS\Core\Include/cmsis_compiler.h \
..\CMSIS_5-5.4.0\CMSIS_5-5.4.0\CMSIS\Core\Include/cmsis_gcc.h \
..\CMSIS_5-5.4.0\CMSIS_5-5.4.0\CMSIS\Core\Include/mpu_armv7.h \
inc/system_stm32f4xx.h inc/stm32f4xx_conf.h SPL\inc/stm32f4xx_can.h \
SPL\inc/stm32f4xx_crc.h SPL\inc/stm32f4xx_cryp.h SPL\inc/stm32f4xx_dac.h \
SPL\inc/stm32f4xx_dbgmcu.h SPL\inc/stm32f4xx_dcmi.h \
SPL\inc/stm32f4xx_dma.h SPL\inc/stm32f4xx_exti.h \
SPL\inc/stm32f4xx_flash.h SPL\inc/stm32f4xx_fsmc.h \
SPL\inc/stm32f4xx_hash.h SPL\inc/stm32f4xx_gpio.h \
SPL\inc/stm32f4xx_i2c.h SPL\inc/stm32f4xx_iwdg.h SPL\inc/stm32f4xx_pwr.h \
SPL\inc/stm32f4xx_rcc.h SPL\inc/stm32f4xx_rng.h SPL\inc/stm32f4xx_rtc.h \
SPL\inc/stm32f4xx_sdio.h SPL\inc/stm32f4xx_spi.h \
SPL\inc/stm32f4xx_syscfg.h SPL\inc/stm32f4xx_tim.h \
SPL\inc/stm32f4xx_usart.h SPL\inc/stm32f4xx_wwdg.h SPL\inc/misc.h \
inc/morseDecode.h inc/io_display.h inc/stm32f4xx.h \
..\CMSIS_5-5.4.0\CMSIS_5-5.4.0\CMSIS\DSP\Include/arm_math.h \
inc/general.h

Plik binarny nie jest wyświetlany.

Plik binarny nie jest wyświetlany.

Plik binarny nie jest wyświetlany.

Plik binarny nie jest wyświetlany.

Plik binarny nie jest wyświetlany.

Plik binarny nie jest wyświetlany.

Plik binarny nie jest wyświetlany.

Plik binarny nie jest wyświetlany.

Plik binarny nie jest wyświetlany.

Wyświetl plik

@ -0,0 +1,21 @@
obj\debug\src\tm_stm32f4_timer_properties.o: \
src\tm_stm32f4_timer_properties.c inc/tm_stm32f4_timer_properties.h \
inc/stm32f4xx.h \
..\CMSIS_5-5.4.0\CMSIS_5-5.4.0\CMSIS\Core\Include/core_cm4.h \
..\CMSIS_5-5.4.0\CMSIS_5-5.4.0\CMSIS\Core\Include/cmsis_version.h \
..\CMSIS_5-5.4.0\CMSIS_5-5.4.0\CMSIS\Core\Include/cmsis_compiler.h \
..\CMSIS_5-5.4.0\CMSIS_5-5.4.0\CMSIS\Core\Include/cmsis_gcc.h \
..\CMSIS_5-5.4.0\CMSIS_5-5.4.0\CMSIS\Core\Include/mpu_armv7.h \
inc/system_stm32f4xx.h inc/stm32f4xx_conf.h SPL\inc/stm32f4xx_adc.h \
inc/stm32f4xx.h SPL\inc/stm32f4xx_can.h SPL\inc/stm32f4xx_crc.h \
SPL\inc/stm32f4xx_cryp.h SPL\inc/stm32f4xx_dac.h \
SPL\inc/stm32f4xx_dbgmcu.h SPL\inc/stm32f4xx_dcmi.h \
SPL\inc/stm32f4xx_dma.h SPL\inc/stm32f4xx_exti.h \
SPL\inc/stm32f4xx_flash.h SPL\inc/stm32f4xx_fsmc.h \
SPL\inc/stm32f4xx_hash.h SPL\inc/stm32f4xx_gpio.h \
SPL\inc/stm32f4xx_i2c.h SPL\inc/stm32f4xx_iwdg.h SPL\inc/stm32f4xx_pwr.h \
SPL\inc/stm32f4xx_rcc.h SPL\inc/stm32f4xx_rng.h SPL\inc/stm32f4xx_rtc.h \
SPL\inc/stm32f4xx_sdio.h SPL\inc/stm32f4xx_spi.h \
SPL\inc/stm32f4xx_syscfg.h SPL\inc/stm32f4xx_tim.h \
SPL\inc/stm32f4xx_usart.h SPL\inc/stm32f4xx_wwdg.h SPL\inc/misc.h \
src\tm_spi/defines.h

Plik binarny nie jest wyświetlany.

Plik binarny nie jest wyświetlany.

Plik binarny nie jest wyświetlany.

Plik binarny nie jest wyświetlany.

Plik binarny nie jest wyświetlany.

Plik binarny nie jest wyświetlany.

Plik binarny nie jest wyświetlany.

Plik binarny nie jest wyświetlany.

Plik binarny nie jest wyświetlany.

Plik binarny nie jest wyświetlany.

Plik binarny nie jest wyświetlany.

Plik binarny nie jest wyświetlany.

Plik binarny nie jest wyświetlany.

Plik binarny nie jest wyświetlany.

Plik binarny nie jest wyświetlany.

Plik binarny nie jest wyświetlany.

Plik binarny nie jest wyświetlany.

Plik binarny nie jest wyświetlany.

Plik binarny nie jest wyświetlany.

Plik binarny nie jest wyświetlany.

Plik binarny nie jest wyświetlany.

Plik binarny nie jest wyświetlany.

Some files were not shown because too many files have changed in this diff Show More