Compare commits
No commits in common. "59dcbaf17799c8409aabd2061179bf17e8d4b77a" and "8e25479ab5db114f687918d3eb16d06bcf2ebdc5" have entirely different histories.
59dcbaf177
...
8e25479ab5
@ -13,8 +13,9 @@ OD=$(PREFIX)-objdump
|
|||||||
OBJCOPYFLAGS = -O binary
|
OBJCOPYFLAGS = -O binary
|
||||||
|
|
||||||
BIN=$(CP) -O ihex
|
BIN=$(CP) -O ihex
|
||||||
|
|
||||||
CCBASE = colorchord/embeddedstm32f407
|
CCBASE = colorchord/embeddedstm32f407
|
||||||
DEFS = -DSTM32F40_41xxx -DHSE_VALUE=8000000 -DREVISION=\"`git rev-parse HEAD`\"
|
DEFS = -DSTM32F40_41xxx -DHSE_VALUE=8000000
|
||||||
STARTUP = $(CCBASE)/lib/startup_stm32f40_41xxx.s
|
STARTUP = $(CCBASE)/lib/startup_stm32f40_41xxx.s
|
||||||
STLIB = $(CCBASE)/STM32F4xx_StdPeriph_Driver
|
STLIB = $(CCBASE)/STM32F4xx_StdPeriph_Driver
|
||||||
EMCOM = $(CCBASE)/../embeddedcommon
|
EMCOM = $(CCBASE)/../embeddedcommon
|
||||||
|
@ -13,6 +13,8 @@ void adc_init()
|
|||||||
ADC_CommonInitTypeDef ADC_CommonInitStruct;
|
ADC_CommonInitTypeDef ADC_CommonInitStruct;
|
||||||
ADC_InitTypeDef ADC_InitStructure;
|
ADC_InitTypeDef ADC_InitStructure;
|
||||||
GPIO_InitTypeDef GPIO_InitStruct;
|
GPIO_InitTypeDef GPIO_InitStruct;
|
||||||
|
|
||||||
|
printf("ADC init\r\n");
|
||||||
|
|
||||||
// Enable Clocks
|
// Enable Clocks
|
||||||
RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_GPIOA, ENABLE);
|
RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_GPIOA, ENABLE);
|
||||||
@ -125,6 +127,12 @@ void adc_init()
|
|||||||
// Turn it all on
|
// Turn it all on
|
||||||
ADC_Cmd(ADC1, ENABLE);
|
ADC_Cmd(ADC1, ENABLE);
|
||||||
ADC_DMACmd(ADC1, ENABLE);
|
ADC_DMACmd(ADC1, ENABLE);
|
||||||
|
|
||||||
|
printf("adc init done.\r\n");
|
||||||
|
printf("ADC CR1: %08x, CR2: %08x\r\n", ADC1->CR1, ADC1->CR2);
|
||||||
|
printf("ADC SQR1: %08x, SQR3: %08x\r\n", ADC1->SQR1, ADC1->SQR3);
|
||||||
|
printf("DMA2 S0CR: %08x\r\n", ADC_RX_DMA_STREAM->CR);
|
||||||
|
printf("ADC init complete.\r\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
void DMA2_Stream0_IRQHandler()
|
void DMA2_Stream0_IRQHandler()
|
||||||
|
@ -123,9 +123,8 @@ int main(void)
|
|||||||
InitSPI2812();
|
InitSPI2812();
|
||||||
adc_init();
|
adc_init();
|
||||||
|
|
||||||
printf("\r\nThis is Sabik-CPU, commit %s.\r\n", REVISION);
|
printf("Operating at %.3fMHz\r\n", fv );
|
||||||
printf("Operating at %.3fMHz.\r\n", fv );
|
|
||||||
|
|
||||||
int this_samp = 0;
|
int this_samp = 0;
|
||||||
int wf = 0;
|
int wf = 0;
|
||||||
|
|
||||||
|
@ -132,6 +132,8 @@ void InitSPI2812()
|
|||||||
DMA_InitTypeDef dma_init_struct;
|
DMA_InitTypeDef dma_init_struct;
|
||||||
GPIO_InitTypeDef GPIO_InitStructure;
|
GPIO_InitTypeDef GPIO_InitStructure;
|
||||||
NVIC_InitTypeDef nvic_init_struct;
|
NVIC_InitTypeDef nvic_init_struct;
|
||||||
|
|
||||||
|
printf("Init SPI2812: sizeof(MyBuffer)=%d\r\n", sizeof(MyBuffer));
|
||||||
|
|
||||||
#ifdef STM32F30X
|
#ifdef STM32F30X
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user