summaryrefslogtreecommitdiff
path: root/bsp/ht32/ht32f12366/board/Kconfig
blob: 78fde3292713051efc1d02fdcf55a6ab5125ccb4 (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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
menu "Hardware Drivers Config"

menu "Chip Configuration"
    config SOC_KERNEL
        bool
        select SOC_SERIES_HT32F5 if CORTEX_M0
        select SOC_SERIES_HT32F1 if CORTEX_M3
        select RT_USING_COMPONENTS_INIT
        select RT_USING_USER_MAIN
        default y
        choice
            prompt "Select the kernel"
            default CORTEX_M0
            config CORTEX_M0
                bool "CORTEX_M0"
            config CORTEX_M3
                bool "CORTEX_M3" 
        endchoice

    choice
        prompt "Select the chip you are using"
        depends on CORTEX_M0
        default HT32F52352
            config SOC_HT32F0006
                bool "HT32F0006"
            config SOC_HT32F0008
                bool "HT32F0008"
            config SOC_HT32F50241
                bool "HT32F50241"
            config SOC_HT32F50343
                bool "HT32F50343"
            config SOC_HT32F50441
                bool "HT32F50441"
            config SOC_HT32F50452
                bool "HT32F50452"
            config SOC_HT32F52241
                bool "HT32F52241"
            config SOC_HT32F52244
                bool "HT32F52244"
            config SOC_HT32F52253
                bool "HT32F52253"
            config SOC_HT32F52341
                bool "HT32F52341"
            config SOC_HT32F52352
                bool "HT32F52352"
            config SOC_HT32F52354
                bool "HT32F52354"
            config SOC_HT32F52367
                bool "HT32F52367"
            config SOC_HT32F53241
                bool "HT32F53241"
            config SOC_HT32F53252
                bool "HT32F53252"
            config SOC_HT32F54241
                bool "HT32F54241"
            config SOC_HT32F54253
                bool "HT32F54253"
            config SOC_HT32F57341
                bool "HT32F57341"
            config SOC_HT32F57352
                bool "HT32F57352"
            config SOC_HT32F5828
                bool "HT32F5828"
            config SOC_HT32F59041
                bool "HT32F59041"
            config SOC_HT32F59741
                bool "HT32F59741"
            config SOC_HT32F61141
                bool "HT32F61141"
            config SOC_HT32F61245
                bool "HT32F61245"
            config SOC_HT32F61355
                bool "HT32F61355"
            config SOC_HT32F61356
                bool "HT32F61356"
            config SOC_HT32F61357
                bool "HT32F61357"
            config SOC_HT32F61641
                bool "HT32F61641"
            config SOC_HT32F65240
                bool "HT32F65240"
            config SOC_HT32F67051
                bool "HT32F67051"
            config SOC_HT32F67741
                bool "HT32F67741"
    endchoice
    
    choice
        prompt "Select the chip you are using"
        depends on CORTEX_M3
        default HT32F52352
        config SOC_HT32F1654
            bool "HT32F1654"
        config SOC_HT32F1656
            bool "HT32F1656"
        config SOC_HT32F12345
            bool "HT32F12345"
        config SOC_HT32F12364
            bool "HT32F12364"
        config SOC_HT32F12366
            bool "HT32F12366"
    endchoice
endmenu

menu "Onboard Peripheral Drivers"

    config BSP_USING_TEST
        bool "Enable test"
        default n

    if RT_USING_CONSOLE
		config RT_CONSOLE_DEVICE_NAME
		string "the device name for console"
		default "usart0"
	endif

endmenu

menu "On-chip Peripheral Drivers"

    config BSP_USING_GPIO
        bool "Enable GPIO"
        select RT_USING_PIN if BSP_USING_GPIO
        default n

    menuconfig BSP_USING_UART
        bool "Enable UART"
        default n
        select RT_USING_SERIAL if BSP_USING_UART
        if BSP_USING_UART
            config BSP_USING_USART0
                bool "Enable USART0"
                default n
                config BSP_USING_USART0_NAME
                depends on BSP_USING_USART0
                string "usart0 bus name"
                default "usart0"

            config BSP_USING_USART1
                bool "Enable USART1"
                default n
                config BSP_USING_USART1_NAME
                depends on BSP_USING_USART1
                string "usart1 bus name"
                default "usart1"

            config BSP_USING_UART0
                bool "Enable UART0"
                default n
                config BSP_USING_UART0_NAME
                depends on BSP_USING_UART0
                string "uart0 bus name"
                default "uart0"

            config BSP_USING_UART1
                bool "Enable UART1"
                default n
                config BSP_USING_UART1_NAME
                depends on BSP_USING_UART1
                string "uart1 bus name"
                default "uart1"
        endif

    menuconfig BSP_USING_SPI
        bool "Enable SPI Bus"
        default n
        select RT_USING_SPI if BSP_USING_SPI
        if BSP_USING_SPI
            config BSP_USING_SPI0
                bool "Enable SPI0 Bus"
                default n
                config BSP_USING_SPI0_NAME
                depends on BSP_USING_SPI0
                string "spi0 bus name"
                default "spi0"

            config BSP_USING_SPI1
                bool "Enable SPI1 Bus"
                default n
                config BSP_USING_SPI1_NAME
                depends on BSP_USING_SPI1
                string "spi1 bus name"
                default "spi1"
        endif

    menuconfig BSP_USING_I2C
        bool "Enable I2C Bus"
        default n
        if BSP_USING_I2C
            menuconfig BSP_USING_I2C_HW
                bool "Enable I2C Bus(hardware)"
                default n
                select RT_USING_I2C if BSP_USING_I2C_HW
                if BSP_USING_I2C_HW
                    config BSP_USING_I2C0_HW
                    bool "Enable Hardware I2C0 Bus"
                    default n
                    config BSP_USING_I2C0_HW_NAME
                    depends on BSP_USING_I2C0_HW
                    string "hardware i2c0 name"
                    default "hw_i2c0"

                    config BSP_USING_I2C1_HW
                    bool "Enable Hardware I2C1 Bus"
                    default n
                    config BSP_USING_I2C1_HW_NAME
                    depends on BSP_USING_I2C1_HW
                    string "hardware i2c1 name"
                    default "hw_i2c1"
                endif

            menuconfig BSP_USING_I2C_SW
                bool "Enable I2C Bus(software)"
                default n
                select BSP_USING_GPIO if BSP_USING_I2C_SW
                select RT_USING_I2C if BSP_USING_I2C_SW
                
                if BSP_USING_I2C_SW
                    config BSP_USING_I2C0_SW
                    bool "Enable Software I2C0 Bus"
                    default n
                    config BSP_USING_I2C0_SW_NAME
                    depends on BSP_USING_I2C0_SW
                    string "software i2c0 name"
                    default "sw_i2c0"
                    if BSP_USING_I2C0_SW
                            config BSP_I2C0_SLC_PIN
                            int "i2c0 slc pin number"
                            range 0 51
                            default 22

                            config BSP_I2C0_SDA_PIN
                            int "i2c0 sda pin number"
                            range 0 51
                            default 23
                    endif
                    
                    config BSP_USING_I2C1_SW
                    bool "Enable Software I2C1 Bus"
                    default n
                    config BSP_USING_I2C1_SW_NAME
                    depends on BSP_USING_I2C1_SW
                    string "software i2c1 name"
                    default "sw_i2c1"
                    if BSP_USING_I2C1_SW
                            config BSP_I2C1_SLC_PIN
                            int "i2c1 slc pin number"
                            range 0 51
                            default 24

                            config BSP_I2C1_SDA_PIN
                            int "i2c1 sda pin number"
                            range 0 51
                            default 25
                    endif
                    
                    config BSP_USING_I2C2_SW
                    bool "Enable Software I2C2 Bus"
                    default n
                    config BSP_USING_I2C2_SW_NAME
                    depends on BSP_USING_I2C2_SW
                    string "software i2c2 name"
                    default "sw_i2c2"
                    if BSP_USING_I2C2_SW
                            config BSP_I2C2_SLC_PIN
                            int "i2c2 slc pin number"
                            range 0 51
                            default 26

                            config BSP_I2C2_SDA_PIN
                            int "i2c2 sda pin number"
                            range 0 51
                            default 27
                    endif
                endif
        endif

    menuconfig BSP_USING_ADC
        bool "Enable ADC"
        default n
        select RT_USING_ADC if BSP_USING_ADC
        if BSP_USING_ADC
            config BSP_USING_ADC0
            bool "Enable ADC0"
            default n
            config BSP_USING_ADC0_NAME
            depends on BSP_USING_ADC0
            string "adc0 device name"
            default "adc0"

            config BSP_USING_ADC1
            bool "Enable ADC1"
            depends on SOC_HT32F65240
            default n
            config BSP_USING_ADC1_NAME
            depends on BSP_USING_ADC1
            string "adc1 device name"
            default "adc1"
        endif

    menuconfig BSP_USING_WDT
        bool "Enable WDT"
        default n
        select RT_USING_WDT if BSP_USING_WDT
        config BSP_USING_WDT_NAME
        depends on BSP_USING_WDT
        string "wdt device name"
        default "wdt"

    menuconfig BSP_USING_CAN
        bool "Enable CAN"
        depends on SOC_HT32F53241 || SOC_HT32F53242 || SOC_HT32F53252
        default n
        select RT_USING_CAN if BSP_USING_CAN
        config BSP_USING_CAN_NAME
        depends on BSP_USING_CAN
        string "can device name"
        default "can"
        if BSP_USING_CAN
            config CAN_DEFAULT_BASE_CONFIGURATION  
                choice
                    prompt "Default CAN baud rate"
                    default BSP_USING_CAN500kBaud
                    config BSP_USING_CAN1MBaud
                        bool "CAN1MBaud"
                    config BSP_USING_CAN800kBaud
                        bool "CAN800kBaud"
                    config BSP_USING_CAN500kBaud
                        bool "CAN500kBaud"
                    config BSP_USING_CAN250kBaud
                        bool "CAN250kBaud"
                    config BSP_USING_CAN125kBaud
                        bool "CAN125kBaud"
                    config BSP_USING_CAN100kBaud
                        bool "CAN100kBaud"
                    config BSP_USING_CAN50kBaud
                        bool "CAN50kBaud"
                    config BSP_USING_CAN20kBaud
                        bool "CAN20kBaud"
                    config BSP_USING_CAN10kBaud
                        bool "CAN10kBaud"
                endchoice
                choice
                    prompt "Default CAN mode"
                    default BSP_USING_RT_CAN_MODE_NORMAL
                    config BSP_USING_RT_CAN_MODE_NORMAL
                        bool "RT_CAN_MODE_NORMAL"
                    config BSP_USING_RT_CAN_MODE_LISTEN
                        bool "RT_CAN_MODE_LISTEN"
                    config BSP_USING_RT_CAN_MODE_LOOPBACK
                        bool "RT_CAN_MODE_LOOPBACK"
                    config BSP_USING_RT_CAN_MODE_LOOPBACKANLISTEN
                        bool "RT_CAN_MODE_LOOPBACKANLISTEN"
                endchoice

                config BSP_USING_CAN_BAUD
                int
                default 1000000 if BSP_USING_CAN1MBaud
                default 800000 if BSP_USING_CAN800kBaud
                default 500000 if BSP_USING_CAN500kBaud
                default 250000 if BSP_USING_CAN250kBaud
                default 125000 if BSP_USING_CAN125kBaud
                default 100000 if BSP_USING_CAN100kBaud
                default 50000 if BSP_USING_CAN50kBaud
                default 20000 if BSP_USING_CAN20kBaud
                default 10000 if BSP_USING_CAN10kBaud

                config BSP_USING_CAN_MODE
                int
                default 0 if BSP_USING_RT_CAN_MODE_NORMAL
                default 1 if BSP_USING_RT_CAN_MODE_LISTEN
                default 2 if BSP_USING_RT_CAN_MODE_LOOPBACK
                default 3 if BSP_USING_RT_CAN_MODE_LOOPBACKANLISTEN
            
            config CAN_DEFAULT_FILTER_TABLE_CONFIGURATION
                choice
                    prompt "Default filter id mode"
                    default BSP_USING_CAN_STD_ID
                    config BSP_USING_CAN_STD_ID
                        bool "CAN_STD_ID"
                    config BSP_USING_CAN_EXT_ID
                        bool "CAN_EXT_ID"
                endchoice

                choice
                    prompt "Default filter frame mode"
                    default BSP_USING_CAN_DATA_FRAME
                    config BSP_USING_CAN_DATA_FRAME
                        bool "CAN_DATA_FRAME"
                    config BSP_USING_CAN_REMOTE_FRAME
                        bool "CAN_REMOTE_FRAME"
                endchoice

                config BSP_USING_CAN_ID_MODE
                int
                default 0 if BSP_USING_CAN_STD_ID
                default 1 if BSP_USING_CAN_EXT_ID

                config BSP_USING_CAN_FRAME_MODE
                int
                default 0 if BSP_USING_CAN_REMOTE_FRAME
                default 1 if BSP_USING_CAN_DATA_FRAME

                config BSP_USING_CAN_MSG_NUM
                int "Default filter table number"
                range 0 31
                default 0

                config BSP_USING_CAN_ID
                hex "Default filter arbitration bit(ID)"
                range 0 0x7FF if BSP_USING_CAN_STD_ID
                default 0x541 if BSP_USING_CAN_STD_ID
                range 0 0x1FFFFFFF if BSP_USING_CAN_EXT_ID
                default 0x541 if BSP_USING_CAN_EXT_ID

                config BSP_USING_CAN_MASK
                hex "Default filter mask bit(MASK)"
                range 0 0x7FF if BSP_USING_CAN_STD_ID
                default 0x7FF if BSP_USING_CAN_STD_ID
                range 0 0x1FFFFFFF if BSP_USING_CAN_EXT_ID
                default 0x1FFFFFFF if BSP_USING_CAN_EXT_ID

        endif

    menuconfig BSP_USING_SDIO
        bool "Enable SDIO"
        depends on SOC_HT32F12345 || SOC_HT32F12365 || SOC_HT32F12366
        default n
        select RT_USING_SDIO if BSP_USING_SDIO
        select RT_USING_DFS if BSP_USING_SDIO
        config BSP_USING_SDIO_NAME
        depends on BSP_USING_SDIO
        string "sdio device name"
        default "sd0"

    menuconfig BSP_USING_USBD
        bool "Enable USB BUS"
        default n
        select RT_USING_USB_DEVICE if BSP_USING_USBD
        config BSP_USING_USBD_NAME
        depends on BSP_USING_USBD
        string "usbd device name"
        default "usbd"
endmenu

menu "Board extended module Drivers"

endmenu

endmenu