From 61cce742916f5f5019f4d152cbb643d7ea3b8bee Mon Sep 17 00:00:00 2001 From: coreglitch Date: Tue, 8 Dec 2020 12:51:59 +0300 Subject: [PATCH] Fix OK button in F4 (#259) * fix OK button in F4 * return DFU serial to make --- firmware/targets/f3/f3-1/Src/gpio.c | 2 +- firmware/targets/f3/f3-1/f3-1.ioc | 3 ++- make/rules.mk | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/firmware/targets/f3/f3-1/Src/gpio.c b/firmware/targets/f3/f3-1/Src/gpio.c index 392b8065..64d47c68 100644 --- a/firmware/targets/f3/f3-1/Src/gpio.c +++ b/firmware/targets/f3/f3-1/Src/gpio.c @@ -79,7 +79,7 @@ void MX_GPIO_Init(void) /*Configure GPIO pin : PtPin */ GPIO_InitStruct.Pin = BUTTON_OK_Pin; - GPIO_InitStruct.Mode = GPIO_MODE_IT_RISING; + GPIO_InitStruct.Mode = GPIO_MODE_IT_RISING_FALLING; GPIO_InitStruct.Pull = GPIO_NOPULL; HAL_GPIO_Init(BUTTON_OK_GPIO_Port, &GPIO_InitStruct); diff --git a/firmware/targets/f3/f3-1/f3-1.ioc b/firmware/targets/f3/f3-1/f3-1.ioc index 73df997b..7ae5ce48 100644 --- a/firmware/targets/f3/f3-1/f3-1.ioc +++ b/firmware/targets/f3/f3-1/f3-1.ioc @@ -373,7 +373,7 @@ RCC.HSE_VALUE=32000000 RCC.FCLK2Freq_Value=32000000 FREERTOS.configUSE_TIMERS=1 NVIC.DebugMonitor_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false -PH3-BOOT0.GPIOParameters=GPIO_Label +PH3-BOOT0.GPIOParameters=GPIO_Label,GPIO_ModeDefaultEXTI Mcu.IP10=SPI2 NVIC.SysTick_IRQn=true\:0\:0\:false\:false\:false\:false\:false\:false Mcu.IP12=TIM1 @@ -513,6 +513,7 @@ VP_ADC1_Vref_Input.Signal=ADC1_Vref_Input SH.SharedAnalog_PC5.1=ADC1_IN14,IN14-Single-Ended OSC_OUT.Locked=true PA4.GPIOParameters=GPIO_Label +PH3-BOOT0.GPIO_ModeDefaultEXTI=GPIO_MODE_IT_RISING_FALLING PB15.GPIOParameters=GPIO_Label RCC.IPParameters=ADCFreq_Value,AHB2CLKDivider,AHBFreq_Value,APB1Freq_Value,APB1TimFreq_Value,APB2Freq_Value,APB2TimFreq_Value,APB3Freq_Value,Cortex2Freq_Value,CortexFreq_Value,EnbaleCSS,FCLK2Freq_Value,FCLKCortexFreq_Value,FamilyName,HCLK2Freq_Value,HCLK3Freq_Value,HCLKFreq_Value,HCLKRFFreq_Value,HSE_VALUE,HSI48_VALUE,HSI_VALUE,I2C1Freq_Value,I2C3Freq_Value,LCDFreq_Value,LPTIM1Freq_Value,LPTIM2Freq_Value,LPUART1Freq_Value,LSCOPinFreq_Value,LSI_VALUE,MCO1PinFreq_Value,MSIOscState,PLLM,PLLPoutputFreq_Value,PLLQoutputFreq_Value,PLLRCLKFreq_Value,PLLSAI1N,PLLSAI1PoutputFreq_Value,PLLSAI1QoutputFreq_Value,PLLSAI1RoutputFreq_Value,PLLSourceVirtual,PREFETCH_ENABLE,PWRFreq_Value,RFWKPFreq_Value,RNGFreq_Value,RTCClockSelection,RTCFreq_Value,SAI1Freq_Value,SMPS1Freq_Value,SMPSCLockSelectionVirtual,SMPSFreq_Value,SYSCLKFreq_VALUE,SYSCLKSource,USART1Freq_Value,USBFreq_Value,VCOInputFreq_Value,VCOOutputFreq_Value,VCOSAI1OutputFreq_Value ProjectManager.AskForMigrate=true diff --git a/make/rules.mk b/make/rules.mk index c09643ea..d4614ce1 100644 --- a/make/rules.mk +++ b/make/rules.mk @@ -59,7 +59,7 @@ $(OBJ_DIR)/flash: $(OBJ_DIR)/$(PROJECT).bin touch $@ $(OBJ_DIR)/upload: $(OBJ_DIR)/$(PROJECT).bin - dfu-util -D $(OBJ_DIR)/$(PROJECT).bin -a 0 -s $(FLASH_ADDRESS) + dfu-util -D $(OBJ_DIR)/$(PROJECT).bin -a 0 -s $(FLASH_ADDRESS) -S $(DFU_SERIAL) touch $@ $(ASSETS): $(ASSETS_SOURCES)