Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions bsp/n32/libraries/n32_drivers/SConscript
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,12 @@ if GetDepend(['RT_USING_RTC']):
if GetDepend(['RT_USING_WDT']):
src += ['drv_wdt.c']

if GetDepend('BSP_USING_PWM'):
src += ['drv_base.c']

if GetDepend(['BSP_USING_PWM']):
src += ['drv_pwm.c']

path = [cwd]
path += [cwd + '/config']

Expand Down
13 changes: 10 additions & 3 deletions bsp/n32/n32g43xcl-stb/.config
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ CONFIG_RT_USING_DEVICE=y
CONFIG_RT_USING_CONSOLE=y
CONFIG_RT_CONSOLEBUF_SIZE=128
CONFIG_RT_CONSOLE_DEVICE_NAME="usart1"
CONFIG_RT_VER_NUM=0x50201
CONFIG_RT_VER_NUM=0x50300
# CONFIG_RT_USING_STDC_ATOMIC is not set
CONFIG_RT_BACKTRACE_LEVEL_MAX_NR=32
# end of RT-Thread Kernel
Expand Down Expand Up @@ -267,6 +267,7 @@ CONFIG_RT_USING_RTC=y
# CONFIG_RT_USING_SOFT_RTC is not set
# CONFIG_RT_USING_SDIO is not set
CONFIG_RT_USING_SPI=y
CONFIG_RT_USING_SPI_ISR=y
# CONFIG_RT_USING_SOFT_SPI is not set
# CONFIG_RT_USING_QSPI is not set
# CONFIG_RT_USING_SPI_MSD is not set
Expand Down Expand Up @@ -361,8 +362,6 @@ CONFIG_RT_LIBC_TZ_DEFAULT_SEC=0
# CONFIG_RT_USING_RT_LINK is not set
# end of Utilities

# CONFIG_RT_USING_VBUS is not set

#
# Using USB legacy version
#
Expand All @@ -371,6 +370,7 @@ CONFIG_RT_LIBC_TZ_DEFAULT_SEC=0
# end of Using USB legacy version

# CONFIG_RT_USING_FDT is not set
# CONFIG_RT_USING_RUST is not set
# end of RT-Thread Components

#
Expand Down Expand Up @@ -738,6 +738,7 @@ CONFIG_RT_LIBC_TZ_DEFAULT_SEC=0
# CONFIG_PKG_USING_R_RHEALSTONE is not set
# CONFIG_PKG_USING_HEARTBEAT is not set
# CONFIG_PKG_USING_MICRO_ROS_RTTHREAD_PACKAGE is not set
# CONFIG_PKG_USING_CHERRYECAT is not set
# end of system packages

#
Expand Down Expand Up @@ -894,6 +895,12 @@ CONFIG_RT_LIBC_TZ_DEFAULT_SEC=0
# CONFIG_PKG_USING_GD32_ARM_CMSIS_DRIVER is not set
# CONFIG_PKG_USING_GD32_ARM_SERIES_DRIVER is not set
# end of GD32 Drivers

#
# HPMicro SDK
#
# CONFIG_PKG_USING_HPM_SDK is not set
# end of HPMicro SDK
# end of HAL & SDK Drivers

#
Expand Down
98 changes: 98 additions & 0 deletions bsp/n32/n32g43xcl-stb/board/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,104 @@ menu "On-chip Peripheral Drivers"
select RT_USING_CAN
default n

#-----------------------------PWM----------------------------------
menuconfig BSP_USING_PWM
bool "Enable PWM"
default n
select RT_USING_PWM
select RT_USING_HWTIMER
if BSP_USING_PWM
menuconfig BSP_USING_TIM1_PWM
bool "Enable TIM1 output PWM"
default n
# --------------selcet remap-----------------
if BSP_USING_TIM1_PWM
choice
prompt "Select Pin"
default TIM1_REMAP_0
config TIM1_REMAP_0
bool "PA8 PA9 PA10 PA11"
config TIM1_REMAP_3
bool "PE9 PE11 PE13 PE14"
endchoice
# -----------tim chanle enable-----------------
config BSP_USING_TIM1_PWM_CH1
bool "Enable TIM1 CH1"
default n
config BSP_USING_TIM1_PWM_CH2
bool "Enable TIM1 CH2"
default n
config BSP_USING_TIM1_PWM_CH3
bool "Enable TIM1 CH3"
default n
config BSP_USING_TIM1_PWM_CH4
bool "Enable TIM1 CH4"
default n
endif


menuconfig BSP_USING_TIM2_PWM
bool "Enable TIM2 output PWM"
default n
if BSP_USING_TIM2_PWM
choice
prompt "Select Pin"
default TIM2_REMAP_0
config TIM2_REMAP_0
bool "PA0 PA1 PA2 PA3"
config TIM2_REMAP_1
bool "PA15 PB3 PA2 PA3"
config TIM2_REMAP_2
bool "PA0 PA1 PB10 PB11"
config TIM2_REMAP_3
bool "PA15 PB3 PB10 PB11"
endchoice

config BSP_USING_TIM2_PWM_CH0
bool "Enable TIM2 CH1"
default n
config BSP_USING_TIM2_PWM_CH1
bool "Enable TIM2 CH2"
default n
config BSP_USING_TIM2_PWM_CH2
bool "Enable TIM2 CH3"
default n
config BSP_USING_TIM2_PWM_CH3
bool "Enable TIM2 CH4"
default n
endif

menuconfig BSP_USING_TIM3_PWM
bool "Enable TIM3 output PWM"
default n
if BSP_USING_TIM3_PWM
choice
prompt "Select Pin"
default TIM3_REMAP_0
config TIM3_REMAP_0
bool "PA6 PA7 PB0 PB1"
config TIM3_REMAP_2
bool "PB4 PB5 PB0 PB1"
config TIM3_REMAP_3
bool "PC6 PC7 PC8 PC9"
endchoice

config BSP_USING_TIM3_PWM_CH0
bool "Enable TIM3 CH1"
default n
config BSP_USING_TIM3_PWM_CH1
bool "Enable TIM3 CH2"
default n
config BSP_USING_TIM3_PWM_CH2
bool "Enable TIM3 CH3"
default n
config BSP_USING_TIM3_PWM_CH3
bool "Enable TIM3 CH3"
default n
endif#BSP_USING_TIM3_PWM

endif#BSP_USING_PWM

rsource "../../libraries/n32_drivers/Kconfig"

endmenu
Expand Down
Loading
Loading