diff --git a/User_Code/bsp/adc/bsp_adc.c b/User_Code/bsp/adc/bsp_adc.c index 915b585..ddae2f4 100644 --- a/User_Code/bsp/adc/bsp_adc.c +++ b/User_Code/bsp/adc/bsp_adc.c @@ -28,10 +28,8 @@ __attribute__((section (".AXI_SRAM"))) uint16_t ADC_Voltage_Val[2]; */ void BSP_ADC_Init(void) { - HAL_ADCEx_Calibration_Start(&hadc1, ADC_CALIB_OFFSET, ADC_SINGLE_ENDED); HAL_ADC_Start_DMA(&hadc1, (uint32_t *) ADC_Voltage_Val, 2); - } //------------------------------------------------------------------------------ @@ -43,11 +41,8 @@ void BSP_ADC_Init(void) */ float USER_ADC_Voltage_Update(void) { - - float Voltage; - Voltage = (ADC_Voltage_Val[0] * 3.3f / 65535) * 11.0f; + auto Voltage = (ADC_Voltage_Val[0] * 3.3f / 65535) * 11.0f; return Voltage; - } //------------------------------------------------------------------------------ diff --git a/openocd_cfg/CMSIS_DAP.cfg b/openocd_cfg/CMSIS_DAP.cfg new file mode 100644 index 0000000..59ca6e0 --- /dev/null +++ b/openocd_cfg/CMSIS_DAP.cfg @@ -0,0 +1,15 @@ +# SPDX-License-Identifier: GPL-2.0-or-later + +# +# ARM CMSIS-DAP compliant adapter +# +# http://www.keil.com/support/man/docs/dapdebug/ +# + +adapter driver cmsis-dap +transport select swd +source [find target/stm32h7x.cfg] +# download speed = 10MHz +adapter speed 1000 +# Optionally specify the serial number of CMSIS-DAP usb device. +# adapter serial 02200201E6661E601B98E3B9