aboutsummaryrefslogtreecommitdiffstats
path: root/src/hc32f460/Kconfig
blob: e204bebf7155b944d2ef2ee4fe329cc76634a0fa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
# Kconfig settings for Huada HC32F460 processor

if MACH_HC32F460

config HC32F460_SELECT
    bool
    default y
    select HAVE_GPIO
    select HAVE_GPIO_ADC
    select HAVE_GPIO_BITBANGING
    select HAVE_STRICT_TIMING
    select HAVE_GPIO_HARD_PWM
    select HAVE_STEPPER_BOTH_EDGE

config BOARD_DIRECTORY
    string
    default "hc32f460"


######################################################################
# Communication interface
######################################################################
choice
    prompt "Communication interface"
    config HC32F460_SERIAL_PA7_PA8
        bool "Serial (PA7 & PA8)"
        select SERIAL
    config HC32F460_SERIAL_PA13_PA14
        bool "Serial (PA13 & PA14)"
        select SERIAL
    config HC32F460_SERIAL_PA3_PA2
        bool "Serial (PA3 & PA2)"
        select SERIAL
    config HC32F460_SERIAL_PH2_PB10
        bool "Serial (PH2 & PB10)"
        select SERIAL
    config HC32F460_SERIAL_PA15_PA9
        bool "Serial (PA15 & PA09)"
        select SERIAL
    config HC32F460_SERIAL_PC0_PC1
        bool "Serial (PC0 & PC1)"
        select SERIAL
endchoice

######################################################################
# Bootloader
# bootloader moves code and then VTOR.RESET points here:
######################################################################
config FLASH_SIZE
    hex
    default 0x40000

choice "Application Address"
    prompt "Application Address"
    config HC32F460_FLASH_APPLICATION_ADDRESS_0x8000
        bool "0x8000"
    config HC32F460_FLASH_APPLICATION_ADDRESS_0xC000
        bool "0xC000"
endchoice

config FLASH_APPLICATION_ADDRESS
    hex
    default 0x8000 if HC32F460_FLASH_APPLICATION_ADDRESS_0x8000
    default 0xC000 if HC32F460_FLASH_APPLICATION_ADDRESS_0xC000

config FLASH_BOOT_ADDRESS
    hex
    default 0x0

config RAM_SIZE
    hex
    default 0x8000

# use the fast RAM in the HC32F460
config RAM_START
    hex
    default 0x1fff8000

config STACK_SIZE
    int
    default 1024

choice "Clock Speed"
    prompt "Clock Speed"
    config HC32F460_CLOCK_SPEED_168M
        bool "168 MHz"
    config HC32F460_CLOCK_SPEED_200M
        bool "200 MHz"
endchoice

config CLOCK_FREQ
    int
    default 200000000 if HC32F460_CLOCK_SPEED_200M
    default 168000000 if HC32F460_CLOCK_SPEED_168M

config MCU
    string
    default "HC32F460"

endif