Haven't committed in a while :o . Currently waterfall is disabled while I work on audio processing. I am capturing, FFT, filter, IFFT, and output. It seems to be working partly. I don't think I am doing things right yet.
Also, starting to implement the menu system. Oh, and fixed some indentation, so it looks like there was more changed to main() than there really was....
This commit is contained in:
parent
8c308e12c0
commit
7b1da77c21
6 changed files with 728 additions and 336 deletions
|
@ -181,9 +181,6 @@
|
|||
<outputType id="org.eclipse.cdt.managedbuilder.ui.rcbs.outputtype.1815660056" name="Resource Custom Build Step Output Type"/>
|
||||
</tool>
|
||||
</fileInfo>
|
||||
<fileInfo id="ilg.gnuarmeclipse.managedbuild.cross.config.elf.debug.1375704298.664833074" name="stm32f4xx_hal_tim_ex.c" rcbsApplicability="disable" resourcePath="system/src/stm32f4-hal/stm32f4xx_hal_tim_ex.c" toolsToInvoke="ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler.98059731.495344797">
|
||||
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler.98059731.495344797" name="Cross ARM C Compiler" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler.98059731"/>
|
||||
</fileInfo>
|
||||
<folderInfo id="ilg.gnuarmeclipse.managedbuild.cross.config.elf.debug.1375704298.608015733" name="/" resourcePath="DSP_Lib">
|
||||
<toolChain id="ilg.gnuarmeclipse.managedbuild.cross.toolchain.elf.debug.425450735" name="Cross ARM GCC" superClass="ilg.gnuarmeclipse.managedbuild.cross.toolchain.elf.debug" unusedChildren="">
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.level.1067485307.697494564" name="Optimization Level" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.level.1067485307"/>
|
||||
|
@ -763,7 +760,7 @@
|
|||
</toolChain>
|
||||
</folderInfo>
|
||||
<sourceEntries>
|
||||
<entry excluding="Source/TransformFunctions/arm_cfft_radix2_q31.c|Source/TransformFunctions/arm_cfft_radix2_q15.c|Source/TransformFunctions/arm_cfft_radix2_init_q31.c|Source/TransformFunctions/arm_cfft_radix2_init_q15.c|Source/TransformFunctions/arm_cfft_radix2_init_f32.c|Source/TransformFunctions/arm_cfft_radix2_f32.c|Source/FastMathFunctions|Source/FilteringFunctions|Source/ControllerFunctions|Source/MatrixFunctions|Source/StatisticsFunctions|Source/SupportFunctions|Source/BasicMathFunctions" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="DSP_Lib"/>
|
||||
<entry excluding="Source/TransformFunctions/arm_cfft_radix2_q31.c|Source/TransformFunctions/arm_cfft_radix2_q15.c|Source/TransformFunctions/arm_cfft_radix2_init_q31.c|Source/TransformFunctions/arm_cfft_radix2_init_q15.c|Source/TransformFunctions/arm_cfft_radix2_init_f32.c|Source/TransformFunctions/arm_cfft_radix2_f32.c|Source/FilteringFunctions|Source/ControllerFunctions|Source/MatrixFunctions|Source/StatisticsFunctions|Source/SupportFunctions|Source/BasicMathFunctions" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="DSP_Lib"/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src"/>
|
||||
<entry excluding="src/stm32f4-hal/stm32f4xx_hal_adc_ex.c|src/stm32f4-hal/stm32f4xx_hal_can.c|src/stm32f4-hal/stm32f4xx_hal_crc.c|src/stm32f4-hal/stm32f4xx_hal_cryp.c|src/stm32f4-hal/stm32f4xx_hal_cryp_ex.c|src/stm32f4-hal/stm32f4xx_hal_dac_ex.c|src/stm32f4-hal/stm32f4xx_hal_dcmi.c|src/stm32f4-hal/stm32f4xx_hal_dma2d.c|src/stm32f4-hal/stm32f4xx_hal_dma_ex.c|src/stm32f4-hal/stm32f4xx_hal_eth.c|src/stm32f4-hal/stm32f4xx_hal_hash.c|src/stm32f4-hal/stm32f4xx_hal_hash_ex.c|src/stm32f4-hal/stm32f4xx_hal_hcd.c|src/stm32f4-hal/stm32f4xx_hal_i2c.c|src/stm32f4-hal/stm32f4xx_hal_i2c_ex.c|src/stm32f4-hal/stm32f4xx_hal_i2s.c|src/stm32f4-hal/stm32f4xx_hal_i2s_ex.c|src/stm32f4-hal/stm32f4xx_hal_irda.c|src/stm32f4-hal/stm32f4xx_hal_ltdc.c|src/stm32f4-hal/stm32f4xx_hal_msp_template.c|src/stm32f4-hal/stm32f4xx_hal_nand.c|src/stm32f4-hal/stm32f4xx_hal_nor.c|src/stm32f4-hal/stm32f4xx_hal_pccard.c|src/stm32f4-hal/stm32f4xx_hal_pcd.c|src/stm32f4-hal/stm32f4xx_hal_rng.c|src/stm32f4-hal/stm32f4xx_hal_rtc.c|src/stm32f4-hal/stm32f4xx_hal_rtc_ex.c|src/stm32f4-hal/stm32f4xx_hal_sai.c|src/stm32f4-hal/stm32f4xx_hal_sd.c|src/stm32f4-hal/stm32f4xx_hal_sdram.c|src/stm32f4-hal/stm32f4xx_hal_smartcard.c|src/stm32f4-hal/stm32f4xx_hal_sram.c|src/stm32f4-hal/stm32f4xx_hal_uart.c|src/stm32f4-hal/stm32f4xx_hal_usart.c|src/stm32f4-hal/stm32f4xx_hal_wwdg.c|src/stm32f4-hal/stm32f4xx_ll_fmc.c|src/stm32f4-hal/stm32f4xx_ll_fsmc.c|src/stm32f4-hal/stm32f4xx_ll_sdmmc.c|src/stm32f4-hal/stm32f4xx_ll_usb.c" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="system"/>
|
||||
</sourceEntries>
|
||||
|
|
|
@ -93,6 +93,8 @@
|
|||
extern const Gpio_Pin encoderA;
|
||||
extern const Gpio_Pin encoderB;
|
||||
extern const Gpio_Pin encoderP;
|
||||
extern const Gpio_Pin dac1;
|
||||
extern const Gpio_Pin dac2;
|
||||
|
||||
|
||||
// extern const Gpio_Pin NC_1;
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
#include "Adafruit_ILI9340.h"
|
||||
#include "stm32f4xx_hal.h"
|
||||
#include "string.h"
|
||||
#include "math.h"
|
||||
#include "arm_math.h"
|
||||
//#include "stm32f4xx_hal_rtc.h"
|
||||
//#include "stm32f4xx_hal_adc.h"
|
||||
|
@ -24,5 +25,6 @@
|
|||
#include "stm32f4xx_hal_tim.h"
|
||||
#include "stm32f4xx_hal_cortex.h"
|
||||
#include "misc.h"
|
||||
#include "stm32f4xx_hal_dac.h"
|
||||
|
||||
TIM_HandleTypeDef TimHandle;
|
||||
|
|
|
@ -88,24 +88,8 @@ void initAdc()
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
void adcStartConversion()
|
||||
void adcGetConversion()
|
||||
{
|
||||
if(HAL_ADC_Start(&AdcHandle) != HAL_OK)
|
||||
{
|
||||
/* Start Conversation Error */
|
||||
//Error_Handler();
|
||||
wrongThings++;
|
||||
}
|
||||
|
||||
if(HAL_ADC_Start(&AdcHandle2) != HAL_OK)
|
||||
{
|
||||
/* Start Conversation Error */
|
||||
//Error_Handler();
|
||||
wrongThings++;
|
||||
}
|
||||
|
||||
HAL_ADC_PollForConversion(&AdcHandle, 10);
|
||||
HAL_ADC_PollForConversion(&AdcHandle2, 10);
|
||||
|
||||
|
@ -116,15 +100,24 @@ void initAdc()
|
|||
uhADCxConvertedValue = HAL_ADC_GetValue(&AdcHandle);
|
||||
uhADCxConvertedValue2 = HAL_ADC_GetValue(&AdcHandle2);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void adcStartConversion()
|
||||
{
|
||||
if(HAL_ADC_Start(&AdcHandle) != HAL_OK)
|
||||
{
|
||||
/* Start Conversation Error */
|
||||
//Error_Handler();
|
||||
wrongThings++;
|
||||
}
|
||||
|
||||
// if(HAL_ADC_Start_IT(&AdcHandle) != HAL_OK)
|
||||
// {
|
||||
// /* Start Conversation Error */
|
||||
// //Error_Handler();
|
||||
// wrongThings++;
|
||||
// }
|
||||
if(HAL_ADC_Start(&AdcHandle2) != HAL_OK)
|
||||
{
|
||||
/* Start Conversation Error */
|
||||
//Error_Handler();
|
||||
wrongThings++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -74,6 +74,8 @@ const Gpio_Pin encoderB = { GPIOC, GPIO_PIN_3 };
|
|||
const Gpio_Pin encoderP = { GPIOC, GPIO_PIN_15 };
|
||||
const Gpio_Pin ADC_1 = { GPIOA, GPIO_PIN_1 };
|
||||
const Gpio_Pin ADC_2 = { GPIOA, GPIO_PIN_2 };
|
||||
const Gpio_Pin dac1 = { GPIOA, GPIO_PIN_4 };
|
||||
const Gpio_Pin dac2 = { GPIOA, GPIO_PIN_5 };
|
||||
|
||||
//const Gpio_Pin NC_1 = { GPIOC, GPIO_Pin_0 }; // this is the Closure Sensor Pin near the 3v3 regulator, fyi
|
||||
//const Gpio_Pin DAC_SWITCHES = { GPIOC, GPIO_Pin_5 }; // currently labeled LIGHT_SENSOR on schem (TODO)
|
||||
|
@ -354,6 +356,11 @@ void hal_setupPins(void)
|
|||
|
||||
|
||||
|
||||
gpioInitStructure.Pin = dac1.pin | dac2.pin;
|
||||
gpioInitStructure.Mode = GPIO_MODE_ANALOG;
|
||||
gpioInitStructure.Pull = GPIO_NOPULL;
|
||||
HAL_GPIO_Init(dac1.port, &gpioInitStructure);
|
||||
|
||||
// Power Switch
|
||||
// gpioInitStructure.GPIO_Pin = POWER_SWITCH.pin;
|
||||
// gpioInitStructure.GPIO_Speed = GPIO_Speed_2MHz;
|
||||
|
|
1009
Source/src/main.c
1009
Source/src/main.c
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue