[stm32f072 nucleo] support pwm for arduino (#5693)
This commit is contained in:
parent
88de4f726d
commit
81e5fa061f
|
@ -147,7 +147,7 @@ menu "On-chip Peripheral Drivers"
|
||||||
select RT_USING_PWM
|
select RT_USING_PWM
|
||||||
if BSP_USING_PWM
|
if BSP_USING_PWM
|
||||||
menuconfig BSP_USING_PWM3
|
menuconfig BSP_USING_PWM3
|
||||||
bool "Enable timer3 output pwm"
|
bool "Enable timer3 output PWM"
|
||||||
default n
|
default n
|
||||||
if BSP_USING_PWM3
|
if BSP_USING_PWM3
|
||||||
config BSP_USING_PWM3_CH1
|
config BSP_USING_PWM3_CH1
|
||||||
|
|
|
@ -240,7 +240,7 @@ menu "On-chip Peripheral Drivers"
|
||||||
select RT_USING_PWM
|
select RT_USING_PWM
|
||||||
if BSP_USING_PWM
|
if BSP_USING_PWM
|
||||||
menuconfig BSP_USING_PWM1
|
menuconfig BSP_USING_PWM1
|
||||||
bool "Enable timer1 output pwm"
|
bool "Enable timer1 output PWM"
|
||||||
default n
|
default n
|
||||||
if BSP_USING_PWM1
|
if BSP_USING_PWM1
|
||||||
config BSP_USING_PWM1_CH1
|
config BSP_USING_PWM1_CH1
|
||||||
|
@ -261,7 +261,7 @@ menu "On-chip Peripheral Drivers"
|
||||||
endif
|
endif
|
||||||
|
|
||||||
menuconfig BSP_USING_PWM2
|
menuconfig BSP_USING_PWM2
|
||||||
bool "Enable timer2 output pwm"
|
bool "Enable timer2 output PWM"
|
||||||
default n
|
default n
|
||||||
if BSP_USING_PWM2
|
if BSP_USING_PWM2
|
||||||
config BSP_USING_PWM2_CH1
|
config BSP_USING_PWM2_CH1
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2006-2021, RT-Thread Development Team
|
* Copyright (c) 2006-2022, RT-Thread Development Team
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
*
|
*
|
||||||
|
@ -61,6 +61,28 @@ extern "C" {
|
||||||
#endif /* PWM5_CONFIG */
|
#endif /* PWM5_CONFIG */
|
||||||
#endif /* BSP_USING_PWM5 */
|
#endif /* BSP_USING_PWM5 */
|
||||||
|
|
||||||
|
#ifdef BSP_USING_PWM16
|
||||||
|
#ifndef PWM16_CONFIG
|
||||||
|
#define PWM16_CONFIG \
|
||||||
|
{ \
|
||||||
|
.tim_handle.Instance = TIM16, \
|
||||||
|
.name = "pwm16", \
|
||||||
|
.channel = 0 \
|
||||||
|
}
|
||||||
|
#endif /* PWM16_CONFIG */
|
||||||
|
#endif /* BSP_USING_PWM16 */
|
||||||
|
|
||||||
|
#ifdef BSP_USING_PWM17
|
||||||
|
#ifndef PWM17_CONFIG
|
||||||
|
#define PWM17_CONFIG \
|
||||||
|
{ \
|
||||||
|
.tim_handle.Instance = TIM17, \
|
||||||
|
.name = "pwm17", \
|
||||||
|
.channel = 0 \
|
||||||
|
}
|
||||||
|
#endif /* PWM17_CONFIG */
|
||||||
|
#endif /* BSP_USING_PWM17 */
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -587,6 +587,12 @@ static void pwm_get_channel(void)
|
||||||
#ifdef BSP_USING_PWM12_CH2
|
#ifdef BSP_USING_PWM12_CH2
|
||||||
stm32_pwm_obj[PWM12_INDEX].channel |= 1 << 1;
|
stm32_pwm_obj[PWM12_INDEX].channel |= 1 << 1;
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef BSP_USING_PWM16_CH1
|
||||||
|
stm32_pwm_obj[PWM16_INDEX].channel |= 1 << 0;
|
||||||
|
#endif
|
||||||
|
#ifdef BSP_USING_PWM17_CH1
|
||||||
|
stm32_pwm_obj[PWM17_INDEX].channel |= 1 << 0;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
static int stm32_pwm_init(void)
|
static int stm32_pwm_init(void)
|
||||||
|
|
|
@ -99,12 +99,12 @@ menu "On-chip Peripheral Drivers"
|
||||||
endif
|
endif
|
||||||
|
|
||||||
menuconfig BSP_USING_PWM
|
menuconfig BSP_USING_PWM
|
||||||
bool "Enable pwm"
|
bool "Enable PWM"
|
||||||
default n
|
default n
|
||||||
select RT_USING_PWM
|
select RT_USING_PWM
|
||||||
if BSP_USING_PWM
|
if BSP_USING_PWM
|
||||||
menuconfig BSP_USING_PWM3
|
menuconfig BSP_USING_PWM3
|
||||||
bool "Enable timer3 output pwm"
|
bool "Enable timer3 output PWM"
|
||||||
default n
|
default n
|
||||||
if BSP_USING_PWM3
|
if BSP_USING_PWM3
|
||||||
config BSP_USING_PWM3_CH1
|
config BSP_USING_PWM3_CH1
|
||||||
|
|
|
@ -30,8 +30,8 @@ const pin_map_t pin_map_table[]=
|
||||||
{D7, GET_PIN(A,8)},
|
{D7, GET_PIN(A,8)},
|
||||||
{D8, GET_PIN(A,9)},
|
{D8, GET_PIN(A,9)},
|
||||||
{D9, GET_PIN(C,7), "pwm3", 2}, /* PWM */
|
{D9, GET_PIN(C,7), "pwm3", 2}, /* PWM */
|
||||||
{D10, GET_PIN(B,6)},
|
{D10, GET_PIN(B,6), "pwm16", 1}, /* PWM */
|
||||||
{D11, GET_PIN(A,7)},
|
{D11, GET_PIN(A,7), "pwm17", 1}, /* PWM */
|
||||||
{D12, GET_PIN(A,6)},
|
{D12, GET_PIN(A,6)},
|
||||||
{D13, GET_PIN(A,5)},
|
{D13, GET_PIN(A,5)},
|
||||||
{D14, GET_PIN(B,9)},
|
{D14, GET_PIN(B,9)},
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
[PreviousLibFiles]
|
[PreviousLibFiles]
|
||||||
LibFiles=Drivers\STM32F0xx_HAL_Driver\Inc\stm32f0xx_hal_adc.h;Drivers\STM32F0xx_HAL_Driver\Inc\stm32f0xx_hal_adc_ex.h;Drivers\STM32F0xx_HAL_Driver\Inc\stm32f0xx_hal_rcc.h;Drivers\STM32F0xx_HAL_Driver\Inc\stm32f0xx_hal_rcc_ex.h;Drivers\STM32F0xx_HAL_Driver\Inc\stm32f0xx_hal.h;Drivers\STM32F0xx_HAL_Driver\Inc\stm32f0xx_hal_def.h;Drivers\STM32F0xx_HAL_Driver\Inc\Legacy\stm32_hal_legacy.h;Drivers\STM32F0xx_HAL_Driver\Inc\stm32f0xx_hal_i2c.h;Drivers\STM32F0xx_HAL_Driver\Inc\stm32f0xx_hal_i2c_ex.h;Drivers\STM32F0xx_HAL_Driver\Inc\stm32f0xx_hal_gpio.h;Drivers\STM32F0xx_HAL_Driver\Inc\stm32f0xx_hal_gpio_ex.h;Drivers\STM32F0xx_HAL_Driver\Inc\stm32f0xx_hal_dma_ex.h;Drivers\STM32F0xx_HAL_Driver\Inc\stm32f0xx_hal_dma.h;Drivers\STM32F0xx_HAL_Driver\Inc\stm32f0xx_hal_cortex.h;Drivers\STM32F0xx_HAL_Driver\Inc\stm32f0xx_hal_pwr.h;Drivers\STM32F0xx_HAL_Driver\Inc\stm32f0xx_hal_pwr_ex.h;Drivers\STM32F0xx_HAL_Driver\Inc\stm32f0xx_hal_flash.h;Drivers\STM32F0xx_HAL_Driver\Inc\stm32f0xx_hal_flash_ex.h;Drivers\STM32F0xx_HAL_Driver\Inc\stm32f0xx_hal_tim.h;Drivers\STM32F0xx_HAL_Driver\Inc\stm32f0xx_hal_tim_ex.h;Drivers\STM32F0xx_HAL_Driver\Inc\stm32f0xx_hal_uart.h;Drivers\STM32F0xx_HAL_Driver\Inc\stm32f0xx_hal_uart_ex.h;Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_hal_adc.c;Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_hal_adc_ex.c;Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_hal_rcc.c;Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_hal_rcc_ex.c;Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_hal.c;Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_hal_i2c.c;Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_hal_i2c_ex.c;Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_hal_gpio.c;Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_hal_dma.c;Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_hal_cortex.c;Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_hal_pwr.c;Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_hal_pwr_ex.c;Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_hal_flash.c;Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_hal_flash_ex.c;Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_hal_tim.c;Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_hal_tim_ex.c;Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_hal_uart.c;Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_hal_uart_ex.c;Drivers\STM32F0xx_HAL_Driver\Inc\stm32f0xx_hal_adc.h;Drivers\STM32F0xx_HAL_Driver\Inc\stm32f0xx_hal_adc_ex.h;Drivers\STM32F0xx_HAL_Driver\Inc\stm32f0xx_hal_rcc.h;Drivers\STM32F0xx_HAL_Driver\Inc\stm32f0xx_hal_rcc_ex.h;Drivers\STM32F0xx_HAL_Driver\Inc\stm32f0xx_hal.h;Drivers\STM32F0xx_HAL_Driver\Inc\stm32f0xx_hal_def.h;Drivers\STM32F0xx_HAL_Driver\Inc\Legacy\stm32_hal_legacy.h;Drivers\STM32F0xx_HAL_Driver\Inc\stm32f0xx_hal_i2c.h;Drivers\STM32F0xx_HAL_Driver\Inc\stm32f0xx_hal_i2c_ex.h;Drivers\STM32F0xx_HAL_Driver\Inc\stm32f0xx_hal_gpio.h;Drivers\STM32F0xx_HAL_Driver\Inc\stm32f0xx_hal_gpio_ex.h;Drivers\STM32F0xx_HAL_Driver\Inc\stm32f0xx_hal_dma_ex.h;Drivers\STM32F0xx_HAL_Driver\Inc\stm32f0xx_hal_dma.h;Drivers\STM32F0xx_HAL_Driver\Inc\stm32f0xx_hal_cortex.h;Drivers\STM32F0xx_HAL_Driver\Inc\stm32f0xx_hal_pwr.h;Drivers\STM32F0xx_HAL_Driver\Inc\stm32f0xx_hal_pwr_ex.h;Drivers\STM32F0xx_HAL_Driver\Inc\stm32f0xx_hal_flash.h;Drivers\STM32F0xx_HAL_Driver\Inc\stm32f0xx_hal_flash_ex.h;Drivers\STM32F0xx_HAL_Driver\Inc\stm32f0xx_hal_tim.h;Drivers\STM32F0xx_HAL_Driver\Inc\stm32f0xx_hal_tim_ex.h;Drivers\STM32F0xx_HAL_Driver\Inc\stm32f0xx_hal_uart.h;Drivers\STM32F0xx_HAL_Driver\Inc\stm32f0xx_hal_uart_ex.h;Drivers\CMSIS\Device\ST\STM32F0xx\Include\stm32f072xb.h;Drivers\CMSIS\Device\ST\STM32F0xx\Include\stm32f0xx.h;Drivers\CMSIS\Device\ST\STM32F0xx\Include\system_stm32f0xx.h;Drivers\CMSIS\Device\ST\STM32F0xx\Source\Templates\system_stm32f0xx.c;Drivers\CMSIS\Include\arm_common_tables.h;Drivers\CMSIS\Include\arm_const_structs.h;Drivers\CMSIS\Include\arm_math.h;Drivers\CMSIS\Include\cmsis_armcc.h;Drivers\CMSIS\Include\cmsis_armcc_V6.h;Drivers\CMSIS\Include\cmsis_gcc.h;Drivers\CMSIS\Include\core_cm0.h;Drivers\CMSIS\Include\core_cm0plus.h;Drivers\CMSIS\Include\core_cm3.h;Drivers\CMSIS\Include\core_cm4.h;Drivers\CMSIS\Include\core_cm7.h;Drivers\CMSIS\Include\core_cmFunc.h;Drivers\CMSIS\Include\core_cmInstr.h;Drivers\CMSIS\Include\core_cmSimd.h;Drivers\CMSIS\Include\core_sc000.h;Drivers\CMSIS\Include\core_sc300.h;
|
LibFiles=Drivers\STM32F0xx_HAL_Driver\Inc\stm32f0xx_hal_adc.h;Drivers\STM32F0xx_HAL_Driver\Inc\stm32f0xx_hal_adc_ex.h;Drivers\STM32F0xx_HAL_Driver\Inc\stm32f0xx_hal_rcc.h;Drivers\STM32F0xx_HAL_Driver\Inc\stm32f0xx_hal_rcc_ex.h;Drivers\STM32F0xx_HAL_Driver\Inc\stm32f0xx_hal.h;Drivers\STM32F0xx_HAL_Driver\Inc\stm32f0xx_hal_def.h;Drivers\STM32F0xx_HAL_Driver\Inc\Legacy\stm32_hal_legacy.h;Drivers\STM32F0xx_HAL_Driver\Inc\stm32f0xx_hal_i2c.h;Drivers\STM32F0xx_HAL_Driver\Inc\stm32f0xx_hal_i2c_ex.h;Drivers\STM32F0xx_HAL_Driver\Inc\stm32f0xx_hal_gpio.h;Drivers\STM32F0xx_HAL_Driver\Inc\stm32f0xx_hal_gpio_ex.h;Drivers\STM32F0xx_HAL_Driver\Inc\stm32f0xx_hal_dma_ex.h;Drivers\STM32F0xx_HAL_Driver\Inc\stm32f0xx_hal_dma.h;Drivers\STM32F0xx_HAL_Driver\Inc\stm32f0xx_hal_cortex.h;Drivers\STM32F0xx_HAL_Driver\Inc\stm32f0xx_hal_pwr.h;Drivers\STM32F0xx_HAL_Driver\Inc\stm32f0xx_hal_pwr_ex.h;Drivers\STM32F0xx_HAL_Driver\Inc\stm32f0xx_hal_flash.h;Drivers\STM32F0xx_HAL_Driver\Inc\stm32f0xx_hal_flash_ex.h;Drivers\STM32F0xx_HAL_Driver\Inc\stm32f0xx_hal_exti.h;Drivers\STM32F0xx_HAL_Driver\Inc\stm32f0xx_hal_tim.h;Drivers\STM32F0xx_HAL_Driver\Inc\stm32f0xx_hal_tim_ex.h;Drivers\STM32F0xx_HAL_Driver\Inc\stm32f0xx_hal_uart.h;Drivers\STM32F0xx_HAL_Driver\Inc\stm32f0xx_hal_uart_ex.h;Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_hal_adc.c;Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_hal_adc_ex.c;Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_hal_rcc.c;Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_hal_rcc_ex.c;Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_hal.c;Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_hal_i2c.c;Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_hal_i2c_ex.c;Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_hal_gpio.c;Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_hal_dma.c;Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_hal_cortex.c;Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_hal_pwr.c;Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_hal_pwr_ex.c;Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_hal_flash.c;Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_hal_flash_ex.c;Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_hal_exti.c;Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_hal_tim.c;Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_hal_tim_ex.c;Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_hal_uart.c;Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_hal_uart_ex.c;Drivers\STM32F0xx_HAL_Driver\Inc\stm32f0xx_hal_adc.h;Drivers\STM32F0xx_HAL_Driver\Inc\stm32f0xx_hal_adc_ex.h;Drivers\STM32F0xx_HAL_Driver\Inc\stm32f0xx_hal_rcc.h;Drivers\STM32F0xx_HAL_Driver\Inc\stm32f0xx_hal_rcc_ex.h;Drivers\STM32F0xx_HAL_Driver\Inc\stm32f0xx_hal.h;Drivers\STM32F0xx_HAL_Driver\Inc\stm32f0xx_hal_def.h;Drivers\STM32F0xx_HAL_Driver\Inc\Legacy\stm32_hal_legacy.h;Drivers\STM32F0xx_HAL_Driver\Inc\stm32f0xx_hal_i2c.h;Drivers\STM32F0xx_HAL_Driver\Inc\stm32f0xx_hal_i2c_ex.h;Drivers\STM32F0xx_HAL_Driver\Inc\stm32f0xx_hal_gpio.h;Drivers\STM32F0xx_HAL_Driver\Inc\stm32f0xx_hal_gpio_ex.h;Drivers\STM32F0xx_HAL_Driver\Inc\stm32f0xx_hal_dma_ex.h;Drivers\STM32F0xx_HAL_Driver\Inc\stm32f0xx_hal_dma.h;Drivers\STM32F0xx_HAL_Driver\Inc\stm32f0xx_hal_cortex.h;Drivers\STM32F0xx_HAL_Driver\Inc\stm32f0xx_hal_pwr.h;Drivers\STM32F0xx_HAL_Driver\Inc\stm32f0xx_hal_pwr_ex.h;Drivers\STM32F0xx_HAL_Driver\Inc\stm32f0xx_hal_flash.h;Drivers\STM32F0xx_HAL_Driver\Inc\stm32f0xx_hal_flash_ex.h;Drivers\STM32F0xx_HAL_Driver\Inc\stm32f0xx_hal_exti.h;Drivers\STM32F0xx_HAL_Driver\Inc\stm32f0xx_hal_tim.h;Drivers\STM32F0xx_HAL_Driver\Inc\stm32f0xx_hal_tim_ex.h;Drivers\STM32F0xx_HAL_Driver\Inc\stm32f0xx_hal_uart.h;Drivers\STM32F0xx_HAL_Driver\Inc\stm32f0xx_hal_uart_ex.h;Drivers\CMSIS\Device\ST\STM32F0xx\Include\stm32f072xb.h;Drivers\CMSIS\Device\ST\STM32F0xx\Include\stm32f0xx.h;Drivers\CMSIS\Device\ST\STM32F0xx\Include\system_stm32f0xx.h;Drivers\CMSIS\Device\ST\STM32F0xx\Source\Templates\system_stm32f0xx.c;Drivers\CMSIS\Include\cmsis_armcc.h;Drivers\CMSIS\Include\cmsis_armclang.h;Drivers\CMSIS\Include\cmsis_compiler.h;Drivers\CMSIS\Include\cmsis_gcc.h;Drivers\CMSIS\Include\cmsis_iccarm.h;Drivers\CMSIS\Include\cmsis_version.h;Drivers\CMSIS\Include\core_armv8mbl.h;Drivers\CMSIS\Include\core_armv8mml.h;Drivers\CMSIS\Include\core_cm0.h;Drivers\CMSIS\Include\core_cm0plus.h;Drivers\CMSIS\Include\core_cm1.h;Drivers\CMSIS\Include\core_cm23.h;Drivers\CMSIS\Include\core_cm3.h;Drivers\CMSIS\Include\core_cm33.h;Drivers\CMSIS\Include\core_cm4.h;Drivers\CMSIS\Include\core_cm7.h;Drivers\CMSIS\Include\core_sc000.h;Drivers\CMSIS\Include\core_sc300.h;Drivers\CMSIS\Include\mpu_armv7.h;Drivers\CMSIS\Include\mpu_armv8.h;Drivers\CMSIS\Include\tz_context.h;
|
||||||
|
|
||||||
[PreviousUsedKeilFiles]
|
[PreviousUsedKeilFiles]
|
||||||
SourceFiles=..\Src\main.c;..\Src\stm32f0xx_it.c;..\Src\stm32f0xx_hal_msp.c;..\Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_hal_adc.c;..\Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_hal_adc_ex.c;..\Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_hal_rcc.c;..\Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_hal_rcc_ex.c;..\Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_hal.c;..\Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_hal_i2c.c;..\Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_hal_i2c_ex.c;..\Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_hal_gpio.c;..\Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_hal_dma.c;..\Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_hal_cortex.c;..\Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_hal_pwr.c;..\Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_hal_pwr_ex.c;..\Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_hal_flash.c;..\Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_hal_flash_ex.c;..\Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_hal_tim.c;..\Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_hal_tim_ex.c;..\Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_hal_uart.c;..\Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_hal_uart_ex.c;..\Drivers\CMSIS\Device\ST\STM32F0xx\Source\Templates\system_stm32f0xx.c;..\\Src\system_stm32f0xx.c;..\Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_hal_adc.c;..\Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_hal_adc_ex.c;..\Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_hal_rcc.c;..\Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_hal_rcc_ex.c;..\Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_hal.c;..\Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_hal_i2c.c;..\Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_hal_i2c_ex.c;..\Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_hal_gpio.c;..\Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_hal_dma.c;..\Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_hal_cortex.c;..\Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_hal_pwr.c;..\Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_hal_pwr_ex.c;..\Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_hal_flash.c;..\Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_hal_flash_ex.c;..\Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_hal_tim.c;..\Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_hal_tim_ex.c;..\Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_hal_uart.c;..\Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_hal_uart_ex.c;..\Drivers\CMSIS\Device\ST\STM32F0xx\Source\Templates\system_stm32f0xx.c;..\\Src\system_stm32f0xx.c;;;
|
SourceFiles=..\Src\main.c;..\Src\stm32f0xx_it.c;..\Src\stm32f0xx_hal_msp.c;..\Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_hal_adc.c;..\Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_hal_adc_ex.c;..\Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_hal_rcc.c;..\Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_hal_rcc_ex.c;..\Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_hal.c;..\Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_hal_i2c.c;..\Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_hal_i2c_ex.c;..\Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_hal_gpio.c;..\Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_hal_dma.c;..\Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_hal_cortex.c;..\Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_hal_pwr.c;..\Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_hal_pwr_ex.c;..\Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_hal_flash.c;..\Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_hal_flash_ex.c;..\Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_hal_exti.c;..\Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_hal_tim.c;..\Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_hal_tim_ex.c;..\Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_hal_uart.c;..\Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_hal_uart_ex.c;..\Drivers\CMSIS\Device\ST\STM32F0xx\Source\Templates\system_stm32f0xx.c;..\\Src\system_stm32f0xx.c;..\Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_hal_adc.c;..\Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_hal_adc_ex.c;..\Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_hal_rcc.c;..\Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_hal_rcc_ex.c;..\Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_hal.c;..\Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_hal_i2c.c;..\Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_hal_i2c_ex.c;..\Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_hal_gpio.c;..\Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_hal_dma.c;..\Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_hal_cortex.c;..\Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_hal_pwr.c;..\Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_hal_pwr_ex.c;..\Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_hal_flash.c;..\Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_hal_flash_ex.c;..\Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_hal_exti.c;..\Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_hal_tim.c;..\Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_hal_tim_ex.c;..\Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_hal_uart.c;..\Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_hal_uart_ex.c;..\Drivers\CMSIS\Device\ST\STM32F0xx\Source\Templates\system_stm32f0xx.c;..\\Src\system_stm32f0xx.c;;;
|
||||||
HeaderPath=..\Drivers\STM32F0xx_HAL_Driver\Inc;..\Drivers\STM32F0xx_HAL_Driver\Inc\Legacy;..\Drivers\CMSIS\Device\ST\STM32F0xx\Include;..\Drivers\CMSIS\Include;..\Inc;
|
HeaderPath=..\Drivers\STM32F0xx_HAL_Driver\Inc;..\Drivers\STM32F0xx_HAL_Driver\Inc\Legacy;..\Drivers\CMSIS\Device\ST\STM32F0xx\Include;..\Drivers\CMSIS\Include;..\Inc;
|
||||||
CDefines=USE_HAL_DRIVER;STM32F072xB;USE_HAL_DRIVER;USE_HAL_DRIVER;
|
CDefines=USE_HAL_DRIVER;STM32F072xB;USE_HAL_DRIVER;USE_HAL_DRIVER;
|
||||||
|
|
||||||
|
|
|
@ -9,8 +9,10 @@ Mcu.IP2=RCC
|
||||||
Mcu.IP3=SYS
|
Mcu.IP3=SYS
|
||||||
Mcu.IP4=TIM2
|
Mcu.IP4=TIM2
|
||||||
Mcu.IP5=TIM3
|
Mcu.IP5=TIM3
|
||||||
Mcu.IP6=USART2
|
Mcu.IP6=TIM16
|
||||||
Mcu.IPNb=7
|
Mcu.IP7=TIM17
|
||||||
|
Mcu.IP8=USART2
|
||||||
|
Mcu.IPNb=9
|
||||||
Mcu.Name=STM32F072R(8-B)Tx
|
Mcu.Name=STM32F072R(8-B)Tx
|
||||||
Mcu.Package=LQFP64
|
Mcu.Package=LQFP64
|
||||||
Mcu.Pin0=PC13
|
Mcu.Pin0=PC13
|
||||||
|
@ -18,17 +20,21 @@ Mcu.Pin1=PC14-OSC32_IN
|
||||||
Mcu.Pin10=PA3
|
Mcu.Pin10=PA3
|
||||||
Mcu.Pin11=PA4
|
Mcu.Pin11=PA4
|
||||||
Mcu.Pin12=PA5
|
Mcu.Pin12=PA5
|
||||||
Mcu.Pin13=PB0
|
Mcu.Pin13=PA7
|
||||||
Mcu.Pin14=PB10
|
Mcu.Pin14=PB0
|
||||||
Mcu.Pin15=PC7
|
Mcu.Pin15=PB10
|
||||||
Mcu.Pin16=PA13
|
Mcu.Pin16=PC7
|
||||||
Mcu.Pin17=PA14
|
Mcu.Pin17=PA13
|
||||||
Mcu.Pin18=PB3
|
Mcu.Pin18=PA14
|
||||||
Mcu.Pin19=PB4
|
Mcu.Pin19=PB3
|
||||||
Mcu.Pin2=PC15-OSC32_OUT
|
Mcu.Pin2=PC15-OSC32_OUT
|
||||||
Mcu.Pin20=VP_SYS_VS_Systick
|
Mcu.Pin20=PB4
|
||||||
Mcu.Pin21=VP_TIM2_VS_ClockSourceINT
|
Mcu.Pin21=PB6
|
||||||
Mcu.Pin22=VP_TIM3_VS_ClockSourceINT
|
Mcu.Pin22=VP_SYS_VS_Systick
|
||||||
|
Mcu.Pin23=VP_TIM2_VS_ClockSourceINT
|
||||||
|
Mcu.Pin24=VP_TIM3_VS_ClockSourceINT
|
||||||
|
Mcu.Pin25=VP_TIM16_VS_ClockSourceINT
|
||||||
|
Mcu.Pin26=VP_TIM17_VS_ClockSourceINT
|
||||||
Mcu.Pin3=PF0-OSC_IN
|
Mcu.Pin3=PF0-OSC_IN
|
||||||
Mcu.Pin4=PF1-OSC_OUT
|
Mcu.Pin4=PF1-OSC_OUT
|
||||||
Mcu.Pin5=PC0
|
Mcu.Pin5=PC0
|
||||||
|
@ -36,12 +42,12 @@ Mcu.Pin6=PC1
|
||||||
Mcu.Pin7=PA0
|
Mcu.Pin7=PA0
|
||||||
Mcu.Pin8=PA1
|
Mcu.Pin8=PA1
|
||||||
Mcu.Pin9=PA2
|
Mcu.Pin9=PA2
|
||||||
Mcu.PinsNb=23
|
Mcu.PinsNb=27
|
||||||
Mcu.ThirdPartyNb=0
|
Mcu.ThirdPartyNb=0
|
||||||
Mcu.UserConstants=
|
Mcu.UserConstants=
|
||||||
Mcu.UserName=STM32F072RBTx
|
Mcu.UserName=STM32F072RBTx
|
||||||
MxCube.Version=5.2.0
|
MxCube.Version=6.5.0
|
||||||
MxDb.Version=DB.5.0.20
|
MxDb.Version=DB.6.0.50
|
||||||
NVIC.ForceEnableDMAVector=true
|
NVIC.ForceEnableDMAVector=true
|
||||||
NVIC.HardFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:true
|
NVIC.HardFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:true
|
||||||
NVIC.NonMaskableInt_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:true
|
NVIC.NonMaskableInt_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:true
|
||||||
|
@ -90,6 +96,8 @@ PA5.GPIO_PuPd=GPIO_NOPULL
|
||||||
PA5.GPIO_Speed=GPIO_SPEED_FREQ_LOW
|
PA5.GPIO_Speed=GPIO_SPEED_FREQ_LOW
|
||||||
PA5.Locked=true
|
PA5.Locked=true
|
||||||
PA5.Signal=GPIO_Output
|
PA5.Signal=GPIO_Output
|
||||||
|
PA7.Locked=true
|
||||||
|
PA7.Signal=S_TIM17_CH1
|
||||||
PB0.Locked=true
|
PB0.Locked=true
|
||||||
PB0.Mode=IN8
|
PB0.Mode=IN8
|
||||||
PB0.Signal=ADC_IN8
|
PB0.Signal=ADC_IN8
|
||||||
|
@ -99,6 +107,9 @@ PB3.Locked=true
|
||||||
PB3.Signal=S_TIM2_CH2
|
PB3.Signal=S_TIM2_CH2
|
||||||
PB4.Locked=true
|
PB4.Locked=true
|
||||||
PB4.Signal=S_TIM3_CH1
|
PB4.Signal=S_TIM3_CH1
|
||||||
|
PB6.Locked=true
|
||||||
|
PB6.Mode=PWM Generation1 CH1N
|
||||||
|
PB6.Signal=TIM16_CH1N
|
||||||
PC0.Locked=true
|
PC0.Locked=true
|
||||||
PC0.Mode=IN10
|
PC0.Mode=IN10
|
||||||
PC0.Signal=ADC_IN10
|
PC0.Signal=ADC_IN10
|
||||||
|
@ -132,7 +143,7 @@ ProjectManager.CustomerFirmwarePackage=
|
||||||
ProjectManager.DefaultFWLocation=true
|
ProjectManager.DefaultFWLocation=true
|
||||||
ProjectManager.DeletePrevious=true
|
ProjectManager.DeletePrevious=true
|
||||||
ProjectManager.DeviceId=STM32F072RBTx
|
ProjectManager.DeviceId=STM32F072RBTx
|
||||||
ProjectManager.FirmwarePackage=STM32Cube FW_F0 V1.10.0
|
ProjectManager.FirmwarePackage=STM32Cube FW_F0 V1.11.3
|
||||||
ProjectManager.FreePins=false
|
ProjectManager.FreePins=false
|
||||||
ProjectManager.HalAssertFull=false
|
ProjectManager.HalAssertFull=false
|
||||||
ProjectManager.HeapSize=0x200
|
ProjectManager.HeapSize=0x200
|
||||||
|
@ -150,7 +161,7 @@ ProjectManager.StackSize=0x400
|
||||||
ProjectManager.TargetToolchain=MDK-ARM V5
|
ProjectManager.TargetToolchain=MDK-ARM V5
|
||||||
ProjectManager.ToolChainLocation=
|
ProjectManager.ToolChainLocation=
|
||||||
ProjectManager.UnderRoot=false
|
ProjectManager.UnderRoot=false
|
||||||
ProjectManager.functionlistsort=1-MX_GPIO_Init-GPIO-false-HAL-true,2-SystemClock_Config-RCC-false-HAL-false,3-MX_USART2_UART_Init-USART2-false-HAL-true,4-MX_ADC_Init-ADC-false-HAL-true,5-MX_TIM2_Init-TIM2-false-HAL-true,6-MX_TIM3_Init-TIM3-false-HAL-true
|
ProjectManager.functionlistsort=1-MX_GPIO_Init-GPIO-false-HAL-true,2-SystemClock_Config-RCC-false-HAL-false,3-MX_USART2_UART_Init-USART2-false-HAL-true,4-MX_ADC_Init-ADC-false-HAL-true,5-MX_TIM2_Init-TIM2-false-HAL-true,6-MX_TIM3_Init-TIM3-false-HAL-true,7-MX_TIM16_Init-TIM16-false-HAL-true,8-MX_TIM17_Init-TIM17-false-HAL-true
|
||||||
RCC.AHBFreq_Value=48000000
|
RCC.AHBFreq_Value=48000000
|
||||||
RCC.APB1Freq_Value=48000000
|
RCC.APB1Freq_Value=48000000
|
||||||
RCC.APB1TimFreq_Value=48000000
|
RCC.APB1TimFreq_Value=48000000
|
||||||
|
@ -175,6 +186,8 @@ RCC.USART1Freq_Value=48000000
|
||||||
RCC.USART2Freq_Value=48000000
|
RCC.USART2Freq_Value=48000000
|
||||||
SH.GPXTI13.0=GPIO_EXTI13
|
SH.GPXTI13.0=GPIO_EXTI13
|
||||||
SH.GPXTI13.ConfNb=1
|
SH.GPXTI13.ConfNb=1
|
||||||
|
SH.S_TIM17_CH1.0=TIM17_CH1,Output Compare1 CH1
|
||||||
|
SH.S_TIM17_CH1.ConfNb=1
|
||||||
SH.S_TIM2_CH2.0=TIM2_CH2,PWM Generation2 CH2
|
SH.S_TIM2_CH2.0=TIM2_CH2,PWM Generation2 CH2
|
||||||
SH.S_TIM2_CH2.ConfNb=1
|
SH.S_TIM2_CH2.ConfNb=1
|
||||||
SH.S_TIM2_CH3.0=TIM2_CH3,PWM Generation3 CH3
|
SH.S_TIM2_CH3.0=TIM2_CH3,PWM Generation3 CH3
|
||||||
|
@ -183,6 +196,10 @@ SH.S_TIM3_CH1.0=TIM3_CH1,PWM Generation1 CH1
|
||||||
SH.S_TIM3_CH1.ConfNb=1
|
SH.S_TIM3_CH1.ConfNb=1
|
||||||
SH.S_TIM3_CH2.0=TIM3_CH2,PWM Generation2 CH2
|
SH.S_TIM3_CH2.0=TIM3_CH2,PWM Generation2 CH2
|
||||||
SH.S_TIM3_CH2.ConfNb=1
|
SH.S_TIM3_CH2.ConfNb=1
|
||||||
|
TIM16.Channel=TIM_CHANNEL_1
|
||||||
|
TIM16.IPParameters=Channel
|
||||||
|
TIM17.Channel=TIM_CHANNEL_1
|
||||||
|
TIM17.IPParameters=Channel
|
||||||
TIM2.Channel-PWM\ Generation2\ CH2=TIM_CHANNEL_2
|
TIM2.Channel-PWM\ Generation2\ CH2=TIM_CHANNEL_2
|
||||||
TIM2.Channel-PWM\ Generation3\ CH3=TIM_CHANNEL_3
|
TIM2.Channel-PWM\ Generation3\ CH3=TIM_CHANNEL_3
|
||||||
TIM2.IPParameters=Channel-PWM Generation3 CH3,Channel-PWM Generation2 CH2
|
TIM2.IPParameters=Channel-PWM Generation3 CH3,Channel-PWM Generation2 CH2
|
||||||
|
@ -194,6 +211,10 @@ USART2.VirtualMode=VM_ASYNC
|
||||||
USART2.VirtualMode-Asynchronous=VM_ASYNC
|
USART2.VirtualMode-Asynchronous=VM_ASYNC
|
||||||
VP_SYS_VS_Systick.Mode=SysTick
|
VP_SYS_VS_Systick.Mode=SysTick
|
||||||
VP_SYS_VS_Systick.Signal=SYS_VS_Systick
|
VP_SYS_VS_Systick.Signal=SYS_VS_Systick
|
||||||
|
VP_TIM16_VS_ClockSourceINT.Mode=Enable_Timer
|
||||||
|
VP_TIM16_VS_ClockSourceINT.Signal=TIM16_VS_ClockSourceINT
|
||||||
|
VP_TIM17_VS_ClockSourceINT.Mode=Enable_Timer
|
||||||
|
VP_TIM17_VS_ClockSourceINT.Signal=TIM17_VS_ClockSourceINT
|
||||||
VP_TIM2_VS_ClockSourceINT.Mode=Internal
|
VP_TIM2_VS_ClockSourceINT.Mode=Internal
|
||||||
VP_TIM2_VS_ClockSourceINT.Signal=TIM2_VS_ClockSourceINT
|
VP_TIM2_VS_ClockSourceINT.Signal=TIM2_VS_ClockSourceINT
|
||||||
VP_TIM3_VS_ClockSourceINT.Mode=Internal
|
VP_TIM3_VS_ClockSourceINT.Mode=Internal
|
||||||
|
|
|
@ -101,5 +101,3 @@ void Error_Handler(void);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* __MAIN_H */
|
#endif /* __MAIN_H */
|
||||||
|
|
||||||
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
|
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
/* USER CODE BEGIN Header */
|
||||||
/**
|
/**
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* @file stm32f0xx_hal_conf.h
|
* @file stm32f0xx_hal_conf.h
|
||||||
|
@ -5,32 +6,16 @@
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* @attention
|
* @attention
|
||||||
*
|
*
|
||||||
* <h2><center>© COPYRIGHT(c) 2022 STMicroelectronics</center></h2>
|
* Copyright (c) 2016 STMicroelectronics.
|
||||||
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without modification,
|
* This software is licensed under terms that can be found in the LICENSE file
|
||||||
* are permitted provided that the following conditions are met:
|
* in the root directory of this software component.
|
||||||
* 1. Redistributions of source code must retain the above copyright notice,
|
* If no LICENSE file comes with this software, it is provided AS-IS.
|
||||||
* this list of conditions and the following disclaimer.
|
|
||||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
|
||||||
* this list of conditions and the following disclaimer in the documentation
|
|
||||||
* and/or other materials provided with the distribution.
|
|
||||||
* 3. Neither the name of STMicroelectronics nor the names of its contributors
|
|
||||||
* may be used to endorse or promote products derived from this software
|
|
||||||
* without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
||||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
||||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
||||||
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
||||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
||||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
||||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
||||||
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
||||||
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
||||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*
|
*
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
*/
|
*/
|
||||||
|
/* USER CODE END Header */
|
||||||
|
|
||||||
/* Define to prevent recursive inclusion -------------------------------------*/
|
/* Define to prevent recursive inclusion -------------------------------------*/
|
||||||
#ifndef __STM32F0xx_HAL_CONF_H
|
#ifndef __STM32F0xx_HAL_CONF_H
|
||||||
|
@ -48,7 +33,7 @@
|
||||||
* @brief This is the list of modules to be used in the HAL driver
|
* @brief This is the list of modules to be used in the HAL driver
|
||||||
*/
|
*/
|
||||||
#define HAL_MODULE_ENABLED
|
#define HAL_MODULE_ENABLED
|
||||||
#define HAL_ADC_MODULE_ENABLED
|
#define HAL_ADC_MODULE_ENABLED
|
||||||
/*#define HAL_CRYP_MODULE_ENABLED */
|
/*#define HAL_CRYP_MODULE_ENABLED */
|
||||||
/*#define HAL_CAN_MODULE_ENABLED */
|
/*#define HAL_CAN_MODULE_ENABLED */
|
||||||
/*#define HAL_CEC_MODULE_ENABLED */
|
/*#define HAL_CEC_MODULE_ENABLED */
|
||||||
|
@ -72,11 +57,11 @@
|
||||||
/*#define HAL_SMBUS_MODULE_ENABLED */
|
/*#define HAL_SMBUS_MODULE_ENABLED */
|
||||||
/*#define HAL_WWDG_MODULE_ENABLED */
|
/*#define HAL_WWDG_MODULE_ENABLED */
|
||||||
/*#define HAL_PCD_MODULE_ENABLED */
|
/*#define HAL_PCD_MODULE_ENABLED */
|
||||||
/*#define HAL_EXTI_MODULE_ENABLED */
|
|
||||||
#define HAL_CORTEX_MODULE_ENABLED
|
#define HAL_CORTEX_MODULE_ENABLED
|
||||||
#define HAL_DMA_MODULE_ENABLED
|
#define HAL_DMA_MODULE_ENABLED
|
||||||
#define HAL_FLASH_MODULE_ENABLED
|
#define HAL_FLASH_MODULE_ENABLED
|
||||||
#define HAL_GPIO_MODULE_ENABLED
|
#define HAL_GPIO_MODULE_ENABLED
|
||||||
|
#define HAL_EXTI_MODULE_ENABLED
|
||||||
#define HAL_PWR_MODULE_ENABLED
|
#define HAL_PWR_MODULE_ENABLED
|
||||||
#define HAL_RCC_MODULE_ENABLED
|
#define HAL_RCC_MODULE_ENABLED
|
||||||
#define HAL_I2C_MODULE_ENABLED
|
#define HAL_I2C_MODULE_ENABLED
|
||||||
|
@ -129,7 +114,7 @@
|
||||||
* @brief Internal High Speed oscillator for USB (HSI48) value.
|
* @brief Internal High Speed oscillator for USB (HSI48) value.
|
||||||
*/
|
*/
|
||||||
#if !defined (HSI48_VALUE)
|
#if !defined (HSI48_VALUE)
|
||||||
#define HSI48_VALUE ((uint32_t)48000000) /*!< Value of the Internal High Speed oscillator for USB in Hz.
|
#define HSI48_VALUE ((uint32_t)48000000) /*!< Value of the Internal High Speed oscillator for USB in Hz.
|
||||||
The real value may vary depending on the variations
|
The real value may vary depending on the variations
|
||||||
in voltage and temperature. */
|
in voltage and temperature. */
|
||||||
#endif /* HSI48_VALUE */
|
#endif /* HSI48_VALUE */
|
||||||
|
@ -149,6 +134,9 @@
|
||||||
#define LSE_VALUE ((uint32_t)32768) /*!< Value of the External Low Speed oscillator in Hz */
|
#define LSE_VALUE ((uint32_t)32768) /*!< Value of the External Low Speed oscillator in Hz */
|
||||||
#endif /* LSE_VALUE */
|
#endif /* LSE_VALUE */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Time out for LSE start up value in ms.
|
||||||
|
*/
|
||||||
#if !defined (LSE_STARTUP_TIMEOUT)
|
#if !defined (LSE_STARTUP_TIMEOUT)
|
||||||
#define LSE_STARTUP_TIMEOUT ((uint32_t)5000) /*!< Time out for LSE start up, in ms */
|
#define LSE_STARTUP_TIMEOUT ((uint32_t)5000) /*!< Time out for LSE start up, in ms */
|
||||||
#endif /* LSE_STARTUP_TIMEOUT */
|
#endif /* LSE_STARTUP_TIMEOUT */
|
||||||
|
@ -168,6 +156,27 @@
|
||||||
#define PREFETCH_ENABLE 1
|
#define PREFETCH_ENABLE 1
|
||||||
#define INSTRUCTION_CACHE_ENABLE 0
|
#define INSTRUCTION_CACHE_ENABLE 0
|
||||||
#define DATA_CACHE_ENABLE 0
|
#define DATA_CACHE_ENABLE 0
|
||||||
|
#define USE_SPI_CRC 0U
|
||||||
|
|
||||||
|
#define USE_HAL_ADC_REGISTER_CALLBACKS 0U /* ADC register callback disabled */
|
||||||
|
#define USE_HAL_CAN_REGISTER_CALLBACKS 0U /* CAN register callback disabled */
|
||||||
|
#define USE_HAL_COMP_REGISTER_CALLBACKS 0U /* COMP register callback disabled */
|
||||||
|
#define USE_HAL_CEC_REGISTER_CALLBACKS 0U /* CEC register callback disabled */
|
||||||
|
#define USE_HAL_DAC_REGISTER_CALLBACKS 0U /* DAC register callback disabled */
|
||||||
|
#define USE_HAL_I2C_REGISTER_CALLBACKS 0U /* I2C register callback disabled */
|
||||||
|
#define USE_HAL_SMBUS_REGISTER_CALLBACKS 0U /* SMBUS register callback disabled */
|
||||||
|
#define USE_HAL_UART_REGISTER_CALLBACKS 0U /* UART register callback disabled */
|
||||||
|
#define USE_HAL_USART_REGISTER_CALLBACKS 0U /* USART register callback disabled */
|
||||||
|
#define USE_HAL_IRDA_REGISTER_CALLBACKS 0U /* IRDA register callback disabled */
|
||||||
|
#define USE_HAL_SMARTCARD_REGISTER_CALLBACKS 0U /* SMARTCARD register callback disabled */
|
||||||
|
#define USE_HAL_WWDG_REGISTER_CALLBACKS 0U /* WWDG register callback disabled */
|
||||||
|
#define USE_HAL_RTC_REGISTER_CALLBACKS 0U /* RTC register callback disabled */
|
||||||
|
#define USE_HAL_SPI_REGISTER_CALLBACKS 0U /* SPI register callback disabled */
|
||||||
|
#define USE_HAL_I2S_REGISTER_CALLBACKS 0U /* I2S register callback disabled */
|
||||||
|
#define USE_HAL_TIM_REGISTER_CALLBACKS 0U /* TIM register callback disabled */
|
||||||
|
#define USE_HAL_TSC_REGISTER_CALLBACKS 0U /* TSC register callback disabled */
|
||||||
|
#define USE_HAL_PCD_REGISTER_CALLBACKS 0U /* PCD register callback disabled */
|
||||||
|
|
||||||
/* ########################## Assert Selection ############################## */
|
/* ########################## Assert Selection ############################## */
|
||||||
/**
|
/**
|
||||||
* @brief Uncomment the line below to expanse the "assert_param" macro in the
|
* @brief Uncomment the line below to expanse the "assert_param" macro in the
|
||||||
|
@ -175,15 +184,6 @@
|
||||||
*/
|
*/
|
||||||
/* #define USE_FULL_ASSERT 1U */
|
/* #define USE_FULL_ASSERT 1U */
|
||||||
|
|
||||||
/* ################## SPI peripheral configuration ########################## */
|
|
||||||
|
|
||||||
/* CRC FEATURE: Use to activate CRC feature inside HAL SPI Driver
|
|
||||||
* Activated: CRC code is present inside driver
|
|
||||||
* Deactivated: CRC code cleaned from driver
|
|
||||||
*/
|
|
||||||
|
|
||||||
#define USE_SPI_CRC 0U
|
|
||||||
|
|
||||||
/* Includes ------------------------------------------------------------------*/
|
/* Includes ------------------------------------------------------------------*/
|
||||||
/**
|
/**
|
||||||
* @brief Include module's header file
|
* @brief Include module's header file
|
||||||
|
@ -193,14 +193,14 @@
|
||||||
#include "stm32f0xx_hal_rcc.h"
|
#include "stm32f0xx_hal_rcc.h"
|
||||||
#endif /* HAL_RCC_MODULE_ENABLED */
|
#endif /* HAL_RCC_MODULE_ENABLED */
|
||||||
|
|
||||||
#ifdef HAL_EXTI_MODULE_ENABLED
|
|
||||||
#include "stm32f0xx_hal_exti.h"
|
|
||||||
#endif /* HAL_EXTI_MODULE_ENABLED */
|
|
||||||
|
|
||||||
#ifdef HAL_GPIO_MODULE_ENABLED
|
#ifdef HAL_GPIO_MODULE_ENABLED
|
||||||
#include "stm32f0xx_hal_gpio.h"
|
#include "stm32f0xx_hal_gpio.h"
|
||||||
#endif /* HAL_GPIO_MODULE_ENABLED */
|
#endif /* HAL_GPIO_MODULE_ENABLED */
|
||||||
|
|
||||||
|
#ifdef HAL_EXTI_MODULE_ENABLED
|
||||||
|
#include "stm32f0xx_hal_exti.h"
|
||||||
|
#endif /* HAL_EXTI_MODULE_ENABLED */
|
||||||
|
|
||||||
#ifdef HAL_DMA_MODULE_ENABLED
|
#ifdef HAL_DMA_MODULE_ENABLED
|
||||||
#include "stm32f0xx_hal_dma.h"
|
#include "stm32f0xx_hal_dma.h"
|
||||||
#endif /* HAL_DMA_MODULE_ENABLED */
|
#endif /* HAL_DMA_MODULE_ENABLED */
|
||||||
|
@ -301,15 +301,15 @@
|
||||||
#ifdef USE_FULL_ASSERT
|
#ifdef USE_FULL_ASSERT
|
||||||
/**
|
/**
|
||||||
* @brief The assert_param macro is used for function's parameters check.
|
* @brief The assert_param macro is used for function's parameters check.
|
||||||
* @param expr: If expr is false, it calls assert_failed function
|
* @param expr If expr is false, it calls assert_failed function
|
||||||
* which reports the name of the source file and the source
|
* which reports the name of the source file and the source
|
||||||
* line number of the call that failed.
|
* line number of the call that failed.
|
||||||
* If expr is true, it returns no value.
|
* If expr is true, it returns no value.
|
||||||
* @retval None
|
* @retval None
|
||||||
*/
|
*/
|
||||||
#define assert_param(expr) ((expr) ? (void)0U : assert_failed((char *)__FILE__, __LINE__))
|
#define assert_param(expr) ((expr) ? (void)0U : assert_failed((uint8_t *)__FILE__, __LINE__))
|
||||||
/* Exported functions ------------------------------------------------------- */
|
/* Exported functions ------------------------------------------------------- */
|
||||||
void assert_failed(char* file, uint32_t line);
|
void assert_failed(uint8_t* file, uint32_t line);
|
||||||
#else
|
#else
|
||||||
#define assert_param(expr) ((void)0U)
|
#define assert_param(expr) ((void)0U)
|
||||||
#endif /* USE_FULL_ASSERT */
|
#endif /* USE_FULL_ASSERT */
|
||||||
|
@ -320,4 +320,3 @@
|
||||||
|
|
||||||
#endif /* __STM32F0xx_HAL_CONF_H */
|
#endif /* __STM32F0xx_HAL_CONF_H */
|
||||||
|
|
||||||
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
|
|
||||||
|
|
|
@ -76,5 +76,3 @@ void SysTick_Handler(void);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* __STM32F0xx_IT_H */
|
#endif /* __STM32F0xx_IT_H */
|
||||||
|
|
||||||
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
|
|
||||||
|
|
|
@ -37,7 +37,6 @@
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
*/
|
*/
|
||||||
/* USER CODE END Header */
|
/* USER CODE END Header */
|
||||||
|
|
||||||
/* Includes ------------------------------------------------------------------*/
|
/* Includes ------------------------------------------------------------------*/
|
||||||
#include "main.h"
|
#include "main.h"
|
||||||
|
|
||||||
|
@ -62,10 +61,12 @@
|
||||||
/* USER CODE END PM */
|
/* USER CODE END PM */
|
||||||
|
|
||||||
/* Private variables ---------------------------------------------------------*/
|
/* Private variables ---------------------------------------------------------*/
|
||||||
ADC_HandleTypeDef hadc;
|
ADC_HandleTypeDef hadc;
|
||||||
|
|
||||||
TIM_HandleTypeDef htim2;
|
TIM_HandleTypeDef htim2;
|
||||||
TIM_HandleTypeDef htim3;
|
TIM_HandleTypeDef htim3;
|
||||||
|
TIM_HandleTypeDef htim16;
|
||||||
|
TIM_HandleTypeDef htim17;
|
||||||
|
|
||||||
UART_HandleTypeDef huart2;
|
UART_HandleTypeDef huart2;
|
||||||
|
|
||||||
|
@ -81,6 +82,8 @@ static void MX_USART2_UART_Init(void);
|
||||||
static void MX_ADC_Init(void);
|
static void MX_ADC_Init(void);
|
||||||
static void MX_TIM2_Init(void);
|
static void MX_TIM2_Init(void);
|
||||||
static void MX_TIM3_Init(void);
|
static void MX_TIM3_Init(void);
|
||||||
|
static void MX_TIM16_Init(void);
|
||||||
|
static void MX_TIM17_Init(void);
|
||||||
/* USER CODE BEGIN PFP */
|
/* USER CODE BEGIN PFP */
|
||||||
/* Private function prototypes -----------------------------------------------*/
|
/* Private function prototypes -----------------------------------------------*/
|
||||||
|
|
||||||
|
@ -123,6 +126,8 @@ int main(void)
|
||||||
MX_ADC_Init();
|
MX_ADC_Init();
|
||||||
MX_TIM2_Init();
|
MX_TIM2_Init();
|
||||||
MX_TIM3_Init();
|
MX_TIM3_Init();
|
||||||
|
MX_TIM16_Init();
|
||||||
|
MX_TIM17_Init();
|
||||||
/* USER CODE BEGIN 2 */
|
/* USER CODE BEGIN 2 */
|
||||||
|
|
||||||
/* USER CODE END 2 */
|
/* USER CODE END 2 */
|
||||||
|
@ -148,7 +153,8 @@ void SystemClock_Config(void)
|
||||||
RCC_ClkInitTypeDef RCC_ClkInitStruct = {0};
|
RCC_ClkInitTypeDef RCC_ClkInitStruct = {0};
|
||||||
RCC_PeriphCLKInitTypeDef PeriphClkInit = {0};
|
RCC_PeriphCLKInitTypeDef PeriphClkInit = {0};
|
||||||
|
|
||||||
/** Initializes the CPU, AHB and APB busses clocks
|
/** Initializes the RCC Oscillators according to the specified parameters
|
||||||
|
* in the RCC_OscInitTypeDef structure.
|
||||||
*/
|
*/
|
||||||
RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI14|RCC_OSCILLATORTYPE_HSI48;
|
RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI14|RCC_OSCILLATORTYPE_HSI48;
|
||||||
RCC_OscInitStruct.HSI48State = RCC_HSI48_ON;
|
RCC_OscInitStruct.HSI48State = RCC_HSI48_ON;
|
||||||
|
@ -159,7 +165,8 @@ void SystemClock_Config(void)
|
||||||
{
|
{
|
||||||
Error_Handler();
|
Error_Handler();
|
||||||
}
|
}
|
||||||
/** Initializes the CPU, AHB and APB busses clocks
|
|
||||||
|
/** Initializes the CPU, AHB and APB buses clocks
|
||||||
*/
|
*/
|
||||||
RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK|RCC_CLOCKTYPE_SYSCLK
|
RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK|RCC_CLOCKTYPE_SYSCLK
|
||||||
|RCC_CLOCKTYPE_PCLK1;
|
|RCC_CLOCKTYPE_PCLK1;
|
||||||
|
@ -196,6 +203,7 @@ static void MX_ADC_Init(void)
|
||||||
/* USER CODE BEGIN ADC_Init 1 */
|
/* USER CODE BEGIN ADC_Init 1 */
|
||||||
|
|
||||||
/* USER CODE END ADC_Init 1 */
|
/* USER CODE END ADC_Init 1 */
|
||||||
|
|
||||||
/** Configure the global features of the ADC (Clock, Resolution, Data Alignment and number of conversion)
|
/** Configure the global features of the ADC (Clock, Resolution, Data Alignment and number of conversion)
|
||||||
*/
|
*/
|
||||||
hadc.Instance = ADC1;
|
hadc.Instance = ADC1;
|
||||||
|
@ -216,6 +224,7 @@ static void MX_ADC_Init(void)
|
||||||
{
|
{
|
||||||
Error_Handler();
|
Error_Handler();
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Configure for the selected ADC regular channel to be converted.
|
/** Configure for the selected ADC regular channel to be converted.
|
||||||
*/
|
*/
|
||||||
sConfig.Channel = ADC_CHANNEL_0;
|
sConfig.Channel = ADC_CHANNEL_0;
|
||||||
|
@ -225,6 +234,7 @@ static void MX_ADC_Init(void)
|
||||||
{
|
{
|
||||||
Error_Handler();
|
Error_Handler();
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Configure for the selected ADC regular channel to be converted.
|
/** Configure for the selected ADC regular channel to be converted.
|
||||||
*/
|
*/
|
||||||
sConfig.Channel = ADC_CHANNEL_1;
|
sConfig.Channel = ADC_CHANNEL_1;
|
||||||
|
@ -232,6 +242,7 @@ static void MX_ADC_Init(void)
|
||||||
{
|
{
|
||||||
Error_Handler();
|
Error_Handler();
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Configure for the selected ADC regular channel to be converted.
|
/** Configure for the selected ADC regular channel to be converted.
|
||||||
*/
|
*/
|
||||||
sConfig.Channel = ADC_CHANNEL_4;
|
sConfig.Channel = ADC_CHANNEL_4;
|
||||||
|
@ -239,6 +250,7 @@ static void MX_ADC_Init(void)
|
||||||
{
|
{
|
||||||
Error_Handler();
|
Error_Handler();
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Configure for the selected ADC regular channel to be converted.
|
/** Configure for the selected ADC regular channel to be converted.
|
||||||
*/
|
*/
|
||||||
sConfig.Channel = ADC_CHANNEL_8;
|
sConfig.Channel = ADC_CHANNEL_8;
|
||||||
|
@ -246,6 +258,7 @@ static void MX_ADC_Init(void)
|
||||||
{
|
{
|
||||||
Error_Handler();
|
Error_Handler();
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Configure for the selected ADC regular channel to be converted.
|
/** Configure for the selected ADC regular channel to be converted.
|
||||||
*/
|
*/
|
||||||
sConfig.Channel = ADC_CHANNEL_10;
|
sConfig.Channel = ADC_CHANNEL_10;
|
||||||
|
@ -253,6 +266,7 @@ static void MX_ADC_Init(void)
|
||||||
{
|
{
|
||||||
Error_Handler();
|
Error_Handler();
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Configure for the selected ADC regular channel to be converted.
|
/** Configure for the selected ADC regular channel to be converted.
|
||||||
*/
|
*/
|
||||||
sConfig.Channel = ADC_CHANNEL_11;
|
sConfig.Channel = ADC_CHANNEL_11;
|
||||||
|
@ -288,7 +302,7 @@ static void MX_TIM2_Init(void)
|
||||||
htim2.Instance = TIM2;
|
htim2.Instance = TIM2;
|
||||||
htim2.Init.Prescaler = 0;
|
htim2.Init.Prescaler = 0;
|
||||||
htim2.Init.CounterMode = TIM_COUNTERMODE_UP;
|
htim2.Init.CounterMode = TIM_COUNTERMODE_UP;
|
||||||
htim2.Init.Period = 0;
|
htim2.Init.Period = 4294967295;
|
||||||
htim2.Init.ClockDivision = TIM_CLOCKDIVISION_DIV1;
|
htim2.Init.ClockDivision = TIM_CLOCKDIVISION_DIV1;
|
||||||
htim2.Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_DISABLE;
|
htim2.Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_DISABLE;
|
||||||
if (HAL_TIM_Base_Init(&htim2) != HAL_OK)
|
if (HAL_TIM_Base_Init(&htim2) != HAL_OK)
|
||||||
|
@ -351,7 +365,7 @@ static void MX_TIM3_Init(void)
|
||||||
htim3.Instance = TIM3;
|
htim3.Instance = TIM3;
|
||||||
htim3.Init.Prescaler = 0;
|
htim3.Init.Prescaler = 0;
|
||||||
htim3.Init.CounterMode = TIM_COUNTERMODE_UP;
|
htim3.Init.CounterMode = TIM_COUNTERMODE_UP;
|
||||||
htim3.Init.Period = 0;
|
htim3.Init.Period = 65535;
|
||||||
htim3.Init.ClockDivision = TIM_CLOCKDIVISION_DIV1;
|
htim3.Init.ClockDivision = TIM_CLOCKDIVISION_DIV1;
|
||||||
htim3.Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_DISABLE;
|
htim3.Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_DISABLE;
|
||||||
if (HAL_TIM_Base_Init(&htim3) != HAL_OK)
|
if (HAL_TIM_Base_Init(&htim3) != HAL_OK)
|
||||||
|
@ -392,6 +406,130 @@ static void MX_TIM3_Init(void)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief TIM16 Initialization Function
|
||||||
|
* @param None
|
||||||
|
* @retval None
|
||||||
|
*/
|
||||||
|
static void MX_TIM16_Init(void)
|
||||||
|
{
|
||||||
|
|
||||||
|
/* USER CODE BEGIN TIM16_Init 0 */
|
||||||
|
|
||||||
|
/* USER CODE END TIM16_Init 0 */
|
||||||
|
|
||||||
|
TIM_OC_InitTypeDef sConfigOC = {0};
|
||||||
|
TIM_BreakDeadTimeConfigTypeDef sBreakDeadTimeConfig = {0};
|
||||||
|
|
||||||
|
/* USER CODE BEGIN TIM16_Init 1 */
|
||||||
|
|
||||||
|
/* USER CODE END TIM16_Init 1 */
|
||||||
|
htim16.Instance = TIM16;
|
||||||
|
htim16.Init.Prescaler = 0;
|
||||||
|
htim16.Init.CounterMode = TIM_COUNTERMODE_UP;
|
||||||
|
htim16.Init.Period = 65535;
|
||||||
|
htim16.Init.ClockDivision = TIM_CLOCKDIVISION_DIV1;
|
||||||
|
htim16.Init.RepetitionCounter = 0;
|
||||||
|
htim16.Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_DISABLE;
|
||||||
|
if (HAL_TIM_Base_Init(&htim16) != HAL_OK)
|
||||||
|
{
|
||||||
|
Error_Handler();
|
||||||
|
}
|
||||||
|
if (HAL_TIM_PWM_Init(&htim16) != HAL_OK)
|
||||||
|
{
|
||||||
|
Error_Handler();
|
||||||
|
}
|
||||||
|
sConfigOC.OCMode = TIM_OCMODE_PWM1;
|
||||||
|
sConfigOC.Pulse = 0;
|
||||||
|
sConfigOC.OCPolarity = TIM_OCPOLARITY_HIGH;
|
||||||
|
sConfigOC.OCNPolarity = TIM_OCNPOLARITY_HIGH;
|
||||||
|
sConfigOC.OCFastMode = TIM_OCFAST_DISABLE;
|
||||||
|
sConfigOC.OCIdleState = TIM_OCIDLESTATE_RESET;
|
||||||
|
sConfigOC.OCNIdleState = TIM_OCNIDLESTATE_RESET;
|
||||||
|
if (HAL_TIM_PWM_ConfigChannel(&htim16, &sConfigOC, TIM_CHANNEL_1) != HAL_OK)
|
||||||
|
{
|
||||||
|
Error_Handler();
|
||||||
|
}
|
||||||
|
sBreakDeadTimeConfig.OffStateRunMode = TIM_OSSR_DISABLE;
|
||||||
|
sBreakDeadTimeConfig.OffStateIDLEMode = TIM_OSSI_DISABLE;
|
||||||
|
sBreakDeadTimeConfig.LockLevel = TIM_LOCKLEVEL_OFF;
|
||||||
|
sBreakDeadTimeConfig.DeadTime = 0;
|
||||||
|
sBreakDeadTimeConfig.BreakState = TIM_BREAK_DISABLE;
|
||||||
|
sBreakDeadTimeConfig.BreakPolarity = TIM_BREAKPOLARITY_HIGH;
|
||||||
|
sBreakDeadTimeConfig.AutomaticOutput = TIM_AUTOMATICOUTPUT_DISABLE;
|
||||||
|
if (HAL_TIMEx_ConfigBreakDeadTime(&htim16, &sBreakDeadTimeConfig) != HAL_OK)
|
||||||
|
{
|
||||||
|
Error_Handler();
|
||||||
|
}
|
||||||
|
/* USER CODE BEGIN TIM16_Init 2 */
|
||||||
|
|
||||||
|
/* USER CODE END TIM16_Init 2 */
|
||||||
|
HAL_TIM_MspPostInit(&htim16);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief TIM17 Initialization Function
|
||||||
|
* @param None
|
||||||
|
* @retval None
|
||||||
|
*/
|
||||||
|
static void MX_TIM17_Init(void)
|
||||||
|
{
|
||||||
|
|
||||||
|
/* USER CODE BEGIN TIM17_Init 0 */
|
||||||
|
|
||||||
|
/* USER CODE END TIM17_Init 0 */
|
||||||
|
|
||||||
|
TIM_OC_InitTypeDef sConfigOC = {0};
|
||||||
|
TIM_BreakDeadTimeConfigTypeDef sBreakDeadTimeConfig = {0};
|
||||||
|
|
||||||
|
/* USER CODE BEGIN TIM17_Init 1 */
|
||||||
|
|
||||||
|
/* USER CODE END TIM17_Init 1 */
|
||||||
|
htim17.Instance = TIM17;
|
||||||
|
htim17.Init.Prescaler = 0;
|
||||||
|
htim17.Init.CounterMode = TIM_COUNTERMODE_UP;
|
||||||
|
htim17.Init.Period = 65535;
|
||||||
|
htim17.Init.ClockDivision = TIM_CLOCKDIVISION_DIV1;
|
||||||
|
htim17.Init.RepetitionCounter = 0;
|
||||||
|
htim17.Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_DISABLE;
|
||||||
|
if (HAL_TIM_Base_Init(&htim17) != HAL_OK)
|
||||||
|
{
|
||||||
|
Error_Handler();
|
||||||
|
}
|
||||||
|
if (HAL_TIM_OC_Init(&htim17) != HAL_OK)
|
||||||
|
{
|
||||||
|
Error_Handler();
|
||||||
|
}
|
||||||
|
sConfigOC.OCMode = TIM_OCMODE_TIMING;
|
||||||
|
sConfigOC.Pulse = 0;
|
||||||
|
sConfigOC.OCPolarity = TIM_OCPOLARITY_HIGH;
|
||||||
|
sConfigOC.OCNPolarity = TIM_OCNPOLARITY_HIGH;
|
||||||
|
sConfigOC.OCFastMode = TIM_OCFAST_DISABLE;
|
||||||
|
sConfigOC.OCIdleState = TIM_OCIDLESTATE_RESET;
|
||||||
|
sConfigOC.OCNIdleState = TIM_OCNIDLESTATE_RESET;
|
||||||
|
if (HAL_TIM_OC_ConfigChannel(&htim17, &sConfigOC, TIM_CHANNEL_1) != HAL_OK)
|
||||||
|
{
|
||||||
|
Error_Handler();
|
||||||
|
}
|
||||||
|
sBreakDeadTimeConfig.OffStateRunMode = TIM_OSSR_DISABLE;
|
||||||
|
sBreakDeadTimeConfig.OffStateIDLEMode = TIM_OSSI_DISABLE;
|
||||||
|
sBreakDeadTimeConfig.LockLevel = TIM_LOCKLEVEL_OFF;
|
||||||
|
sBreakDeadTimeConfig.DeadTime = 0;
|
||||||
|
sBreakDeadTimeConfig.BreakState = TIM_BREAK_DISABLE;
|
||||||
|
sBreakDeadTimeConfig.BreakPolarity = TIM_BREAKPOLARITY_HIGH;
|
||||||
|
sBreakDeadTimeConfig.AutomaticOutput = TIM_AUTOMATICOUTPUT_DISABLE;
|
||||||
|
if (HAL_TIMEx_ConfigBreakDeadTime(&htim17, &sBreakDeadTimeConfig) != HAL_OK)
|
||||||
|
{
|
||||||
|
Error_Handler();
|
||||||
|
}
|
||||||
|
/* USER CODE BEGIN TIM17_Init 2 */
|
||||||
|
|
||||||
|
/* USER CODE END TIM17_Init 2 */
|
||||||
|
HAL_TIM_MspPostInit(&htim17);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief USART2 Initialization Function
|
* @brief USART2 Initialization Function
|
||||||
* @param None
|
* @param None
|
||||||
|
@ -486,7 +624,7 @@ void Error_Handler(void)
|
||||||
* @param line: assert_param error line source number
|
* @param line: assert_param error line source number
|
||||||
* @retval None
|
* @retval None
|
||||||
*/
|
*/
|
||||||
void assert_failed(char *file, uint32_t line)
|
void assert_failed(uint8_t *file, uint32_t line)
|
||||||
{
|
{
|
||||||
/* USER CODE BEGIN 6 */
|
/* USER CODE BEGIN 6 */
|
||||||
/* User can add his own implementation to report the file name and line number,
|
/* User can add his own implementation to report the file name and line number,
|
||||||
|
@ -494,5 +632,3 @@ void assert_failed(char *file, uint32_t line)
|
||||||
/* USER CODE END 6 */
|
/* USER CODE END 6 */
|
||||||
}
|
}
|
||||||
#endif /* USE_FULL_ASSERT */
|
#endif /* USE_FULL_ASSERT */
|
||||||
|
|
||||||
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
|
|
||||||
|
|
|
@ -216,6 +216,28 @@ void HAL_TIM_Base_MspInit(TIM_HandleTypeDef* htim_base)
|
||||||
|
|
||||||
/* USER CODE END TIM3_MspInit 1 */
|
/* USER CODE END TIM3_MspInit 1 */
|
||||||
}
|
}
|
||||||
|
else if(htim_base->Instance==TIM16)
|
||||||
|
{
|
||||||
|
/* USER CODE BEGIN TIM16_MspInit 0 */
|
||||||
|
|
||||||
|
/* USER CODE END TIM16_MspInit 0 */
|
||||||
|
/* Peripheral clock enable */
|
||||||
|
__HAL_RCC_TIM16_CLK_ENABLE();
|
||||||
|
/* USER CODE BEGIN TIM16_MspInit 1 */
|
||||||
|
|
||||||
|
/* USER CODE END TIM16_MspInit 1 */
|
||||||
|
}
|
||||||
|
else if(htim_base->Instance==TIM17)
|
||||||
|
{
|
||||||
|
/* USER CODE BEGIN TIM17_MspInit 0 */
|
||||||
|
|
||||||
|
/* USER CODE END TIM17_MspInit 0 */
|
||||||
|
/* Peripheral clock enable */
|
||||||
|
__HAL_RCC_TIM17_CLK_ENABLE();
|
||||||
|
/* USER CODE BEGIN TIM17_MspInit 1 */
|
||||||
|
|
||||||
|
/* USER CODE END TIM17_MspInit 1 */
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -273,6 +295,48 @@ void HAL_TIM_MspPostInit(TIM_HandleTypeDef* htim)
|
||||||
|
|
||||||
/* USER CODE END TIM3_MspPostInit 1 */
|
/* USER CODE END TIM3_MspPostInit 1 */
|
||||||
}
|
}
|
||||||
|
else if(htim->Instance==TIM16)
|
||||||
|
{
|
||||||
|
/* USER CODE BEGIN TIM16_MspPostInit 0 */
|
||||||
|
|
||||||
|
/* USER CODE END TIM16_MspPostInit 0 */
|
||||||
|
|
||||||
|
__HAL_RCC_GPIOB_CLK_ENABLE();
|
||||||
|
/**TIM16 GPIO Configuration
|
||||||
|
PB6 ------> TIM16_CH1N
|
||||||
|
*/
|
||||||
|
GPIO_InitStruct.Pin = GPIO_PIN_6;
|
||||||
|
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
|
||||||
|
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
||||||
|
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
|
||||||
|
GPIO_InitStruct.Alternate = GPIO_AF2_TIM16;
|
||||||
|
HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
|
||||||
|
|
||||||
|
/* USER CODE BEGIN TIM16_MspPostInit 1 */
|
||||||
|
|
||||||
|
/* USER CODE END TIM16_MspPostInit 1 */
|
||||||
|
}
|
||||||
|
else if(htim->Instance==TIM17)
|
||||||
|
{
|
||||||
|
/* USER CODE BEGIN TIM17_MspPostInit 0 */
|
||||||
|
|
||||||
|
/* USER CODE END TIM17_MspPostInit 0 */
|
||||||
|
|
||||||
|
__HAL_RCC_GPIOA_CLK_ENABLE();
|
||||||
|
/**TIM17 GPIO Configuration
|
||||||
|
PA7 ------> TIM17_CH1
|
||||||
|
*/
|
||||||
|
GPIO_InitStruct.Pin = GPIO_PIN_7;
|
||||||
|
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
|
||||||
|
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
||||||
|
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
|
||||||
|
GPIO_InitStruct.Alternate = GPIO_AF5_TIM17;
|
||||||
|
HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
|
||||||
|
|
||||||
|
/* USER CODE BEGIN TIM17_MspPostInit 1 */
|
||||||
|
|
||||||
|
/* USER CODE END TIM17_MspPostInit 1 */
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
|
@ -305,6 +369,28 @@ void HAL_TIM_Base_MspDeInit(TIM_HandleTypeDef* htim_base)
|
||||||
|
|
||||||
/* USER CODE END TIM3_MspDeInit 1 */
|
/* USER CODE END TIM3_MspDeInit 1 */
|
||||||
}
|
}
|
||||||
|
else if(htim_base->Instance==TIM16)
|
||||||
|
{
|
||||||
|
/* USER CODE BEGIN TIM16_MspDeInit 0 */
|
||||||
|
|
||||||
|
/* USER CODE END TIM16_MspDeInit 0 */
|
||||||
|
/* Peripheral clock disable */
|
||||||
|
__HAL_RCC_TIM16_CLK_DISABLE();
|
||||||
|
/* USER CODE BEGIN TIM16_MspDeInit 1 */
|
||||||
|
|
||||||
|
/* USER CODE END TIM16_MspDeInit 1 */
|
||||||
|
}
|
||||||
|
else if(htim_base->Instance==TIM17)
|
||||||
|
{
|
||||||
|
/* USER CODE BEGIN TIM17_MspDeInit 0 */
|
||||||
|
|
||||||
|
/* USER CODE END TIM17_MspDeInit 0 */
|
||||||
|
/* Peripheral clock disable */
|
||||||
|
__HAL_RCC_TIM17_CLK_DISABLE();
|
||||||
|
/* USER CODE BEGIN TIM17_MspDeInit 1 */
|
||||||
|
|
||||||
|
/* USER CODE END TIM17_MspDeInit 1 */
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -376,5 +462,3 @@ void HAL_UART_MspDeInit(UART_HandleTypeDef* huart)
|
||||||
/* USER CODE BEGIN 1 */
|
/* USER CODE BEGIN 1 */
|
||||||
|
|
||||||
/* USER CODE END 1 */
|
/* USER CODE END 1 */
|
||||||
|
|
||||||
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
|
|
||||||
|
|
|
@ -157,4 +157,3 @@ void SysTick_Handler(void)
|
||||||
/* USER CODE BEGIN 1 */
|
/* USER CODE BEGIN 1 */
|
||||||
|
|
||||||
/* USER CODE END 1 */
|
/* USER CODE END 1 */
|
||||||
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
|
|
||||||
|
|
|
@ -17,6 +17,7 @@ menu "Onboard Peripheral Drivers"
|
||||||
config BSP_USING_ARDUINO
|
config BSP_USING_ARDUINO
|
||||||
bool "Support Arduino"
|
bool "Support Arduino"
|
||||||
select RT_USING_ARDUINO
|
select RT_USING_ARDUINO
|
||||||
|
select ARDUINO_USING_SERVO
|
||||||
select RT_USING_PIN
|
select RT_USING_PIN
|
||||||
select BSP_USING_ADC
|
select BSP_USING_ADC
|
||||||
select BSP_USING_ADC1
|
select BSP_USING_ADC1
|
||||||
|
@ -27,7 +28,10 @@ menu "Onboard Peripheral Drivers"
|
||||||
select BSP_USING_PWM3
|
select BSP_USING_PWM3
|
||||||
select BSP_USING_PWM3_CH1
|
select BSP_USING_PWM3_CH1
|
||||||
select BSP_USING_PWM3_CH2
|
select BSP_USING_PWM3_CH2
|
||||||
select BSP_USING_I2C
|
select BSP_USING_PWM16
|
||||||
|
select BSP_USING_PWM16_CH1
|
||||||
|
select BSP_USING_PWM17
|
||||||
|
select BSP_USING_PWM17_CH1
|
||||||
default n
|
default n
|
||||||
|
|
||||||
endmenu
|
endmenu
|
||||||
|
@ -74,13 +78,13 @@ menu "On-chip Peripheral Drivers"
|
||||||
endif
|
endif
|
||||||
|
|
||||||
menuconfig BSP_USING_PWM
|
menuconfig BSP_USING_PWM
|
||||||
bool "Enable pwm"
|
bool "Enable PWM"
|
||||||
default n
|
default n
|
||||||
select RT_USING_PWM
|
select RT_USING_PWM
|
||||||
|
|
||||||
if BSP_USING_PWM
|
if BSP_USING_PWM
|
||||||
menuconfig BSP_USING_PWM2
|
menuconfig BSP_USING_PWM2
|
||||||
bool "Enable timer2 output pwm"
|
bool "Enable timer2 output PWM"
|
||||||
default n
|
default n
|
||||||
if BSP_USING_PWM2
|
if BSP_USING_PWM2
|
||||||
config BSP_USING_PWM2_CH2
|
config BSP_USING_PWM2_CH2
|
||||||
|
@ -93,7 +97,7 @@ menu "On-chip Peripheral Drivers"
|
||||||
endif
|
endif
|
||||||
|
|
||||||
menuconfig BSP_USING_PWM3
|
menuconfig BSP_USING_PWM3
|
||||||
bool "Enable timer3 output pwm"
|
bool "Enable timer3 output PWM"
|
||||||
default n
|
default n
|
||||||
if BSP_USING_PWM3
|
if BSP_USING_PWM3
|
||||||
config BSP_USING_PWM3_CH1
|
config BSP_USING_PWM3_CH1
|
||||||
|
@ -104,6 +108,24 @@ menu "On-chip Peripheral Drivers"
|
||||||
bool "Enable PWM3 channel2"
|
bool "Enable PWM3 channel2"
|
||||||
default n
|
default n
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
menuconfig BSP_USING_PWM16
|
||||||
|
bool "Enable timer16 output PWM"
|
||||||
|
default n
|
||||||
|
if BSP_USING_PWM16
|
||||||
|
config BSP_USING_PWM16_CH1
|
||||||
|
bool "Enable PWM16 channel1"
|
||||||
|
default n
|
||||||
|
endif
|
||||||
|
|
||||||
|
menuconfig BSP_USING_PWM17
|
||||||
|
bool "Enable timer17 output PWM"
|
||||||
|
default n
|
||||||
|
if BSP_USING_PWM17
|
||||||
|
config BSP_USING_PWM17_CH1
|
||||||
|
bool "Enable PWM17 channel1"
|
||||||
|
default n
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
menuconfig BSP_USING_I2C
|
menuconfig BSP_USING_I2C
|
||||||
|
|
|
@ -107,12 +107,12 @@ menu "On-chip Peripheral Drivers"
|
||||||
endif
|
endif
|
||||||
|
|
||||||
menuconfig BSP_USING_PWM
|
menuconfig BSP_USING_PWM
|
||||||
bool "Enable pwm"
|
bool "Enable PWM"
|
||||||
default n
|
default n
|
||||||
select RT_USING_PWM
|
select RT_USING_PWM
|
||||||
if BSP_USING_PWM
|
if BSP_USING_PWM
|
||||||
menuconfig BSP_USING_PWM2
|
menuconfig BSP_USING_PWM2
|
||||||
bool "Enable timer2 output pwm"
|
bool "Enable timer2 output PWM"
|
||||||
default n
|
default n
|
||||||
if BSP_USING_PWM2
|
if BSP_USING_PWM2
|
||||||
config BSP_USING_PWM2_CH4
|
config BSP_USING_PWM2_CH4
|
||||||
|
|
|
@ -95,12 +95,12 @@ menu "On-chip Peripheral Drivers"
|
||||||
endif
|
endif
|
||||||
|
|
||||||
menuconfig BSP_USING_PWM
|
menuconfig BSP_USING_PWM
|
||||||
bool "Enable pwm"
|
bool "Enable PWM"
|
||||||
default n
|
default n
|
||||||
select RT_USING_PWM
|
select RT_USING_PWM
|
||||||
if BSP_USING_PWM
|
if BSP_USING_PWM
|
||||||
menuconfig BSP_USING_PWM3
|
menuconfig BSP_USING_PWM3
|
||||||
bool "Enable timer3 output pwm"
|
bool "Enable timer3 output PWM"
|
||||||
default n
|
default n
|
||||||
if BSP_USING_PWM3
|
if BSP_USING_PWM3
|
||||||
config BSP_USING_PWM3_CH1
|
config BSP_USING_PWM3_CH1
|
||||||
|
|
|
@ -108,12 +108,12 @@ menu "On-chip Peripheral Drivers"
|
||||||
endif
|
endif
|
||||||
|
|
||||||
menuconfig BSP_USING_PWM
|
menuconfig BSP_USING_PWM
|
||||||
bool "Enable pwm"
|
bool "Enable PWM"
|
||||||
default n
|
default n
|
||||||
select RT_USING_PWM
|
select RT_USING_PWM
|
||||||
if BSP_USING_PWM
|
if BSP_USING_PWM
|
||||||
menuconfig BSP_USING_PWM3
|
menuconfig BSP_USING_PWM3
|
||||||
bool "Enable timer3 output pwm"
|
bool "Enable timer3 output PWM"
|
||||||
default n
|
default n
|
||||||
if BSP_USING_PWM3
|
if BSP_USING_PWM3
|
||||||
config BSP_USING_PWM3_CH1
|
config BSP_USING_PWM3_CH1
|
||||||
|
|
|
@ -220,12 +220,12 @@ menu "On-chip Peripheral Drivers"
|
||||||
endif
|
endif
|
||||||
|
|
||||||
menuconfig BSP_USING_PWM
|
menuconfig BSP_USING_PWM
|
||||||
bool "Enable pwm"
|
bool "Enable PWM"
|
||||||
default n
|
default n
|
||||||
select RT_USING_PWM
|
select RT_USING_PWM
|
||||||
if BSP_USING_PWM
|
if BSP_USING_PWM
|
||||||
menuconfig BSP_USING_PWM3
|
menuconfig BSP_USING_PWM3
|
||||||
bool "Enable timer3 output pwm"
|
bool "Enable timer3 output PWM"
|
||||||
default n
|
default n
|
||||||
if BSP_USING_PWM3
|
if BSP_USING_PWM3
|
||||||
config BSP_USING_PWM3_CH2
|
config BSP_USING_PWM3_CH2
|
||||||
|
|
|
@ -77,7 +77,7 @@ menu "On-chip Peripheral Drivers"
|
||||||
select RT_USING_PWM
|
select RT_USING_PWM
|
||||||
if BSP_USING_PWM
|
if BSP_USING_PWM
|
||||||
menuconfig BSP_USING_PWM2
|
menuconfig BSP_USING_PWM2
|
||||||
bool "Enable timer2 output pwm"
|
bool "Enable timer2 output PWM"
|
||||||
default n
|
default n
|
||||||
if BSP_USING_PWM2
|
if BSP_USING_PWM2
|
||||||
config BSP_USING_PWM2_CH1
|
config BSP_USING_PWM2_CH1
|
||||||
|
|
|
@ -135,12 +135,12 @@ menu "On-chip Peripheral Drivers"
|
||||||
endif
|
endif
|
||||||
|
|
||||||
menuconfig BSP_USING_PWM
|
menuconfig BSP_USING_PWM
|
||||||
bool "Enable pwm"
|
bool "Enable PWM"
|
||||||
default n
|
default n
|
||||||
select RT_USING_PWM
|
select RT_USING_PWM
|
||||||
if BSP_USING_PWM
|
if BSP_USING_PWM
|
||||||
menuconfig BSP_USING_PWM10
|
menuconfig BSP_USING_PWM10
|
||||||
bool "Enable timer10 output pwm"
|
bool "Enable timer10 output PWM"
|
||||||
default n
|
default n
|
||||||
if BSP_USING_PWM10
|
if BSP_USING_PWM10
|
||||||
config BSP_USING_PWM10_CH1
|
config BSP_USING_PWM10_CH1
|
||||||
|
|
|
@ -255,12 +255,12 @@ menu "On-chip Peripheral Drivers"
|
||||||
endif
|
endif
|
||||||
|
|
||||||
menuconfig BSP_USING_PWM
|
menuconfig BSP_USING_PWM
|
||||||
bool "Enable pwm"
|
bool "Enable PWM"
|
||||||
default n
|
default n
|
||||||
select RT_USING_PWM
|
select RT_USING_PWM
|
||||||
if BSP_USING_PWM
|
if BSP_USING_PWM
|
||||||
menuconfig BSP_USING_PWM2
|
menuconfig BSP_USING_PWM2
|
||||||
bool "Enable timer2 output pwm"
|
bool "Enable timer2 output PWM"
|
||||||
default n
|
default n
|
||||||
if BSP_USING_PWM2
|
if BSP_USING_PWM2
|
||||||
config BSP_USING_PWM2_CH4
|
config BSP_USING_PWM2_CH4
|
||||||
|
|
|
@ -82,12 +82,12 @@ menu "On-chip Peripheral Drivers"
|
||||||
endif
|
endif
|
||||||
|
|
||||||
menuconfig BSP_USING_PWM
|
menuconfig BSP_USING_PWM
|
||||||
bool "Enable pwm"
|
bool "Enable PWM"
|
||||||
default n
|
default n
|
||||||
select RT_USING_PWM
|
select RT_USING_PWM
|
||||||
if BSP_USING_PWM
|
if BSP_USING_PWM
|
||||||
menuconfig BSP_USING_PWM3
|
menuconfig BSP_USING_PWM3
|
||||||
bool "Enable timer3 output pwm"
|
bool "Enable timer3 output PWM"
|
||||||
default n
|
default n
|
||||||
if BSP_USING_PWM3
|
if BSP_USING_PWM3
|
||||||
config BSP_USING_PWM3_CH1
|
config BSP_USING_PWM3_CH1
|
||||||
|
|
|
@ -104,12 +104,12 @@ menu "On-chip Peripheral Drivers"
|
||||||
endif
|
endif
|
||||||
|
|
||||||
menuconfig BSP_USING_PWM
|
menuconfig BSP_USING_PWM
|
||||||
bool "Enable pwm"
|
bool "Enable PWM"
|
||||||
default n
|
default n
|
||||||
select RT_USING_PWM
|
select RT_USING_PWM
|
||||||
if BSP_USING_PWM
|
if BSP_USING_PWM
|
||||||
menuconfig BSP_USING_PWM2
|
menuconfig BSP_USING_PWM2
|
||||||
bool "Enable timer2 output pwm"
|
bool "Enable timer2 output PWM"
|
||||||
default n
|
default n
|
||||||
if BSP_USING_PWM2
|
if BSP_USING_PWM2
|
||||||
config BSP_USING_PWM2_CH4
|
config BSP_USING_PWM2_CH4
|
||||||
|
|
|
@ -89,12 +89,12 @@ menu "On-chip Peripheral Drivers"
|
||||||
default n
|
default n
|
||||||
|
|
||||||
menuconfig BSP_USING_PWM
|
menuconfig BSP_USING_PWM
|
||||||
bool "Enable pwm"
|
bool "Enable PWM"
|
||||||
default n
|
default n
|
||||||
select RT_USING_PWM
|
select RT_USING_PWM
|
||||||
if BSP_USING_PWM
|
if BSP_USING_PWM
|
||||||
menuconfig BSP_USING_PWM12
|
menuconfig BSP_USING_PWM12
|
||||||
bool "Enable timer12 output pwm"
|
bool "Enable timer12 output PWM"
|
||||||
default n
|
default n
|
||||||
if BSP_USING_PWM12
|
if BSP_USING_PWM12
|
||||||
config BSP_USING_PWM12_CH1
|
config BSP_USING_PWM12_CH1
|
||||||
|
@ -103,7 +103,7 @@ menu "On-chip Peripheral Drivers"
|
||||||
endif
|
endif
|
||||||
|
|
||||||
menuconfig BSP_USING_PWM4
|
menuconfig BSP_USING_PWM4
|
||||||
bool "Enable timer4 output pwm"
|
bool "Enable timer4 output PWM"
|
||||||
default n
|
default n
|
||||||
if BSP_USING_PWM4
|
if BSP_USING_PWM4
|
||||||
config BSP_USING_PWM4_CH1
|
config BSP_USING_PWM4_CH1
|
||||||
|
@ -121,7 +121,7 @@ menu "On-chip Peripheral Drivers"
|
||||||
endif
|
endif
|
||||||
|
|
||||||
menuconfig BSP_USING_PWM5
|
menuconfig BSP_USING_PWM5
|
||||||
bool "Enable timer5 output pwm"
|
bool "Enable timer5 output PWM"
|
||||||
default n
|
default n
|
||||||
if BSP_USING_PWM5
|
if BSP_USING_PWM5
|
||||||
config BSP_USING_PWM5_CH1
|
config BSP_USING_PWM5_CH1
|
||||||
|
|
|
@ -160,12 +160,12 @@ menu "On-chip Peripheral Drivers"
|
||||||
endif
|
endif
|
||||||
|
|
||||||
menuconfig BSP_USING_PWM
|
menuconfig BSP_USING_PWM
|
||||||
bool "Enable pwm"
|
bool "Enable PWM"
|
||||||
default n
|
default n
|
||||||
select RT_USING_PWM
|
select RT_USING_PWM
|
||||||
if BSP_USING_PWM
|
if BSP_USING_PWM
|
||||||
menuconfig BSP_USING_PWM2
|
menuconfig BSP_USING_PWM2
|
||||||
bool "Enable timer2 output pwm"
|
bool "Enable timer2 output PWM"
|
||||||
default n
|
default n
|
||||||
if BSP_USING_PWM2
|
if BSP_USING_PWM2
|
||||||
config BSP_USING_PWM2_CH1
|
config BSP_USING_PWM2_CH1
|
||||||
|
|
|
@ -223,12 +223,12 @@ menu "On-chip Peripheral Drivers"
|
||||||
endif
|
endif
|
||||||
|
|
||||||
menuconfig BSP_USING_PWM
|
menuconfig BSP_USING_PWM
|
||||||
bool "Enable pwm"
|
bool "Enable PWM"
|
||||||
default n
|
default n
|
||||||
select RT_USING_PWM
|
select RT_USING_PWM
|
||||||
if BSP_USING_PWM
|
if BSP_USING_PWM
|
||||||
menuconfig BSP_USING_PWM2
|
menuconfig BSP_USING_PWM2
|
||||||
bool "Enable timer2 output pwm"
|
bool "Enable timer2 output PWM"
|
||||||
default n
|
default n
|
||||||
if BSP_USING_PWM2
|
if BSP_USING_PWM2
|
||||||
config BSP_USING_PWM2_CH4
|
config BSP_USING_PWM2_CH4
|
||||||
|
|
|
@ -156,12 +156,12 @@ menu "On-chip Peripheral Drivers"
|
||||||
endif
|
endif
|
||||||
|
|
||||||
menuconfig BSP_USING_PWM
|
menuconfig BSP_USING_PWM
|
||||||
bool "Enable pwm"
|
bool "Enable PWM"
|
||||||
default n
|
default n
|
||||||
select RT_USING_PWM
|
select RT_USING_PWM
|
||||||
if BSP_USING_PWM
|
if BSP_USING_PWM
|
||||||
menuconfig BSP_USING_PWM5
|
menuconfig BSP_USING_PWM5
|
||||||
bool "Enable timer5 output pwm"
|
bool "Enable timer5 output PWM"
|
||||||
default n
|
default n
|
||||||
if BSP_USING_PWM5
|
if BSP_USING_PWM5
|
||||||
config BSP_USING_PWM5_CH1
|
config BSP_USING_PWM5_CH1
|
||||||
|
|
|
@ -158,12 +158,12 @@ menu "On-chip Peripheral Drivers"
|
||||||
endif
|
endif
|
||||||
|
|
||||||
menuconfig BSP_USING_PWM
|
menuconfig BSP_USING_PWM
|
||||||
bool "Enable pwm"
|
bool "Enable PWM"
|
||||||
default n
|
default n
|
||||||
select RT_USING_PWM
|
select RT_USING_PWM
|
||||||
if BSP_USING_PWM
|
if BSP_USING_PWM
|
||||||
menuconfig BSP_USING_PWM3
|
menuconfig BSP_USING_PWM3
|
||||||
bool "Enable timer3 output pwm"
|
bool "Enable timer3 output PWM"
|
||||||
default n
|
default n
|
||||||
if BSP_USING_PWM3
|
if BSP_USING_PWM3
|
||||||
config BSP_USING_PWM3_CH2
|
config BSP_USING_PWM3_CH2
|
||||||
|
|
|
@ -148,12 +148,12 @@ menu "On-chip Peripheral Drivers"
|
||||||
endif
|
endif
|
||||||
|
|
||||||
menuconfig BSP_USING_PWM
|
menuconfig BSP_USING_PWM
|
||||||
bool "Enable pwm"
|
bool "Enable PWM"
|
||||||
default n
|
default n
|
||||||
select RT_USING_PWM
|
select RT_USING_PWM
|
||||||
if BSP_USING_PWM
|
if BSP_USING_PWM
|
||||||
menuconfig BSP_USING_PWM3
|
menuconfig BSP_USING_PWM3
|
||||||
bool "Enable timer3 output pwm"
|
bool "Enable timer3 output PWM"
|
||||||
default n
|
default n
|
||||||
if BSP_USING_PWM3
|
if BSP_USING_PWM3
|
||||||
config BSP_USING_PWM3_CH3
|
config BSP_USING_PWM3_CH3
|
||||||
|
|
|
@ -72,12 +72,12 @@ menu "On-chip Peripheral Drivers"
|
||||||
endif
|
endif
|
||||||
|
|
||||||
menuconfig BSP_USING_PWM
|
menuconfig BSP_USING_PWM
|
||||||
bool "Enable pwm"
|
bool "Enable PWM"
|
||||||
default n
|
default n
|
||||||
select RT_USING_PWM
|
select RT_USING_PWM
|
||||||
if BSP_USING_PWM
|
if BSP_USING_PWM
|
||||||
menuconfig BSP_USING_PWM3
|
menuconfig BSP_USING_PWM3
|
||||||
bool "Enable timer3 output pwm"
|
bool "Enable timer3 output PWM"
|
||||||
default n
|
default n
|
||||||
if BSP_USING_PWM3
|
if BSP_USING_PWM3
|
||||||
config BSP_USING_PWM3_CH1
|
config BSP_USING_PWM3_CH1
|
||||||
|
|
|
@ -72,12 +72,12 @@ menu "On-chip Peripheral Drivers"
|
||||||
endif
|
endif
|
||||||
|
|
||||||
menuconfig BSP_USING_PWM
|
menuconfig BSP_USING_PWM
|
||||||
bool "Enable pwm"
|
bool "Enable PWM"
|
||||||
default n
|
default n
|
||||||
select RT_USING_PWM
|
select RT_USING_PWM
|
||||||
if BSP_USING_PWM
|
if BSP_USING_PWM
|
||||||
menuconfig BSP_USING_PWM3
|
menuconfig BSP_USING_PWM3
|
||||||
bool "Enable timer3 output pwm"
|
bool "Enable timer3 output PWM"
|
||||||
default n
|
default n
|
||||||
if BSP_USING_PWM3
|
if BSP_USING_PWM3
|
||||||
config BSP_USING_PWM3_CH1
|
config BSP_USING_PWM3_CH1
|
||||||
|
|
|
@ -90,12 +90,12 @@ menu "On-chip Peripheral Drivers"
|
||||||
endif
|
endif
|
||||||
|
|
||||||
menuconfig BSP_USING_PWM
|
menuconfig BSP_USING_PWM
|
||||||
bool "Enable pwm"
|
bool "Enable PWM"
|
||||||
default n
|
default n
|
||||||
select RT_USING_PWM
|
select RT_USING_PWM
|
||||||
if BSP_USING_PWM
|
if BSP_USING_PWM
|
||||||
menuconfig BSP_USING_PWM2
|
menuconfig BSP_USING_PWM2
|
||||||
bool "Enable timer2 output pwm"
|
bool "Enable timer2 output PWM"
|
||||||
default n
|
default n
|
||||||
if BSP_USING_PWM2
|
if BSP_USING_PWM2
|
||||||
config BSP_USING_PWM2_CH2
|
config BSP_USING_PWM2_CH2
|
||||||
|
|
|
@ -171,12 +171,12 @@ menu "On-chip Peripheral Drivers"
|
||||||
endif
|
endif
|
||||||
|
|
||||||
menuconfig BSP_USING_PWM
|
menuconfig BSP_USING_PWM
|
||||||
bool "Enable pwm"
|
bool "Enable PWM"
|
||||||
default n
|
default n
|
||||||
select RT_USING_PWM
|
select RT_USING_PWM
|
||||||
if BSP_USING_PWM
|
if BSP_USING_PWM
|
||||||
menuconfig BSP_USING_PWM3
|
menuconfig BSP_USING_PWM3
|
||||||
bool "Enable timer3 output pwm"
|
bool "Enable timer3 output PWM"
|
||||||
default n
|
default n
|
||||||
if BSP_USING_PWM3
|
if BSP_USING_PWM3
|
||||||
config BSP_USING_PWM3_CH2
|
config BSP_USING_PWM3_CH2
|
||||||
|
|
|
@ -22,6 +22,8 @@ menu "Onboard Peripheral Drivers"
|
||||||
config BSP_USING_ARDUINO
|
config BSP_USING_ARDUINO
|
||||||
bool "Support Arduino"
|
bool "Support Arduino"
|
||||||
select RT_USING_ARDUINO
|
select RT_USING_ARDUINO
|
||||||
|
select ARDUINO_USING_SERVO
|
||||||
|
select ARDUINO_USING_WIRE
|
||||||
select BSP_USING_PWM
|
select BSP_USING_PWM
|
||||||
select BSP_USING_PWM1
|
select BSP_USING_PWM1
|
||||||
select BSP_USING_PWM1_CH1
|
select BSP_USING_PWM1_CH1
|
||||||
|
|
|
@ -171,12 +171,12 @@ menu "On-chip Peripheral Drivers"
|
||||||
endif
|
endif
|
||||||
|
|
||||||
menuconfig BSP_USING_PWM
|
menuconfig BSP_USING_PWM
|
||||||
bool "Enable pwm"
|
bool "Enable PWM"
|
||||||
default n
|
default n
|
||||||
select RT_USING_PWM
|
select RT_USING_PWM
|
||||||
if BSP_USING_PWM
|
if BSP_USING_PWM
|
||||||
menuconfig BSP_USING_PWM3
|
menuconfig BSP_USING_PWM3
|
||||||
bool "Enable timer3 output pwm"
|
bool "Enable timer3 output PWM"
|
||||||
default n
|
default n
|
||||||
if BSP_USING_PWM3
|
if BSP_USING_PWM3
|
||||||
config BSP_USING_PWM3_CH2
|
config BSP_USING_PWM3_CH2
|
||||||
|
|
|
@ -169,12 +169,12 @@ menu "On-chip Peripheral Drivers"
|
||||||
endif
|
endif
|
||||||
|
|
||||||
menuconfig BSP_USING_PWM
|
menuconfig BSP_USING_PWM
|
||||||
bool "Enable pwm"
|
bool "Enable PWM"
|
||||||
default n
|
default n
|
||||||
select RT_USING_PWM
|
select RT_USING_PWM
|
||||||
if BSP_USING_PWM
|
if BSP_USING_PWM
|
||||||
menuconfig BSP_USING_PWM4
|
menuconfig BSP_USING_PWM4
|
||||||
bool "Enable timer4 output pwm"
|
bool "Enable timer4 output PWM"
|
||||||
default n
|
default n
|
||||||
if BSP_USING_PWM4
|
if BSP_USING_PWM4
|
||||||
config BSP_USING_PWM4_CH2
|
config BSP_USING_PWM4_CH2
|
||||||
|
|
|
@ -223,12 +223,12 @@ menu "On-chip Peripheral Drivers"
|
||||||
endif
|
endif
|
||||||
|
|
||||||
menuconfig BSP_USING_PWM
|
menuconfig BSP_USING_PWM
|
||||||
bool "Enable pwm"
|
bool "Enable PWM"
|
||||||
default n
|
default n
|
||||||
select RT_USING_PWM
|
select RT_USING_PWM
|
||||||
if BSP_USING_PWM
|
if BSP_USING_PWM
|
||||||
menuconfig BSP_USING_PWM4
|
menuconfig BSP_USING_PWM4
|
||||||
bool "Enable timer4 output pwm"
|
bool "Enable timer4 output PWM"
|
||||||
default n
|
default n
|
||||||
if BSP_USING_PWM4
|
if BSP_USING_PWM4
|
||||||
config BSP_USING_PWM4_CH2
|
config BSP_USING_PWM4_CH2
|
||||||
|
|
|
@ -188,7 +188,7 @@ menu "On-chip Peripheral Drivers"
|
||||||
select RT_USING_PWM
|
select RT_USING_PWM
|
||||||
if BSP_USING_PWM
|
if BSP_USING_PWM
|
||||||
menuconfig BSP_USING_PWM1
|
menuconfig BSP_USING_PWM1
|
||||||
bool "Enable timer1 output pwm"
|
bool "Enable timer1 output PWM"
|
||||||
default n
|
default n
|
||||||
if BSP_USING_PWM1
|
if BSP_USING_PWM1
|
||||||
config BSP_USING_PWM1_CH1
|
config BSP_USING_PWM1_CH1
|
||||||
|
@ -209,7 +209,7 @@ menu "On-chip Peripheral Drivers"
|
||||||
endif
|
endif
|
||||||
|
|
||||||
menuconfig BSP_USING_PWM2
|
menuconfig BSP_USING_PWM2
|
||||||
bool "Enable timer2 output pwm"
|
bool "Enable timer2 output PWM"
|
||||||
default n
|
default n
|
||||||
if BSP_USING_PWM2
|
if BSP_USING_PWM2
|
||||||
config BSP_USING_PWM2_CH1
|
config BSP_USING_PWM2_CH1
|
||||||
|
|
|
@ -228,7 +228,7 @@ menu "On-chip Peripheral Drivers"
|
||||||
endif
|
endif
|
||||||
|
|
||||||
menuconfig BSP_USING_PWM
|
menuconfig BSP_USING_PWM
|
||||||
bool "Enable pwm"
|
bool "Enable PWM"
|
||||||
default n
|
default n
|
||||||
select RT_USING_PWM
|
select RT_USING_PWM
|
||||||
if BSP_USING_PWM
|
if BSP_USING_PWM
|
||||||
|
|
|
@ -133,43 +133,43 @@ menu "On-chip Peripheral Drivers"
|
||||||
|
|
||||||
if BSP_USING_PWM
|
if BSP_USING_PWM
|
||||||
config USING_PWM_CH1
|
config USING_PWM_CH1
|
||||||
bool "Enable pwm channel 1"
|
bool "Enable PWM channel 1"
|
||||||
default n
|
default n
|
||||||
if USING_PWM_CH1
|
if USING_PWM_CH1
|
||||||
config WM_PWM_CH1_PIN
|
config WM_PWM_CH1_PIN
|
||||||
int "wm pwm channel 1 pin number"
|
int "wm PWM channel 1 pin number"
|
||||||
default 23
|
default 23
|
||||||
endif
|
endif
|
||||||
config USING_PWM_CH2
|
config USING_PWM_CH2
|
||||||
bool "Enable pwm channel 2"
|
bool "Enable PWM channel 2"
|
||||||
default n
|
default n
|
||||||
if USING_PWM_CH2
|
if USING_PWM_CH2
|
||||||
config WM_PWM_CH2_PIN
|
config WM_PWM_CH2_PIN
|
||||||
int "wm pwm channel 2 pin number"
|
int "wm PWM channel 2 pin number"
|
||||||
default 22
|
default 22
|
||||||
endif
|
endif
|
||||||
config USING_PWM_CH3
|
config USING_PWM_CH3
|
||||||
bool "Enable pwm channel 3"
|
bool "Enable PWM channel 3"
|
||||||
default n
|
default n
|
||||||
if USING_PWM_CH3
|
if USING_PWM_CH3
|
||||||
config WM_PWM_CH3_PIN
|
config WM_PWM_CH3_PIN
|
||||||
int "wm pwm channel 3 pin number"
|
int "wm PWM channel 3 pin number"
|
||||||
default 21
|
default 21
|
||||||
endif
|
endif
|
||||||
config USING_PWM_CH4
|
config USING_PWM_CH4
|
||||||
bool "Enable pwm channel 4"
|
bool "Enable PWM channel 4"
|
||||||
default n
|
default n
|
||||||
if USING_PWM_CH4
|
if USING_PWM_CH4
|
||||||
config WM_PWM_CH4_PIN
|
config WM_PWM_CH4_PIN
|
||||||
int "wm pwm channel 4 pin number"
|
int "wm PWM channel 4 pin number"
|
||||||
default 37
|
default 37
|
||||||
endif
|
endif
|
||||||
config USING_PWM_CH5
|
config USING_PWM_CH5
|
||||||
bool "Enable pwm channel 5"
|
bool "Enable PWM channel 5"
|
||||||
default n
|
default n
|
||||||
if USING_PWM_CH5
|
if USING_PWM_CH5
|
||||||
config WM_PWM_CH5_PIN
|
config WM_PWM_CH5_PIN
|
||||||
int "wm pwm channel 5 pin number"
|
int "wm PWM channel 5 pin number"
|
||||||
default 19
|
default 19
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
|
@ -101,7 +101,7 @@ config BSP_USING_TIM
|
||||||
|
|
||||||
if BSP_USING_TIM1
|
if BSP_USING_TIM1
|
||||||
choice
|
choice
|
||||||
prompt "using TIM1 as hwtimer or pwm mode"
|
prompt "using TIM1 as hwtimer or PWM mode"
|
||||||
default BSP_USING_TIM1_HWTIMER
|
default BSP_USING_TIM1_HWTIMER
|
||||||
|
|
||||||
config BSP_USING_TIM1_HWTIMER
|
config BSP_USING_TIM1_HWTIMER
|
||||||
|
@ -109,7 +109,7 @@ config BSP_USING_TIM
|
||||||
select BSP_USING_HWTIMER
|
select BSP_USING_HWTIMER
|
||||||
|
|
||||||
config BSP_USING_TIM1_PWM
|
config BSP_USING_TIM1_PWM
|
||||||
bool "using TIM1 as pwm mode"
|
bool "using TIM1 as PWM mode"
|
||||||
select BSP_USING_PWM
|
select BSP_USING_PWM
|
||||||
|
|
||||||
endchoice
|
endchoice
|
||||||
|
@ -139,7 +139,7 @@ config BSP_USING_TIM
|
||||||
|
|
||||||
if BSP_USING_TIM2
|
if BSP_USING_TIM2
|
||||||
choice
|
choice
|
||||||
prompt "using TIM2 as hwtimer or pwm mode"
|
prompt "using TIM2 as hwtimer or PWM mode"
|
||||||
default BSP_USING_TIM2_HWTIMER
|
default BSP_USING_TIM2_HWTIMER
|
||||||
|
|
||||||
config BSP_USING_TIM2_HWTIMER
|
config BSP_USING_TIM2_HWTIMER
|
||||||
|
@ -147,7 +147,7 @@ config BSP_USING_TIM
|
||||||
select BSP_USING_HWTIMER
|
select BSP_USING_HWTIMER
|
||||||
|
|
||||||
config BSP_USING_TIM2_PWM
|
config BSP_USING_TIM2_PWM
|
||||||
bool "using TIM2 as pwm mode"
|
bool "using TIM2 as PWM mode"
|
||||||
select BSP_USING_PWM
|
select BSP_USING_PWM
|
||||||
|
|
||||||
endchoice
|
endchoice
|
||||||
|
@ -177,7 +177,7 @@ config BSP_USING_TIM
|
||||||
|
|
||||||
if BSP_USING_TIM3
|
if BSP_USING_TIM3
|
||||||
choice
|
choice
|
||||||
prompt "using TIM3 as hwtimer or pwm mode"
|
prompt "using TIM3 as hwtimer or PWM mode"
|
||||||
default BSP_USING_TIM3_HWTIMER
|
default BSP_USING_TIM3_HWTIMER
|
||||||
|
|
||||||
config BSP_USING_TIM3_HWTIMER
|
config BSP_USING_TIM3_HWTIMER
|
||||||
|
@ -185,7 +185,7 @@ config BSP_USING_TIM
|
||||||
select BSP_USING_HWTIMER
|
select BSP_USING_HWTIMER
|
||||||
|
|
||||||
config BSP_USING_TIM3_PWM
|
config BSP_USING_TIM3_PWM
|
||||||
bool "using TIM3 as pwm mode"
|
bool "using TIM3 as PWM mode"
|
||||||
select BSP_USING_PWM
|
select BSP_USING_PWM
|
||||||
|
|
||||||
endchoice
|
endchoice
|
||||||
|
@ -215,7 +215,7 @@ config BSP_USING_TIM
|
||||||
|
|
||||||
if BSP_USING_TIM4
|
if BSP_USING_TIM4
|
||||||
choice
|
choice
|
||||||
prompt "using TIM4 as hwtimer or pwm mode"
|
prompt "using TIM4 as hwtimer or PWM mode"
|
||||||
default BSP_USING_TIM4_HWTIMER
|
default BSP_USING_TIM4_HWTIMER
|
||||||
|
|
||||||
config BSP_USING_TIM4_HWTIMER
|
config BSP_USING_TIM4_HWTIMER
|
||||||
|
@ -223,7 +223,7 @@ config BSP_USING_TIM
|
||||||
select BSP_USING_HWTIMER
|
select BSP_USING_HWTIMER
|
||||||
|
|
||||||
config BSP_USING_TIM4_PWM
|
config BSP_USING_TIM4_PWM
|
||||||
bool "using TIM4 as pwm mode"
|
bool "using TIM4 as PWM mode"
|
||||||
select BSP_USING_PWM
|
select BSP_USING_PWM
|
||||||
|
|
||||||
endchoice
|
endchoice
|
||||||
|
|
|
@ -125,7 +125,7 @@ config BSP_USING_TIM
|
||||||
|
|
||||||
if BSP_USING_TIM1
|
if BSP_USING_TIM1
|
||||||
choice
|
choice
|
||||||
prompt "using TIM1 as hwtimer or pwm mode"
|
prompt "using TIM1 as hwtimer or PWM mode"
|
||||||
default BSP_USING_TIM1_HWTIMER
|
default BSP_USING_TIM1_HWTIMER
|
||||||
|
|
||||||
config BSP_USING_TIM1_HWTIMER
|
config BSP_USING_TIM1_HWTIMER
|
||||||
|
@ -133,7 +133,7 @@ config BSP_USING_TIM
|
||||||
select BSP_USING_HWTIMER
|
select BSP_USING_HWTIMER
|
||||||
|
|
||||||
config BSP_USING_TIM1_PWM
|
config BSP_USING_TIM1_PWM
|
||||||
bool "using TIM1 as pwm mode"
|
bool "using TIM1 as PWM mode"
|
||||||
select BSP_USING_PWM
|
select BSP_USING_PWM
|
||||||
|
|
||||||
endchoice
|
endchoice
|
||||||
|
@ -163,7 +163,7 @@ config BSP_USING_TIM
|
||||||
|
|
||||||
if BSP_USING_TIM2
|
if BSP_USING_TIM2
|
||||||
choice
|
choice
|
||||||
prompt "using TIM2 as hwtimer or pwm mode"
|
prompt "using TIM2 as hwtimer or PWM mode"
|
||||||
default BSP_USING_TIM2_HWTIMER
|
default BSP_USING_TIM2_HWTIMER
|
||||||
|
|
||||||
config BSP_USING_TIM2_HWTIMER
|
config BSP_USING_TIM2_HWTIMER
|
||||||
|
@ -171,7 +171,7 @@ config BSP_USING_TIM
|
||||||
select BSP_USING_HWTIMER
|
select BSP_USING_HWTIMER
|
||||||
|
|
||||||
config BSP_USING_TIM2_PWM
|
config BSP_USING_TIM2_PWM
|
||||||
bool "using TIM2 as pwm mode"
|
bool "using TIM2 as PWM mode"
|
||||||
select BSP_USING_PWM
|
select BSP_USING_PWM
|
||||||
|
|
||||||
endchoice
|
endchoice
|
||||||
|
@ -201,7 +201,7 @@ config BSP_USING_TIM
|
||||||
|
|
||||||
if BSP_USING_TIM3
|
if BSP_USING_TIM3
|
||||||
choice
|
choice
|
||||||
prompt "using TIM3 as hwtimer or pwm mode"
|
prompt "using TIM3 as hwtimer or PWM mode"
|
||||||
default BSP_USING_TIM3_HWTIMER
|
default BSP_USING_TIM3_HWTIMER
|
||||||
|
|
||||||
config BSP_USING_TIM3_HWTIMER
|
config BSP_USING_TIM3_HWTIMER
|
||||||
|
@ -209,7 +209,7 @@ config BSP_USING_TIM
|
||||||
select BSP_USING_HWTIMER
|
select BSP_USING_HWTIMER
|
||||||
|
|
||||||
config BSP_USING_TIM3_PWM
|
config BSP_USING_TIM3_PWM
|
||||||
bool "using TIM3 as pwm mode"
|
bool "using TIM3 as PWM mode"
|
||||||
select BSP_USING_PWM
|
select BSP_USING_PWM
|
||||||
|
|
||||||
endchoice
|
endchoice
|
||||||
|
@ -239,7 +239,7 @@ config BSP_USING_TIM
|
||||||
|
|
||||||
if BSP_USING_TIM4
|
if BSP_USING_TIM4
|
||||||
choice
|
choice
|
||||||
prompt "using TIM4 as hwtimer or pwm mode"
|
prompt "using TIM4 as hwtimer or PWM mode"
|
||||||
default BSP_USING_TIM4_HWTIMER
|
default BSP_USING_TIM4_HWTIMER
|
||||||
|
|
||||||
config BSP_USING_TIM4_HWTIMER
|
config BSP_USING_TIM4_HWTIMER
|
||||||
|
@ -247,7 +247,7 @@ config BSP_USING_TIM
|
||||||
select BSP_USING_HWTIMER
|
select BSP_USING_HWTIMER
|
||||||
|
|
||||||
config BSP_USING_TIM4_PWM
|
config BSP_USING_TIM4_PWM
|
||||||
bool "using TIM4 as pwm mode"
|
bool "using TIM4 as PWM mode"
|
||||||
select BSP_USING_PWM
|
select BSP_USING_PWM
|
||||||
|
|
||||||
endchoice
|
endchoice
|
||||||
|
@ -277,7 +277,7 @@ config BSP_USING_TIM
|
||||||
|
|
||||||
if BSP_USING_TIM4
|
if BSP_USING_TIM4
|
||||||
choice
|
choice
|
||||||
prompt "using TIM5 as hwtimer or pwm mode"
|
prompt "using TIM5 as hwtimer or PWM mode"
|
||||||
default BSP_USING_TIM5_HWTIMER
|
default BSP_USING_TIM5_HWTIMER
|
||||||
|
|
||||||
config BSP_USING_TIM5_HWTIMER
|
config BSP_USING_TIM5_HWTIMER
|
||||||
|
@ -285,7 +285,7 @@ config BSP_USING_TIM
|
||||||
select BSP_USING_HWTIMER
|
select BSP_USING_HWTIMER
|
||||||
|
|
||||||
config BSP_USING_TIM5_PWM
|
config BSP_USING_TIM5_PWM
|
||||||
bool "using TIM5 as pwm mode"
|
bool "using TIM5 as PWM mode"
|
||||||
select BSP_USING_PWM
|
select BSP_USING_PWM
|
||||||
|
|
||||||
endchoice
|
endchoice
|
||||||
|
@ -339,7 +339,7 @@ config BSP_USING_TIM
|
||||||
|
|
||||||
if BSP_USING_TIM8
|
if BSP_USING_TIM8
|
||||||
choice
|
choice
|
||||||
prompt "using TIM8 as hwtimer or pwm mode"
|
prompt "using TIM8 as hwtimer or PWM mode"
|
||||||
default BSP_USING_TIM8_HWTIMER
|
default BSP_USING_TIM8_HWTIMER
|
||||||
|
|
||||||
config BSP_USING_TIM8_HWTIMER
|
config BSP_USING_TIM8_HWTIMER
|
||||||
|
@ -347,7 +347,7 @@ config BSP_USING_TIM
|
||||||
select BSP_USING_HWTIMER
|
select BSP_USING_HWTIMER
|
||||||
|
|
||||||
config BSP_USING_TIM8_PWM
|
config BSP_USING_TIM8_PWM
|
||||||
bool "using TIM8 as pwm mode"
|
bool "using TIM8 as PWM mode"
|
||||||
select BSP_USING_PWM
|
select BSP_USING_PWM
|
||||||
|
|
||||||
endchoice
|
endchoice
|
||||||
|
@ -377,7 +377,7 @@ config BSP_USING_TIM
|
||||||
|
|
||||||
if BSP_USING_TIM9
|
if BSP_USING_TIM9
|
||||||
choice
|
choice
|
||||||
prompt "using TIM9 as hwtimer or pwm mode"
|
prompt "using TIM9 as hwtimer or PWM mode"
|
||||||
default BSP_USING_TIM9_HWTIMER
|
default BSP_USING_TIM9_HWTIMER
|
||||||
|
|
||||||
config BSP_USING_TIM9_HWTIMER
|
config BSP_USING_TIM9_HWTIMER
|
||||||
|
@ -385,7 +385,7 @@ config BSP_USING_TIM
|
||||||
select BSP_USING_HWTIMER
|
select BSP_USING_HWTIMER
|
||||||
|
|
||||||
config BSP_USING_TIM9_PWM
|
config BSP_USING_TIM9_PWM
|
||||||
bool "using TIM9 as pwm mode"
|
bool "using TIM9 as PWM mode"
|
||||||
select BSP_USING_PWM
|
select BSP_USING_PWM
|
||||||
|
|
||||||
endchoice
|
endchoice
|
||||||
|
@ -415,7 +415,7 @@ config BSP_USING_TIM
|
||||||
|
|
||||||
if BSP_USING_TIM10
|
if BSP_USING_TIM10
|
||||||
choice
|
choice
|
||||||
prompt "using TIM10 as hwtimer or pwm mode"
|
prompt "using TIM10 as hwtimer or PWM mode"
|
||||||
default BSP_USING_TIM10_HWTIMER
|
default BSP_USING_TIM10_HWTIMER
|
||||||
|
|
||||||
config BSP_USING_TIM10_HWTIMER
|
config BSP_USING_TIM10_HWTIMER
|
||||||
|
@ -423,7 +423,7 @@ config BSP_USING_TIM
|
||||||
select BSP_USING_HWTIMER
|
select BSP_USING_HWTIMER
|
||||||
|
|
||||||
config BSP_USING_TIM10_PWM
|
config BSP_USING_TIM10_PWM
|
||||||
bool "using TIM10 as pwm mode"
|
bool "using TIM10 as PWM mode"
|
||||||
select BSP_USING_PWM
|
select BSP_USING_PWM
|
||||||
|
|
||||||
endchoice
|
endchoice
|
||||||
|
|
Loading…
Reference in New Issue