Initial commit to GitHub.
Includes the Source (as an Eclipse project) and the Hardware files (including schematic, layout, gerbers, and bill of materials.)
The firmware is extremely incomplete. At this point the DDS chips work (with controlled phase relationship), the LCD (with fast-ish SPI, scrolling, and GFX, modified from Adafruit's library), the encoder knob, and LED work.
The ADC is capturing, but not in a usable way, but it's enough to feed the DSP code and see a nice pretty waterfall. Timers, interrupts, and DACs are not working yet.
2014-06-23 09:49:43 +10:00
|
|
|
#pragma once
|
|
|
|
|
2014-09-29 12:40:01 +10:00
|
|
|
//#define PSDR1 1
|
|
|
|
#define PSDR2 2
|
|
|
|
|
|
|
|
//#define PSDR_BOARD PSDR2
|
|
|
|
|
|
|
|
#ifdef PSDR1
|
|
|
|
#define STM32F415xx
|
|
|
|
#define HSE_VALUE=8000000 //did I do this right? Both of these were defined in the progect settings before in the several preprocessors
|
|
|
|
|
|
|
|
//#include "stm32f415xx.h"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef PSDR2
|
|
|
|
//#define HSE_VALUE 24000000
|
|
|
|
|
|
|
|
#include "stm32f429xx.h"
|
|
|
|
#endif
|
|
|
|
|
Initial commit to GitHub.
Includes the Source (as an Eclipse project) and the Hardware files (including schematic, layout, gerbers, and bill of materials.)
The firmware is extremely incomplete. At this point the DDS chips work (with controlled phase relationship), the LCD (with fast-ish SPI, scrolling, and GFX, modified from Adafruit's library), the encoder knob, and LED work.
The ADC is capturing, but not in a usable way, but it's enough to feed the DSP code and see a nice pretty waterfall. Timers, interrupts, and DACs are not working yet.
2014-06-23 09:49:43 +10:00
|
|
|
#include "stm32f4xx.h"
|
|
|
|
//#include "core_cmInstr.h"
|
|
|
|
#include <stdio.h>
|
2014-06-23 16:00:31 +10:00
|
|
|
#include "stddef.h"
|
Initial commit to GitHub.
Includes the Source (as an Eclipse project) and the Hardware files (including schematic, layout, gerbers, and bill of materials.)
The firmware is extremely incomplete. At this point the DDS chips work (with controlled phase relationship), the LCD (with fast-ish SPI, scrolling, and GFX, modified from Adafruit's library), the encoder knob, and LED work.
The ADC is capturing, but not in a usable way, but it's enough to feed the DSP code and see a nice pretty waterfall. Timers, interrupts, and DACs are not working yet.
2014-06-23 09:49:43 +10:00
|
|
|
#include "diag/Trace.h"
|
|
|
|
#include "hal.h"
|
|
|
|
#include "adc.h"
|
|
|
|
#include "dds.h"
|
|
|
|
#include "Timer.h"
|
|
|
|
#include "BlinkLed.h"
|
|
|
|
//#include "stm32f4xx_hal_rcc.h"
|
|
|
|
#include "stm32f4xx_hal_gpio.h"
|
|
|
|
#include "Adafruit_GFX.h"
|
|
|
|
#include "Adafruit_ILI9340.h"
|
|
|
|
#include "stm32f4xx_hal.h"
|
2014-07-14 17:41:46 +10:00
|
|
|
//#include "stm32f4xx_hal.h"
|
|
|
|
#include "stm32f4xx_hal_def.h"
|
Initial commit to GitHub.
Includes the Source (as an Eclipse project) and the Hardware files (including schematic, layout, gerbers, and bill of materials.)
The firmware is extremely incomplete. At this point the DDS chips work (with controlled phase relationship), the LCD (with fast-ish SPI, scrolling, and GFX, modified from Adafruit's library), the encoder knob, and LED work.
The ADC is capturing, but not in a usable way, but it's enough to feed the DSP code and see a nice pretty waterfall. Timers, interrupts, and DACs are not working yet.
2014-06-23 09:49:43 +10:00
|
|
|
#include "string.h"
|
2014-07-07 13:20:00 +10:00
|
|
|
#include "math.h"
|
Initial commit to GitHub.
Includes the Source (as an Eclipse project) and the Hardware files (including schematic, layout, gerbers, and bill of materials.)
The firmware is extremely incomplete. At this point the DDS chips work (with controlled phase relationship), the LCD (with fast-ish SPI, scrolling, and GFX, modified from Adafruit's library), the encoder knob, and LED work.
The ADC is capturing, but not in a usable way, but it's enough to feed the DSP code and see a nice pretty waterfall. Timers, interrupts, and DACs are not working yet.
2014-06-23 09:49:43 +10:00
|
|
|
#include "arm_math.h"
|
|
|
|
//#include "stm32f4xx_hal_rtc.h"
|
|
|
|
//#include "stm32f4xx_hal_adc.h"
|
|
|
|
#include "stm32f4xx_it.h"
|
|
|
|
#include "stm32f4xx_hal_tim.h"
|
|
|
|
#include "stm32f4xx_hal_cortex.h"
|
|
|
|
#include "misc.h"
|
2014-07-07 13:20:00 +10:00
|
|
|
#include "stm32f4xx_hal_dac.h"
|
Initial commit to GitHub.
Includes the Source (as an Eclipse project) and the Hardware files (including schematic, layout, gerbers, and bill of materials.)
The firmware is extremely incomplete. At this point the DDS chips work (with controlled phase relationship), the LCD (with fast-ish SPI, scrolling, and GFX, modified from Adafruit's library), the encoder knob, and LED work.
The ADC is capturing, but not in a usable way, but it's enough to feed the DSP code and see a nice pretty waterfall. Timers, interrupts, and DACs are not working yet.
2014-06-23 09:49:43 +10:00
|
|
|
|
2014-07-24 01:31:17 +10:00
|
|
|
#include "images.h"
|
2014-10-16 02:31:08 +11:00
|
|
|
#include "stm32f4xx_hal_dma.h"
|
|
|
|
|
|
|
|
#include "stm32f4xx_hal_def.h"
|
2014-07-24 01:31:17 +10:00
|
|
|
|
2014-06-23 16:00:31 +10:00
|
|
|
TIM_HandleTypeDef TimHandle;
|
2014-07-14 17:41:46 +10:00
|
|
|
TIM_HandleTypeDef TimHandle4;
|
2014-07-27 11:07:45 +10:00
|
|
|
|
|
|
|
#define MASKRED 0b1111100000000000
|
|
|
|
#define MASKGREEN 0b0000011111100000
|
|
|
|
#define MASKBLUE 0b0000000000011111
|
|
|
|
#define MASKYELLOW 0b1111111111100000
|
|
|
|
#define MASKTEAL 0b0000011111111111
|
|
|
|
#define MASKWHITE 0b1111111111111111
|
|
|
|
#define MASKBLACK 0b0000000000000000
|
2014-09-29 12:40:01 +10:00
|
|
|
|
2014-10-16 02:31:08 +11:00
|
|
|
/* Definition for SPIx's DMA */
|
|
|
|
#define SPIx_TX_DMA_CHANNEL DMA_CHANNEL_3
|
|
|
|
#define SPIx_TX_DMA_STREAM DMA2_Stream5
|
|
|
|
#define SPIx_RX_DMA_CHANNEL DMA_CHANNEL_3
|
|
|
|
#define SPIx_RX_DMA_STREAM DMA2_Stream2
|
|
|
|
|
|
|
|
/* Definition for SPIx's NVIC */
|
|
|
|
#define SPIx_DMA_TX_IRQn DMA2_Stream3_IRQn
|
|
|
|
#define SPIx_DMA_RX_IRQn DMA2_Stream0_IRQn
|
|
|
|
#define SPIx_DMA_TX_IRQHandler DMA2_Stream3_IRQHandler
|
|
|
|
#define SPIx_DMA_RX_IRQHandler DMA2_Stream0_IRQHandler
|
2014-09-29 12:40:01 +10:00
|
|
|
|
2014-10-16 02:31:08 +11:00
|
|
|
SPI_HandleTypeDef SpiHandle;
|