summaryrefslogtreecommitdiff
path: root/bsp/ti/c28x/tms320f28379d/board/Kconfig
blob: e7a7827983baf5fa9aa7616eb73e4bb23c83edbe (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
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
menu "Hardware Drivers Config"

menu "Onboard Peripheral Drivers"
endmenu

menu "On-chip Peripheral Drivers"
    config BSP_USING_FLASH
        bool "Using FLASH as CMD, default RAM"
        default n
    config BSP_USING_GPIO
        bool "Enable GPIO"
        select RT_USING_PIN
        default y
    menuconfig BSP_USING_XINT
        bool "Enable external interrupt"
        default n
        if BSP_USING_XINT
            menuconfig BSP_USING_XINT1
                bool "Enable XINT1"
                if BSP_USING_XINT1
                    config BSP_XINT1_PIN
                        int "Interrupt pin"
                        range 0 168
                        default 0
                endif
                if !BSP_USING_XINT1
                    config BSP_XINT1_PIN
                        int
                        default -1
                endif
            menuconfig BSP_USING_XINT2
                bool "Enable XINT2"
                if BSP_USING_XINT2
                    config BSP_XINT2_PIN
                        int "Interrupt pin"
                        range 0 168
                        default 0
                endif
                if !BSP_USING_XINT2
                    config BSP_XINT2_PIN
                        int
                        default -1
                endif
            menuconfig BSP_USING_XINT3
                bool "Enable XINT3"
                if BSP_USING_XINT3
                    config BSP_XINT3_PIN
                        int "Interrupt pin"
                        range 0 168
                        default 0
                endif
                if !BSP_USING_XINT3
                    config BSP_XINT3_PIN
                        int
                        default -1
                endif
            menuconfig BSP_USING_XINT4
                bool "Enable XINT4"
                if BSP_USING_XINT4
                    config BSP_XINT4_PIN
                        int "Interrupt pin"
                        range 0 168
                        default 0
                endif
                if !BSP_USING_XINT4
                    config BSP_XINT4_PIN
                        int
                        default -1
                endif
                if !BSP_USING_XINT5
                    config BSP_XINT5_PIN
                        int
                        default -1
                endif
            menuconfig BSP_USING_XINT5
                bool "Enable XINT5"
                if BSP_USING_XINT5
                    config BSP_XINT5_PIN
                        int "Interrupt pin"
                        range 0 168
                        default 0
                endif
        endif
    menuconfig BSP_USING_UART
        bool "Enable UART"
        default y
        select RT_USING_SERIAL
        if BSP_USING_UART
            config BSP_USING_UART1
                bool "Enable UART1"
                default y
        endif
    menuconfig BSP_USING_PWM
        bool "Enable PWM"
        default n
        select RT_USING_PWM

        if BSP_USING_PWM
            menuconfig BSP_USING_PWM1
                bool "Enable ePWM1"
                default y
                if BSP_USING_PWM1
                    menu "Basic settings for PWM1"
                        config BSP_PWM1_INIT_PERIOD
                            int "Initial period for PWM1(ns)"
                            default 10000
                        config BSP_PWM1_INIT_PULSE
                            int "Initial pulse for PWM1(ns)"
                            default 1000
                    endmenu
                    menu "Advanced Settings for PWM1"
                        menuconfig BSP_PWM1_PHASE_ENABLE
                            bool "Enable phase"
                            default n
                            if BSP_PWM1_PHASE_ENABLE
                                choice BSP_PWM1_SEL
                                    prompt "Select master or slave"
                                    default BSP_PWM1_MASTER
                                    config BSP_PWM1_MASTER
                                        bool "Master"
                                    config BSP_PWM1_SLAVE
                                        bool "Slave"
                                endchoice
                                if BSP_PWM1_MASTER
                                    config BSP_PWM1_PHASE
                                        int
                                        default 0
                                endif
                                if BSP_PWM1_SLAVE
                                    config BSP_PWM1_PHASE
                                        int "Phase, 0~360"
                                        range 0 360
                                        default 0
                                        help
                                            the phase for PWM1 module
                                endif
                            endif

                        menuconfig BSP_PWM1_IT_ENABLE
                            bool "Enable interrupt service"
                            default n
                            if BSP_PWM1_IT_ENABLE
                                choice BSP_PWM1_INTSEL_ET_SEL
                                    prompt "Select interrupt time"
                                    default BSP_PWM1_INTSEL_ET_CTR_ZERO
                                    config BSP_PWM1_INTSEL_ET_DCAEVT1SOC
                                        bool "DCAEVT1SOC"
                                    config BSP_PWM1_INTSEL_ET_CTR_ZERO
                                        bool "ctr == zero"
                                    config BSP_PWM1_INTSEL_ET_CTR_PRD
                                        bool "ctr == prd"
                                    config BSP_PWM1_INTSEL_ET_CTR_PRDZERO
                                        bool "ctr == prd or ctr == zero"
                                    config BSP_PWM1_INTSEL_ET_CTRU_CMPA
                                        bool "ctr == compa when counting up"
                                    config BSP_PWM1_INTSEL_ET_CTRD_CMPA
                                        bool "ctr == compa when counting down"
                                    config BSP_PWM1_INTSEL_ET_CTRU_CMPB
                                        bool "ctr == compb when counting up"
                                    config BSP_PWM1_INTSEL_ET_CTRD_CMPB
                                        bool "ctr == compb when counting down"
                                endchoice

                                config BSP_PWM1_INTSEL
                                    int
                                    default 0 if BSP_PWM1_INTSEL_ET_DCAEVT1SOC
                                    default 1 if BSP_PWM1_INTSEL_ET_CTR_ZERO
                                    default 2 if BSP_PWM1_INTSEL_ET_CTR_PRD
                                    default 3 if BSP_PWM1_INTSEL_ET_CTR_PRDZERO
                                    default 4 if BSP_PWM1_INTSEL_ET_CTRU_CMPA
                                    default 5 if BSP_PWM1_INTSEL_ET_CTRD_CMPA
                                    default 6 if BSP_PWM1_INTSEL_ET_CTRU_CMPB
                                    default 7 if BSP_PWM1_INTSEL_ET_CTRD_CMPB
                                choice BSP_PWM1_INT_ET_SEL
                                    prompt "Interrupt generation time"
                                    default BSP_PWM1_INT_ET_1ST
                                    config BSP_PWM1_INT_ET_DISABLE
                                        bool "disable PWM interrupt"
                                    config BSP_PWM1_INT_ET_1ST
                                        bool "generate interrupt at the first time"
                                    config BSP_PWM1_INT_ET_2ND
                                        bool "generate interrupt at the second time"
                                    config BSP_PWM1_INT_ET_3RD
                                        bool "generate interrupt at the third time"
                                endchoice
                                config BSP_PWM1_INTPRD
                                    int
                                    default 0 if BSP_PWM1_INT_ET_DISABLE
                                    default 1 if BSP_PWM1_INT_ET_1ST
                                    default 2 if BSP_PWM1_INT_ET_2ND
                                    default 3 if BSP_PWM1_INT_ET_3RD
                            endif
                        choice BSP_PWM1_HSPCLKDIV_SEL
                            prompt "HSP Clock division"
                            default BSP_PWM1_HSPCLKDIV1
                            config BSP_PWM1_HSPCLKDIV1
                                bool "Clock Divided by 1"
                            config BSP_PWM1_HSPCLKDIV2
                                bool "Clock Divided by 2"
                            config BSP_PWM1_HSPCLKDIV4
                                bool "Clock Divided by 4"
                        endchoice
                        config BSP_PWM1_HSPCLKDIV
                            int
                            default 0 if BSP_PWM1_HSPCLKDIV1
                            default 1 if BSP_PWM1_HSPCLKDIV2
                            default 2 if BSP_PWM1_HSPCLKDIV4
                        choice BSP_PWM1_CLKDIV_SEL
                            prompt "Clock division"
                            default BSP_PWM1_CLKDIV1
                            config BSP_PWM1_CLKDIV1
                                bool "Clock Divided by 1"
                            config BSP_PWM1_CLKDIV2
                                bool "Clock Divided by 2"
                            config BSP_PWM1_CLKDIV4
                                bool "Clock Divided by 4"
                        endchoice
                        config BSP_PWM1_CLKDIV
                            int
                            default 0 if BSP_PWM1_CLKDIV1
                            default 1 if BSP_PWM1_CLKDIV2
                            default 2 if BSP_PWM1_CLKDIV4
                        choice BSP_PWM1_CTR_SEL
                            default BSP_PWM1_CTR_MODE_UPDOWN
                            prompt "Select counter mode"
                            config BSP_PWM1_CTR_MODE_UPDOWN
                                bool "Up-down mode"
                            config BSP_PWM1_CTR_MODE_UP
                                bool "Up mode"
                            config BSP_PWM1_CTR_MODE_DOWN
                                bool "Down mode"
                            config BSP_PWM1_CTR_FREEZE
                                bool "Freezing Counter"
                        endchoice
                        config BSP_PWM1_CTRMODE
                            int
                            default 0 if BSP_PWM1_CTR_MODE_UP
                            default 1 if BSP_PWM1_CTR_MODE_DOWN
                            default 2 if BSP_PWM1_CTR_MODE_UPDOWN
                            default 3 if BSP_PWM1_CTR_FREEZE
                        choice BSP_PWM1_CC_SEL
                            prompt "Register load mode"
                            config BSP_PWM1_CC_CTR_ZERO
                                bool "Load when counter == 0"
                            config BSP_PWM1_CC_CTR_PRD
                                bool "Load when counter == prd"
                            config BSP_PWM1_CC_CTR_ZERO_PRD
                                bool "load when counter ==0 or counter == prd"
                            config BSP_PWM1_CC_LD_DISABLE
                                bool "disable load"
                        endchoice

                        config BSP_PWM1_LOADAMODE
                            int
                            default 0 if BSP_PWM1_CC_CTR_ZERO
                            default 1 if BSP_PWM1_CC_CTR_PRD
                            default 2 if BSP_PWM1_CC_CTR_ZERO_PRD
                            default 3 if BSP_PWM1_CC_LD_DISABLE

                        config BSP_PWM1_DB
                            int "Dead time(ns)"
                            default 100
                            range 0 100000
                        menuconfig BSP_PWM1_ADC_TRIGGER
                            bool "Enable ADC trigger from PWM1"
                            if BSP_PWM1_ADC_TRIGGER
                                choice BSP_PWM1_SOCASEL_ET_SEL
                                    prompt "Select soc triggering time"
                                    default BSP_PWM1_SOCASEL_ET_CTR_ZERO
                                    config BSP_PWM1_SOCASEL_ET_DCAEVT1SOC
                                        bool "DCAEVT1SOC"
                                    config BSP_PWM1_SOCASEL_ET_CTR_ZERO
                                        bool "ctr == zero"
                                    config BSP_PWM1_SOCASEL_ET_CTR_PRD
                                        bool "ctr == prd"
                                    config BSP_PWM1_SOCASEL_ET_CTR_PRDZERO
                                        bool "ctr == prd or ctr == zero"
                                    config BSP_PWM1_SOCASEL_ET_CTRU_CMPA
                                        bool "ctr == compa when counting up"
                                    config BSP_PWM1_SOCASEL_ET_CTRD_CMPA
                                        bool "ctr == compa when counting down"
                                    config BSP_PWM1_SOCASEL_ET_CTRU_CMPB
                                        bool "ctr == compb when counting up"
                                    config BSP_PWM1_SOCASEL_ET_CTRD_CMPB
                                        bool "ctr == compb when counting down"
                                endchoice

                                config BSP_PWM1_SOCASEL
                                    int
                                    default 0 if BSP_PWM1_SOCASEL_ET_DCAEVT1SOC
                                    default 1 if BSP_PWM1_SOCASEL_ET_CTR_ZERO
                                    default 2 if BSP_PWM1_SOCASEL_ET_CTR_PRD
                                    default 3 if BSP_PWM1_SOCASEL_ET_CTR_PRDZERO
                                    default 4 if BSP_PWM1_SOCASEL_ET_CTRU_CMPA
                                    default 5 if BSP_PWM1_SOCASEL_ET_CTRD_CMPA
                                    default 6 if BSP_PWM1_SOCASEL_ET_CTRU_CMPB
                                    default 7 if BSP_PWM1_SOCASEL_ET_CTRD_CMPB
                                choice BSP_PWM1_SOCA_ET_SEL
                                    prompt "SOCA generation time"
                                    default BSP_PWM1_SOCA_ET_1ST
                                    config BSP_PWM1_SOCA_ET_DISABLE
                                        bool "disable soc generation"
                                    config BSP_PWM1_SOCA_ET_1ST
                                        bool "generate soc at the first time"
                                    config BSP_PWM1_SOCA_ET_2ND
                                        bool "generate soc at the second time"
                                    config BSP_PWM1_SOCA_ET_3RD
                                        bool "generate soc at the third time"
                                endchoice
                                config BSP_PWM1_SOCAPRD
                                    int
                                    default 0 if BSP_PWM1_SOCA_ET_DISABLE
                                    default 1 if BSP_PWM1_SOCA_ET_1ST
                                    default 2 if BSP_PWM1_SOCA_ET_2ND
                                    default 3 if BSP_PWM1_SOCA_ET_3RD
                            endif
                    endmenu
                endif
            menuconfig BSP_USING_PWM2
                bool "Enable ePWM2"
                default n
                if BSP_USING_PWM2
                    menu "Basic settings for PWM2"
                        config BSP_PWM2_INIT_PERIOD
                            int "Initial period for PWM2(ns)"
                            default 10000
                        config BSP_PWM2_INIT_PULSE
                            int "Initial pulse for PWM2(ns)"
                            default 1000
                    endmenu
                    menu "Advanced Settings for PWM2"
                        menuconfig BSP_PWM2_PHASE_ENABLE
                            bool "Enable phase"
                            default n
                            if BSP_PWM2_PHASE_ENABLE
                                choice BSP_PWM2_SEL
                                    prompt "Select master or slave"
                                    default BSP_PWM2_SLAVE
                                    config BSP_PWM2_MASTER
                                        bool "Master"
                                    config BSP_PWM2_SLAVE
                                        bool "Slave"
                                endchoice
                                if BSP_PWM2_MASTER
                                    config BSP_PWM2_PHASE
                                        int
                                        default 0
                                endif
                                if BSP_PWM2_SLAVE
                                    config BSP_PWM2_PHASE
                                        int "Phase, 0~360"
                                        range 0 360
                                        default 0
                                        help
                                            the phase for PWM2 module
                                endif
                            endif

                        menuconfig BSP_PWM2_IT_ENABLE
                            bool "Enable interrupt service"
                            default n
                            if BSP_PWM2_IT_ENABLE
                                choice BSP_PWM2_INTSEL_ET_SEL
                                    prompt "Select interrupt time"
                                    default BSP_PWM2_INTSEL_ET_CTR_ZERO
                                    config BSP_PWM2_INTSEL_ET_DCAEVT1SOC
                                        bool "DCAEVT1SOC"
                                    config BSP_PWM2_INTSEL_ET_CTR_ZERO
                                        bool "ctr == zero"
                                    config BSP_PWM2_INTSEL_ET_CTR_PRD
                                        bool "ctr == prd"
                                    config BSP_PWM2_INTSEL_ET_CTR_PRDZERO
                                        bool "ctr == prd or ctr == zero"
                                    config BSP_PWM2_INTSEL_ET_CTRU_CMPA
                                        bool "ctr == compa when counting up"
                                    config BSP_PWM2_INTSEL_ET_CTRD_CMPA
                                        bool "ctr == compa when counting down"
                                    config BSP_PWM2_INTSEL_ET_CTRU_CMPB
                                        bool "ctr == compb when counting up"
                                    config BSP_PWM2_INTSEL_ET_CTRD_CMPB
                                        bool "ctr == compb when counting down"
                                endchoice

                                config BSP_PWM2_INTSEL
                                    int
                                    default 0 if BSP_PWM2_INTSEL_ET_DCAEVT1SOC
                                    default 1 if BSP_PWM2_INTSEL_ET_CTR_ZERO
                                    default 2 if BSP_PWM2_INTSEL_ET_CTR_PRD
                                    default 3 if BSP_PWM2_INTSEL_ET_CTR_PRDZERO
                                    default 4 if BSP_PWM2_INTSEL_ET_CTRU_CMPA
                                    default 5 if BSP_PWM2_INTSEL_ET_CTRD_CMPA
                                    default 6 if BSP_PWM2_INTSEL_ET_CTRU_CMPB
                                    default 7 if BSP_PWM2_INTSEL_ET_CTRD_CMPB
                                choice BSP_PWM2_INT_ET_SEL
                                    prompt "Interrupt generation time"
                                    default BSP_PWM2_INT_ET_1ST
                                    config BSP_PWM2_INT_ET_DISABLE
                                        bool "disable PWM interrupt"
                                    config BSP_PWM2_INT_ET_1ST
                                        bool "generate interrupt at the first time"
                                    config BSP_PWM2_INT_ET_2ND
                                        bool "generate interrupt at the second time"
                                    config BSP_PWM2_INT_ET_3RD
                                        bool "generate interrupt at the third time"
                                endchoice
                                config BSP_PWM2_INTPRD
                                    int
                                    default 0 if BSP_PWM2_INT_ET_DISABLE
                                    default 1 if BSP_PWM2_INT_ET_1ST
                                    default 2 if BSP_PWM2_INT_ET_2ND
                                    default 3 if BSP_PWM2_INT_ET_3RD
                            endif
                        choice BSP_PWM2_HSPCLKDIV_SEL
                            prompt "HSP Clock division"
                            default BSP_PWM2_HSPCLKDIV1
                            config BSP_PWM2_HSPCLKDIV1
                                bool "Clock Divided by 1"
                            config BSP_PWM2_HSPCLKDIV2
                                bool "Clock Divided by 2"
                            config BSP_PWM2_HSPCLKDIV4
                                bool "Clock Divided by 4"
                        endchoice
                        config BSP_PWM2_HSPCLKDIV
                            int
                            default 0 if BSP_PWM2_HSPCLKDIV1
                            default 1 if BSP_PWM2_HSPCLKDIV2
                            default 2 if BSP_PWM2_HSPCLKDIV4
                        choice BSP_PWM2_CLKDIV_SEL
                            prompt "Clock division"
                            default BSP_PWM2_CLKDIV1
                            config BSP_PWM2_CLKDIV1
                                bool "Clock Divided by 1"
                            config BSP_PWM2_CLKDIV2
                                bool "Clock Divided by 2"
                            config BSP_PWM2_CLKDIV4
                                bool "Clock Divided by 4"
                        endchoice
                        config BSP_PWM2_CLKDIV
                            int
                            default 0 if BSP_PWM2_CLKDIV1
                            default 1 if BSP_PWM2_CLKDIV2
                            default 2 if BSP_PWM2_CLKDIV4
                        choice BSP_PWM2_CTR_SEL
                            default BSP_PWM2_CTR_MODE_UPDOWN
                            prompt "Select counter mode"
                            config BSP_PWM2_CTR_MODE_UPDOWN
                                bool "Up-down mode"
                            config BSP_PWM2_CTR_MODE_UP
                                bool "Up mode"
                            config BSP_PWM2_CTR_MODE_DOWN
                                bool "Down mode"
                            config BSP_PWM2_CTR_FREEZE
                                bool "Freezing Counter"
                        endchoice
                        config BSP_PWM2_CTRMODE
                            int
                            default 0 if BSP_PWM2_CTR_MODE_UP
                            default 1 if BSP_PWM2_CTR_MODE_DOWN
                            default 2 if BSP_PWM2_CTR_MODE_UPDOWN
                            default 3 if BSP_PWM2_CTR_FREEZE
                        choice BSP_PWM2_CC_SEL
                            prompt "Register load mode"
                            config BSP_PWM2_CC_CTR_ZERO
                                bool "Load when counter == 0"
                            config BSP_PWM2_CC_CTR_PRD
                                bool "Load when counter == prd"
                            config BSP_PWM2_CC_CTR_ZERO_PRD
                                bool "load when counter ==0 or counter == prd"
                            config BSP_PWM2_CC_LD_DISABLE
                                bool "disable load"
                        endchoice

                        config BSP_PWM2_LOADAMODE
                            int
                            default 0 if BSP_PWM2_CC_CTR_ZERO
                            default 1 if BSP_PWM2_CC_CTR_PRD
                            default 2 if BSP_PWM2_CC_CTR_ZERO_PRD
                            default 3 if BSP_PWM2_CC_LD_DISABLE

                        config BSP_PWM2_DB
                            int "Dead time(ns)"
                            default 100
                            range 0 100000
                        menuconfig BSP_PWM2_ADC_TRIGGER
                            bool "Enable ADC trigger from PWM2"
                            if BSP_PWM2_ADC_TRIGGER
                                choice BSP_PWM2_SOCASEL_ET_SEL
                                    prompt "Select soc triggering time"
                                    default BSP_PWM2_SOCASEL_ET_CTR_ZERO
                                    config BSP_PWM2_SOCASEL_ET_DCAEVT1SOC
                                        bool "DCAEVT1SOC"
                                    config BSP_PWM2_SOCASEL_ET_CTR_ZERO
                                        bool "ctr == zero"
                                    config BSP_PWM2_SOCASEL_ET_CTR_PRD
                                        bool "ctr == prd"
                                    config BSP_PWM2_SOCASEL_ET_CTR_PRDZERO
                                        bool "ctr == prd or ctr == zero"
                                    config BSP_PWM2_SOCASEL_ET_CTRU_CMPA
                                        bool "ctr == compa when counting up"
                                    config BSP_PWM2_SOCASEL_ET_CTRD_CMPA
                                        bool "ctr == compa when counting down"
                                    config BSP_PWM2_SOCASEL_ET_CTRU_CMPB
                                        bool "ctr == compb when counting up"
                                    config BSP_PWM2_SOCASEL_ET_CTRD_CMPB
                                        bool "ctr == compb when counting down"
                                endchoice

                                config BSP_PWM2_SOCASEL
                                    int
                                    default 0 if BSP_PWM2_SOCASEL_ET_DCAEVT1SOC
                                    default 1 if BSP_PWM2_SOCASEL_ET_CTR_ZERO
                                    default 2 if BSP_PWM2_SOCASEL_ET_CTR_PRD
                                    default 3 if BSP_PWM2_SOCASEL_ET_CTR_PRDZERO
                                    default 4 if BSP_PWM2_SOCASEL_ET_CTRU_CMPA
                                    default 5 if BSP_PWM2_SOCASEL_ET_CTRD_CMPA
                                    default 6 if BSP_PWM2_SOCASEL_ET_CTRU_CMPB
                                    default 7 if BSP_PWM2_SOCASEL_ET_CTRD_CMPB
                                choice BSP_PWM2_SOCA_ET_SEL
                                    prompt "SOCA generation time"
                                    default BSP_PWM2_SOCA_ET_1ST
                                    config BSP_PWM2_SOCA_ET_DISABLE
                                        bool "disable soc generation"
                                    config BSP_PWM2_SOCA_ET_1ST
                                        bool "generate soc at the first time"
                                    config BSP_PWM2_SOCA_ET_2ND
                                        bool "generate soc at the second time"
                                    config BSP_PWM2_SOCA_ET_3RD
                                        bool "generate soc at the third time"
                                endchoice
                                config BSP_PWM2_SOCAPRD
                                    int
                                    default 0 if BSP_PWM2_SOCA_ET_DISABLE
                                    default 1 if BSP_PWM2_SOCA_ET_1ST
                                    default 2 if BSP_PWM2_SOCA_ET_2ND
                                    default 3 if BSP_PWM2_SOCA_ET_3RD
                            endif
                    endmenu
                endif
            menuconfig BSP_USING_PWM3
                bool "Enable ePWM3"
                default n
                if BSP_USING_PWM3
                    menu "Basic settings for PWM3"
                        config BSP_PWM3_INIT_PERIOD
                            int "Initial period for PWM3(ns)"
                            default 10000
                        config BSP_PWM3_INIT_PULSE
                            int "Initial pulse for PWM3(ns)"
                            default 1000
                    endmenu
                    menu "Advanced Settings for PWM3"
                        menuconfig BSP_PWM3_PHASE_ENABLE
                            bool "Enable phase"
                            default n
                            if BSP_PWM3_PHASE_ENABLE
                                choice BSP_PWM3_SEL
                                    prompt "Select master or slave"
                                    default BSP_PWM3_SLAVE
                                    config BSP_PWM3_MASTER
                                        bool "Master"
                                    config BSP_PWM3_SLAVE
                                        bool "Slave"
                                endchoice
                                if BSP_PWM3_MASTER
                                    config BSP_PWM3_PHASE
                                        int
                                        default 0
                                endif
                                if BSP_PWM3_SLAVE
                                    config BSP_PWM3_PHASE
                                        int "Phase, 0~360"
                                        range 0 360
                                        default 0
                                        help
                                            the phase for PWM3 module
                                endif
                            endif

                        menuconfig BSP_PWM3_IT_ENABLE
                            bool "Enable interrupt service"
                            default n
                            if BSP_PWM3_IT_ENABLE
                                choice BSP_PWM3_INTSEL_ET_SEL
                                    prompt "Select interrupt time"
                                    default BSP_PWM3_INTSEL_ET_CTR_ZERO
                                    config BSP_PWM3_INTSEL_ET_DCAEVT1SOC
                                        bool "DCAEVT1SOC"
                                    config BSP_PWM3_INTSEL_ET_CTR_ZERO
                                        bool "ctr == zero"
                                    config BSP_PWM3_INTSEL_ET_CTR_PRD
                                        bool "ctr == prd"
                                    config BSP_PWM3_INTSEL_ET_CTR_PRDZERO
                                        bool "ctr == prd or ctr == zero"
                                    config BSP_PWM3_INTSEL_ET_CTRU_CMPA
                                        bool "ctr == compa when counting up"
                                    config BSP_PWM3_INTSEL_ET_CTRD_CMPA
                                        bool "ctr == compa when counting down"
                                    config BSP_PWM3_INTSEL_ET_CTRU_CMPB
                                        bool "ctr == compb when counting up"
                                    config BSP_PWM3_INTSEL_ET_CTRD_CMPB
                                        bool "ctr == compb when counting down"
                                endchoice

                                config BSP_PWM3_INTSEL
                                    int
                                    default 0 if BSP_PWM3_INTSEL_ET_DCAEVT1SOC
                                    default 1 if BSP_PWM3_INTSEL_ET_CTR_ZERO
                                    default 2 if BSP_PWM3_INTSEL_ET_CTR_PRD
                                    default 3 if BSP_PWM3_INTSEL_ET_CTR_PRDZERO
                                    default 4 if BSP_PWM3_INTSEL_ET_CTRU_CMPA
                                    default 5 if BSP_PWM3_INTSEL_ET_CTRD_CMPA
                                    default 6 if BSP_PWM3_INTSEL_ET_CTRU_CMPB
                                    default 7 if BSP_PWM3_INTSEL_ET_CTRD_CMPB
                                choice BSP_PWM3_INT_ET_SEL
                                    prompt "Interrupt generation time"
                                    default BSP_PWM3_INT_ET_1ST
                                    config BSP_PWM3_INT_ET_DISABLE
                                        bool "disable PWM interrupt"
                                    config BSP_PWM3_INT_ET_1ST
                                        bool "generate interrupt at the first time"
                                    config BSP_PWM3_INT_ET_2ND
                                        bool "generate interrupt at the second time"
                                    config BSP_PWM3_INT_ET_3RD
                                        bool "generate interrupt at the third time"
                                endchoice
                                config BSP_PWM3_INTPRD
                                    int
                                    default 0 if BSP_PWM3_INT_ET_DISABLE
                                    default 1 if BSP_PWM3_INT_ET_1ST
                                    default 2 if BSP_PWM3_INT_ET_2ND
                                    default 3 if BSP_PWM3_INT_ET_3RD
                            endif
                        choice BSP_PWM3_HSPCLKDIV_SEL
                            prompt "HSP Clock division"
                            default BSP_PWM3_HSPCLKDIV1
                            config BSP_PWM3_HSPCLKDIV1
                                bool "Clock Divided by 1"
                            config BSP_PWM3_HSPCLKDIV2
                                bool "Clock Divided by 2"
                            config BSP_PWM3_HSPCLKDIV4
                                bool "Clock Divided by 4"
                        endchoice
                        config BSP_PWM3_HSPCLKDIV
                            int
                            default 0 if BSP_PWM3_HSPCLKDIV1
                            default 1 if BSP_PWM3_HSPCLKDIV2
                            default 2 if BSP_PWM3_HSPCLKDIV4
                        choice BSP_PWM3_CLKDIV_SEL
                            prompt "Clock division"
                            default BSP_PWM3_CLKDIV1
                            config BSP_PWM3_CLKDIV1
                                bool "Clock Divided by 1"
                            config BSP_PWM3_CLKDIV2
                                bool "Clock Divided by 2"
                            config BSP_PWM3_CLKDIV4
                                bool "Clock Divided by 4"
                        endchoice
                        config BSP_PWM3_CLKDIV
                            int
                            default 0 if BSP_PWM3_CLKDIV1
                            default 1 if BSP_PWM3_CLKDIV2
                            default 2 if BSP_PWM3_CLKDIV4
                        choice BSP_PWM3_CTR_SEL
                            default BSP_PWM3_CTR_MODE_UPDOWN
                            prompt "Select counter mode"
                            config BSP_PWM3_CTR_MODE_UPDOWN
                                bool "Up-down mode"
                            config BSP_PWM3_CTR_MODE_UP
                                bool "Up mode"
                            config BSP_PWM3_CTR_MODE_DOWN
                                bool "Down mode"
                            config BSP_PWM3_CTR_FREEZE
                                bool "Freezing Counter"
                        endchoice
                        config BSP_PWM3_CTRMODE
                            int
                            default 0 if BSP_PWM3_CTR_MODE_UP
                            default 1 if BSP_PWM3_CTR_MODE_DOWN
                            default 2 if BSP_PWM3_CTR_MODE_UPDOWN
                            default 3 if BSP_PWM3_CTR_FREEZE
                        choice BSP_PWM3_CC_SEL
                            prompt "Register load mode"
                            config BSP_PWM3_CC_CTR_ZERO
                                bool "Load when counter == 0"
                            config BSP_PWM3_CC_CTR_PRD
                                bool "Load when counter == prd"
                            config BSP_PWM3_CC_CTR_ZERO_PRD
                                bool "load when counter ==0 or counter == prd"
                            config BSP_PWM3_CC_LD_DISABLE
                                bool "disable load"
                        endchoice

                        config BSP_PWM3_LOADAMODE
                            int
                            default 0 if BSP_PWM3_CC_CTR_ZERO
                            default 1 if BSP_PWM3_CC_CTR_PRD
                            default 2 if BSP_PWM3_CC_CTR_ZERO_PRD
                            default 3 if BSP_PWM3_CC_LD_DISABLE

                        config BSP_PWM3_DB
                            int "Dead time(ns)"
                            default 100
                            range 0 100000
                        menuconfig BSP_PWM3_ADC_TRIGGER
                            bool "Enable ADC trigger from PWM3"
                            if BSP_PWM3_ADC_TRIGGER
                                choice BSP_PWM3_SOCASEL_ET_SEL
                                    prompt "Select soc triggering time"
                                    default BSP_PWM3_SOCASEL_ET_CTR_ZERO
                                    config BSP_PWM3_SOCASEL_ET_DCAEVT1SOC
                                        bool "DCAEVT1SOC"
                                    config BSP_PWM3_SOCASEL_ET_CTR_ZERO
                                        bool "ctr == zero"
                                    config BSP_PWM3_SOCASEL_ET_CTR_PRD
                                        bool "ctr == prd"
                                    config BSP_PWM3_SOCASEL_ET_CTR_PRDZERO
                                        bool "ctr == prd or ctr == zero"
                                    config BSP_PWM3_SOCASEL_ET_CTRU_CMPA
                                        bool "ctr == compa when counting up"
                                    config BSP_PWM3_SOCASEL_ET_CTRD_CMPA
                                        bool "ctr == compa when counting down"
                                    config BSP_PWM3_SOCASEL_ET_CTRU_CMPB
                                        bool "ctr == compb when counting up"
                                    config BSP_PWM3_SOCASEL_ET_CTRD_CMPB
                                        bool "ctr == compb when counting down"
                                endchoice

                                config BSP_PWM3_SOCASEL
                                    int
                                    default 0 if BSP_PWM3_SOCASEL_ET_DCAEVT1SOC
                                    default 1 if BSP_PWM3_SOCASEL_ET_CTR_ZERO
                                    default 2 if BSP_PWM3_SOCASEL_ET_CTR_PRD
                                    default 3 if BSP_PWM3_SOCASEL_ET_CTR_PRDZERO
                                    default 4 if BSP_PWM3_SOCASEL_ET_CTRU_CMPA
                                    default 5 if BSP_PWM3_SOCASEL_ET_CTRD_CMPA
                                    default 6 if BSP_PWM3_SOCASEL_ET_CTRU_CMPB
                                    default 7 if BSP_PWM3_SOCASEL_ET_CTRD_CMPB
                                choice BSP_PWM3_SOCA_ET_SEL
                                    prompt "SOCA generation time"
                                    default BSP_PWM3_SOCA_ET_1ST
                                    config BSP_PWM3_SOCA_ET_DISABLE
                                        bool "disable soc generation"
                                    config BSP_PWM3_SOCA_ET_1ST
                                        bool "generate soc at the first time"
                                    config BSP_PWM3_SOCA_ET_2ND
                                        bool "generate soc at the second time"
                                    config BSP_PWM3_SOCA_ET_3RD
                                        bool "generate soc at the third time"
                                endchoice
                                config BSP_PWM3_SOCAPRD
                                    int
                                    default 0 if BSP_PWM3_SOCA_ET_DISABLE
                                    default 1 if BSP_PWM3_SOCA_ET_1ST
                                    default 2 if BSP_PWM3_SOCA_ET_2ND
                                    default 3 if BSP_PWM3_SOCA_ET_3RD
                            endif
                    endmenu
                endif
            menuconfig BSP_USING_PWM4
                bool "Enable ePWM4"
                default n
                if BSP_USING_PWM4
                    menu "Basic settings for PWM4"
                        config BSP_PWM4_INIT_PERIOD
                            int "Initial period for PWM4(ns)"
                            default 10000
                        config BSP_PWM4_INIT_PULSE
                            int "Initial pulse for PWM4(ns)"
                            default 1000
                    endmenu
                    menu "Advanced Settings for PWM4"
                        menuconfig BSP_PWM4_PHASE_ENABLE
                            bool "Enable phase"
                            default n
                            if BSP_PWM4_PHASE_ENABLE
                                choice BSP_PWM4_SEL
                                    prompt "Select master or slave"
                                    default BSP_PWM4_SLAVE
                                    config BSP_PWM4_MASTER
                                        bool "Master"
                                    config BSP_PWM4_SLAVE
                                        bool "Slave"
                                endchoice
                                if BSP_PWM4_MASTER
                                    config BSP_PWM4_PHASE
                                        int
                                        default 0
                                endif
                                if BSP_PWM4_SLAVE
                                    config BSP_PWM4_PHASE
                                        int "Phase, 0~360"
                                        range 0 360
                                        default 0
                                        help
                                            the phase for PWM4 module
                                endif
                            endif

                        menuconfig BSP_PWM4_IT_ENABLE
                            bool "Enable interrupt service"
                            default n
                            if BSP_PWM4_IT_ENABLE
                                choice BSP_PWM4_INTSEL_ET_SEL
                                    prompt "Select interrupt time"
                                    default BSP_PWM4_INTSEL_ET_CTR_ZERO
                                    config BSP_PWM4_INTSEL_ET_DCAEVT1SOC
                                        bool "DCAEVT1SOC"
                                    config BSP_PWM4_INTSEL_ET_CTR_ZERO
                                        bool "ctr == zero"
                                    config BSP_PWM4_INTSEL_ET_CTR_PRD
                                        bool "ctr == prd"
                                    config BSP_PWM4_INTSEL_ET_CTR_PRDZERO
                                        bool "ctr == prd or ctr == zero"
                                    config BSP_PWM4_INTSEL_ET_CTRU_CMPA
                                        bool "ctr == compa when counting up"
                                    config BSP_PWM4_INTSEL_ET_CTRD_CMPA
                                        bool "ctr == compa when counting down"
                                    config BSP_PWM4_INTSEL_ET_CTRU_CMPB
                                        bool "ctr == compb when counting up"
                                    config BSP_PWM4_INTSEL_ET_CTRD_CMPB
                                        bool "ctr == compb when counting down"
                                endchoice

                                config BSP_PWM4_INTSEL
                                    int
                                    default 0 if BSP_PWM4_INTSEL_ET_DCAEVT1SOC
                                    default 1 if BSP_PWM4_INTSEL_ET_CTR_ZERO
                                    default 2 if BSP_PWM4_INTSEL_ET_CTR_PRD
                                    default 3 if BSP_PWM4_INTSEL_ET_CTR_PRDZERO
                                    default 4 if BSP_PWM4_INTSEL_ET_CTRU_CMPA
                                    default 5 if BSP_PWM4_INTSEL_ET_CTRD_CMPA
                                    default 6 if BSP_PWM4_INTSEL_ET_CTRU_CMPB
                                    default 7 if BSP_PWM4_INTSEL_ET_CTRD_CMPB
                                choice BSP_PWM4_INT_ET_SEL
                                    prompt "Interrupt generation time"
                                    default BSP_PWM4_INT_ET_1ST
                                    config BSP_PWM4_INT_ET_DISABLE
                                        bool "disable PWM interrupt"
                                    config BSP_PWM4_INT_ET_1ST
                                        bool "generate interrupt at the first time"
                                    config BSP_PWM4_INT_ET_2ND
                                        bool "generate interrupt at the second time"
                                    config BSP_PWM4_INT_ET_3RD
                                        bool "generate interrupt at the third time"
                                endchoice
                                config BSP_PWM4_INTPRD
                                    int
                                    default 0 if BSP_PWM4_INT_ET_DISABLE
                                    default 1 if BSP_PWM4_INT_ET_1ST
                                    default 2 if BSP_PWM4_INT_ET_2ND
                                    default 3 if BSP_PWM4_INT_ET_3RD
                            endif
                        choice BSP_PWM4_HSPCLKDIV_SEL
                            prompt "HSP Clock division"
                            default BSP_PWM4_HSPCLKDIV1
                            config BSP_PWM4_HSPCLKDIV1
                                bool "Clock Divided by 1"
                            config BSP_PWM4_HSPCLKDIV2
                                bool "Clock Divided by 2"
                            config BSP_PWM4_HSPCLKDIV4
                                bool "Clock Divided by 4"
                        endchoice
                        config BSP_PWM4_HSPCLKDIV
                            int
                            default 0 if BSP_PWM4_HSPCLKDIV1
                            default 1 if BSP_PWM4_HSPCLKDIV2
                            default 2 if BSP_PWM4_HSPCLKDIV4
                        choice BSP_PWM4_CLKDIV_SEL
                            prompt "Clock division"
                            default BSP_PWM4_CLKDIV1
                            config BSP_PWM4_CLKDIV1
                                bool "Clock Divided by 1"
                            config BSP_PWM4_CLKDIV2
                                bool "Clock Divided by 2"
                            config BSP_PWM4_CLKDIV4
                                bool "Clock Divided by 4"
                        endchoice
                        config BSP_PWM4_CLKDIV
                            int
                            default 0 if BSP_PWM4_CLKDIV1
                            default 1 if BSP_PWM4_CLKDIV2
                            default 2 if BSP_PWM4_CLKDIV4
                        choice BSP_PWM4_CTR_SEL
                            default BSP_PWM4_CTR_MODE_UPDOWN
                            prompt "Select counter mode"
                            config BSP_PWM4_CTR_MODE_UPDOWN
                                bool "Up-down mode"
                            config BSP_PWM4_CTR_MODE_UP
                                bool "Up mode"
                            config BSP_PWM4_CTR_MODE_DOWN
                                bool "Down mode"
                            config BSP_PWM4_CTR_FREEZE
                                bool "Freezing Counter"
                        endchoice
                        config BSP_PWM4_CTRMODE
                            int
                            default 0 if BSP_PWM4_CTR_MODE_UP
                            default 1 if BSP_PWM4_CTR_MODE_DOWN
                            default 2 if BSP_PWM4_CTR_MODE_UPDOWN
                            default 3 if BSP_PWM4_CTR_FREEZE
                        choice BSP_PWM4_CC_SEL
                            prompt "Register load mode"
                            config BSP_PWM4_CC_CTR_ZERO
                                bool "Load when counter == 0"
                            config BSP_PWM4_CC_CTR_PRD
                                bool "Load when counter == prd"
                            config BSP_PWM4_CC_CTR_ZERO_PRD
                                bool "load when counter ==0 or counter == prd"
                            config BSP_PWM4_CC_LD_DISABLE
                                bool "disable load"
                        endchoice

                        config BSP_PWM4_LOADAMODE
                            int
                            default 0 if BSP_PWM4_CC_CTR_ZERO
                            default 1 if BSP_PWM4_CC_CTR_PRD
                            default 2 if BSP_PWM4_CC_CTR_ZERO_PRD
                            default 3 if BSP_PWM4_CC_LD_DISABLE

                        config BSP_PWM4_DB
                            int "Dead time(ns)"
                            default 100
                            range 0 100000
                        menuconfig BSP_PWM4_ADC_TRIGGER
                            bool "Enable ADC trigger from PWM4"
                            if BSP_PWM4_ADC_TRIGGER
                                choice BSP_PWM4_SOCASEL_ET_SEL
                                    prompt "Select soc triggering time"
                                    default BSP_PWM4_SOCASEL_ET_CTR_ZERO
                                    config BSP_PWM4_SOCASEL_ET_DCAEVT1SOC
                                        bool "DCAEVT1SOC"
                                    config BSP_PWM4_SOCASEL_ET_CTR_ZERO
                                        bool "ctr == zero"
                                    config BSP_PWM4_SOCASEL_ET_CTR_PRD
                                        bool "ctr == prd"
                                    config BSP_PWM4_SOCASEL_ET_CTR_PRDZERO
                                        bool "ctr == prd or ctr == zero"
                                    config BSP_PWM4_SOCASEL_ET_CTRU_CMPA
                                        bool "ctr == compa when counting up"
                                    config BSP_PWM4_SOCASEL_ET_CTRD_CMPA
                                        bool "ctr == compa when counting down"
                                    config BSP_PWM4_SOCASEL_ET_CTRU_CMPB
                                        bool "ctr == compb when counting up"
                                    config BSP_PWM4_SOCASEL_ET_CTRD_CMPB
                                        bool "ctr == compb when counting down"
                                endchoice

                                config BSP_PWM4_SOCASEL
                                    int
                                    default 0 if BSP_PWM4_SOCASEL_ET_DCAEVT1SOC
                                    default 1 if BSP_PWM4_SOCASEL_ET_CTR_ZERO
                                    default 2 if BSP_PWM4_SOCASEL_ET_CTR_PRD
                                    default 3 if BSP_PWM4_SOCASEL_ET_CTR_PRDZERO
                                    default 4 if BSP_PWM4_SOCASEL_ET_CTRU_CMPA
                                    default 5 if BSP_PWM4_SOCASEL_ET_CTRD_CMPA
                                    default 6 if BSP_PWM4_SOCASEL_ET_CTRU_CMPB
                                    default 7 if BSP_PWM4_SOCASEL_ET_CTRD_CMPB
                                choice BSP_PWM4_SOCA_ET_SEL
                                    prompt "SOCA generation time"
                                    default BSP_PWM4_SOCA_ET_1ST
                                    config BSP_PWM4_SOCA_ET_DISABLE
                                        bool "disable soc generation"
                                    config BSP_PWM4_SOCA_ET_1ST
                                        bool "generate soc at the first time"
                                    config BSP_PWM4_SOCA_ET_2ND
                                        bool "generate soc at the second time"
                                    config BSP_PWM4_SOCA_ET_3RD
                                        bool "generate soc at the third time"
                                endchoice
                                config BSP_PWM4_SOCAPRD
                                    int
                                    default 0 if BSP_PWM4_SOCA_ET_DISABLE
                                    default 1 if BSP_PWM4_SOCA_ET_1ST
                                    default 2 if BSP_PWM4_SOCA_ET_2ND
                                    default 3 if BSP_PWM4_SOCA_ET_3RD
                            endif
                    endmenu
                endif
        endif

    menuconfig BSP_USING_ADC
        bool "Enable ADC"
        default n
        select RT_USING_ADC
        if BSP_USING_ADC
            menuconfig BSP_USING_ADC1
                bool "Enable ADC1"
                default n
                if BSP_USING_ADC1
                    choice BSP_ADC1_RES_SEL
                        prompt "Select resolution"
                        default BSP_ADC_USING_12BIT

                        config BSP_ADC_USING_12BIT
                            bool "ADC Using 12 bit resolution"

                        config BSP_ADC_USING_16BIT
                            bool "ADC Using 16 bit resolution"
                    endchoice
                endif
            menuconfig BSP_USING_ADC2
                bool "Enable ADC2"
                default n
                if BSP_USING_ADC2
                    choice BSP_ADC2_RES_SEL
                        prompt "Select resolution"
                        default BSP_ADC_USING_12BIT

                        config BSP_ADC_USING_12BIT
                            bool "ADC Using 12 bit resolution"

                        config BSP_ADC_USING_16BIT
                            bool "ADC Using 16 bit resolution"
                    endchoice
                endif
            menuconfig BSP_USING_ADC3
                bool "Enable ADC3"
                default n
                if BSP_USING_ADC3
                    choice BSP_ADC3_RES_SEL
                        prompt "Select resolution"
                        default BSP_ADC_USING_12BIT

                        config BSP_ADC_USING_12BIT
                            bool "ADC Using 12 bit resolution"

                        config BSP_ADC_USING_16BIT
                            bool "ADC Using 16 bit resolution"
                    endchoice
                endif
        endif

    menuconfig BSP_USING_ONCHIP_RTC
        bool "Enable RTC"
        select RT_USING_RTC
        default n
        if BSP_USING_ONCHIP_RTC
            choice BSP_RTC_LS_SEL
                prompt "Select clock source"
                default BSP_RTC_USING_LSE

                config BSP_RTC_USING_LSE
                    bool "RTC USING LSE"

                config BSP_RTC_USING_LSI
                    bool "RTC USING LSI"
            endchoice
        endif

    config BSP_USING_WDT
        bool "Enable Watchdog Timer"
        select RT_USING_WDT
        default n

    config BSP_USING_SDIO
        bool "Enable SDIO"
        select RT_USING_SDIO
        select RT_USING_DFS
        default n

    menuconfig BSP_USING_CAN
        bool "Enable CAN"
        default n
        select RT_USING_CAN
        if BSP_USING_CAN
            config BSP_USING_CAN1
                bool "using CAN1"
                default n
        endif

    config BSP_USING_USBD
        bool "Enable USB device"
        select RT_USING_USB_DEVICE
        default n
        if BSP_USING_USBD
            config BSP_USB_CONNECT_PIN
                int "USB connect pin"
                default 67

            config BSP_USB_PULL_UP_STATUS
                int "USB PULL UP STATUS"
                default 0
        endif
endmenu

menu "Board extended module Drivers"

endmenu

endmenu