Compare commits

..

2 Commits

Author SHA1 Message Date
59dcbaf177 Remove debug printfs 2021-03-02 19:46:20 +01:00
154980ee10 Print git revision on startup 2021-03-02 19:44:27 +01:00
4 changed files with 4 additions and 14 deletions

View File

@ -13,9 +13,8 @@ OD=$(PREFIX)-objdump
OBJCOPYFLAGS = -O binary
BIN=$(CP) -O ihex
CCBASE = colorchord/embeddedstm32f407
DEFS = -DSTM32F40_41xxx -DHSE_VALUE=8000000
DEFS = -DSTM32F40_41xxx -DHSE_VALUE=8000000 -DREVISION=\"`git rev-parse HEAD`\"
STARTUP = $(CCBASE)/lib/startup_stm32f40_41xxx.s
STLIB = $(CCBASE)/STM32F4xx_StdPeriph_Driver
EMCOM = $(CCBASE)/../embeddedcommon

View File

@ -14,8 +14,6 @@ void adc_init()
ADC_InitTypeDef ADC_InitStructure;
GPIO_InitTypeDef GPIO_InitStruct;
printf("ADC init\r\n");
// Enable Clocks
RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_GPIOA, ENABLE);
RCC_APB2PeriphClockCmd(RCC_APB2Periph_ADC1, ENABLE);
@ -127,12 +125,6 @@ void adc_init()
// Turn it all on
ADC_Cmd(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()

View File

@ -123,7 +123,8 @@ int main(void)
InitSPI2812();
adc_init();
printf("Operating at %.3fMHz\r\n", fv );
printf("\r\nThis is Sabik-CPU, commit %s.\r\n", REVISION);
printf("Operating at %.3fMHz.\r\n", fv );
int this_samp = 0;
int wf = 0;

View File

@ -133,8 +133,6 @@ void InitSPI2812()
GPIO_InitTypeDef GPIO_InitStructure;
NVIC_InitTypeDef nvic_init_struct;
printf("Init SPI2812: sizeof(MyBuffer)=%d\r\n", sizeof(MyBuffer));
#ifdef STM32F30X
//On SPI2, PORT B.15