1menu "Hardware Drivers Config" 2 3menu "Onboard Peripheral Drivers" 4endmenu 5 6menu "On-chip Peripheral Drivers" 7 config BSP_USING_FLASH 8 bool "Using FLASH as CMD, default RAM" 9 default n 10 config BSP_USING_GPIO 11 bool "Enable GPIO" 12 select RT_USING_PIN 13 default y 14 menuconfig BSP_USING_XINT 15 bool "Enable external interrupt" 16 default n 17 if BSP_USING_XINT 18 menuconfig BSP_USING_XINT1 19 bool "Enable XINT1" 20 if BSP_USING_XINT1 21 config BSP_XINT1_PIN 22 int "Interrupt pin" 23 range 0 168 24 default 0 25 endif 26 if !BSP_USING_XINT1 27 config BSP_XINT1_PIN 28 int 29 default -1 30 endif 31 menuconfig BSP_USING_XINT2 32 bool "Enable XINT2" 33 if BSP_USING_XINT2 34 config BSP_XINT2_PIN 35 int "Interrupt pin" 36 range 0 168 37 default 0 38 endif 39 if !BSP_USING_XINT2 40 config BSP_XINT2_PIN 41 int 42 default -1 43 endif 44 menuconfig BSP_USING_XINT3 45 bool "Enable XINT3" 46 if BSP_USING_XINT3 47 config BSP_XINT3_PIN 48 int "Interrupt pin" 49 range 0 168 50 default 0 51 endif 52 if !BSP_USING_XINT3 53 config BSP_XINT3_PIN 54 int 55 default -1 56 endif 57 menuconfig BSP_USING_XINT4 58 bool "Enable XINT4" 59 if BSP_USING_XINT4 60 config BSP_XINT4_PIN 61 int "Interrupt pin" 62 range 0 168 63 default 0 64 endif 65 if !BSP_USING_XINT4 66 config BSP_XINT4_PIN 67 int 68 default -1 69 endif 70 if !BSP_USING_XINT5 71 config BSP_XINT5_PIN 72 int 73 default -1 74 endif 75 menuconfig BSP_USING_XINT5 76 bool "Enable XINT5" 77 if BSP_USING_XINT5 78 config BSP_XINT5_PIN 79 int "Interrupt pin" 80 range 0 168 81 default 0 82 endif 83 endif 84 menuconfig BSP_USING_UART 85 bool "Enable UART" 86 default y 87 select RT_USING_SERIAL 88 if BSP_USING_UART 89 config BSP_USING_UART1 90 bool "Enable UART1" 91 default y 92 endif 93 menuconfig BSP_USING_PWM 94 bool "Enable PWM" 95 default n 96 select RT_USING_PWM 97 98 if BSP_USING_PWM 99 menuconfig BSP_USING_PWM1 100 bool "Enable ePWM1" 101 default y 102 if BSP_USING_PWM1 103 menu "Basic settings for PWM1" 104 config BSP_PWM1_INIT_PERIOD 105 int "Initial period for PWM1(ns)" 106 default 10000 107 config BSP_PWM1_INIT_PULSE 108 int "Initial pulse for PWM1(ns)" 109 default 1000 110 endmenu 111 menu "Advanced Settings for PWM1" 112 menuconfig BSP_PWM1_PHASE_ENABLE 113 bool "Enable phase" 114 default n 115 if BSP_PWM1_PHASE_ENABLE 116 choice 117 prompt "Select master or slave" 118 default BSP_PWM1_MASTER 119 config BSP_PWM1_MASTER 120 bool "Master" 121 config BSP_PWM1_SLAVE 122 bool "Slave" 123 endchoice 124 if BSP_PWM1_MASTER 125 config BSP_PWM1_PHASE 126 int 127 default 0 128 endif 129 if BSP_PWM1_SLAVE 130 config BSP_PWM1_PHASE 131 int "Phase, 0~360" 132 range 0 360 133 default 0 134 help 135 the phase for PWM1 module 136 endif 137 endif 138 139 menuconfig BSP_PWM1_IT_ENABLE 140 bool "Enable interrupt service" 141 default n 142 if BSP_PWM1_IT_ENABLE 143 choice 144 prompt "Select interrupt time" 145 default BSP_PWM1_INTSEL_ET_CTR_ZERO 146 config BSP_PWM1_INTSEL_ET_DCAEVT1SOC 147 bool "DCAEVT1SOC" 148 config BSP_PWM1_INTSEL_ET_CTR_ZERO 149 bool "ctr == zero" 150 config BSP_PWM1_INTSEL_ET_CTR_PRD 151 bool "ctr == prd" 152 config BSP_PWM1_INTSEL_ET_CTR_PRDZERO 153 bool "ctr == prd or ctr == zero" 154 config BSP_PWM1_INTSEL_ET_CTRU_CMPA 155 bool "ctr == compa when counting up" 156 config BSP_PWM1_INTSEL_ET_CTRD_CMPA 157 bool "ctr == compa when counting down" 158 config BSP_PWM1_INTSEL_ET_CTRU_CMPB 159 bool "ctr == compb when counting up" 160 config BSP_PWM1_INTSEL_ET_CTRD_CMPB 161 bool "ctr == compb when counting down" 162 endchoice 163 164 config BSP_PWM1_INTSEL 165 int 166 default 0 if BSP_PWM1_INTSEL_ET_DCAEVT1SOC 167 default 1 if BSP_PWM1_INTSEL_ET_CTR_ZERO 168 default 2 if BSP_PWM1_INTSEL_ET_CTR_PRD 169 default 3 if BSP_PWM1_INTSEL_ET_CTR_PRDZERO 170 default 4 if BSP_PWM1_INTSEL_ET_CTRU_CMPA 171 default 5 if BSP_PWM1_INTSEL_ET_CTRD_CMPA 172 default 6 if BSP_PWM1_INTSEL_ET_CTRU_CMPB 173 default 7 if BSP_PWM1_INTSEL_ET_CTRD_CMPB 174 choice 175 prompt "Interrupt generation time" 176 default BSP_PWM1_INT_ET_1ST 177 config BSP_PWM1_INT_ET_DISABLE 178 bool "disable PWM interrupt" 179 config BSP_PWM1_INT_ET_1ST 180 bool "generate interrupt at the first time" 181 config BSP_PWM1_INT_ET_2ND 182 bool "generate interrupt at the second time" 183 config BSP_PWM1_INT_ET_3RD 184 bool "generate interrupt at the third time" 185 endchoice 186 config BSP_PWM1_INTPRD 187 int 188 default 0 if BSP_PWM1_INT_ET_DISABLE 189 default 1 if BSP_PWM1_INT_ET_1ST 190 default 2 if BSP_PWM1_INT_ET_2ND 191 default 3 if BSP_PWM1_INT_ET_3RD 192 endif 193 choice 194 prompt "HSP Clock division" 195 default BSP_PWM1_HSPCLKDIV1 196 config BSP_PWM1_HSPCLKDIV1 197 bool "Clock Divided by 1" 198 config BSP_PWM1_HSPCLKDIV2 199 bool "Clock Divided by 2" 200 config BSP_PWM1_HSPCLKDIV4 201 bool "Clock Divided by 4" 202 endchoice 203 config BSP_PWM1_HSPCLKDIV 204 int 205 default 0 if BSP_PWM1_HSPCLKDIV1 206 default 1 if BSP_PWM1_HSPCLKDIV2 207 default 2 if BSP_PWM1_HSPCLKDIV4 208 choice 209 prompt "Clock division" 210 default BSP_PWM1_CLKDIV1 211 config BSP_PWM1_CLKDIV1 212 bool "Clock Divided by 1" 213 config BSP_PWM1_CLKDIV2 214 bool "Clock Divided by 2" 215 config BSP_PWM1_CLKDIV4 216 bool "Clock Divided by 4" 217 endchoice 218 config BSP_PWM1_CLKDIV 219 int 220 default 0 if BSP_PWM1_CLKDIV1 221 default 1 if BSP_PWM1_CLKDIV2 222 default 2 if BSP_PWM1_CLKDIV4 223 choice 224 default BSP_PWM1_CTR_MODE_UPDOWN 225 prompt "Select counter mode" 226 config BSP_PWM1_CTR_MODE_UPDOWN 227 bool "Up-down mode" 228 config BSP_PWM1_CTR_MODE_UP 229 bool "Up mode" 230 config BSP_PWM1_CTR_MODE_DOWN 231 bool "Down mode" 232 config BSP_PWM1_CTR_FREEZE 233 bool "Freezing Counter" 234 endchoice 235 config BSP_PWM1_CTRMODE 236 int 237 default 0 if BSP_PWM1_CTR_MODE_UP 238 default 1 if BSP_PWM1_CTR_MODE_DOWN 239 default 2 if BSP_PWM1_CTR_MODE_UPDOWN 240 default 3 if BSP_PWM1_CTR_FREEZE 241 choice 242 prompt "Register load mode" 243 config BSP_PWM1_CC_CTR_ZERO 244 bool "Load when counter == 0" 245 config BSP_PWM1_CC_CTR_PRD 246 bool "Load when counter == prd" 247 config BSP_PWM1_CC_CTR_ZERO_PRD 248 bool "load when counter ==0 or counter == prd" 249 config BSP_PWM1_CC_LD_DISABLE 250 bool "disable load" 251 endchoice 252 253 config BSP_PWM1_LOADAMODE 254 int 255 default 0 if BSP_PWM1_CC_CTR_ZERO 256 default 1 if BSP_PWM1_CC_CTR_PRD 257 default 2 if BSP_PWM1_CC_CTR_ZERO_PRD 258 default 3 if BSP_PWM1_CC_LD_DISABLE 259 260 config BSP_PWM1_DB 261 int "Dead time(ns)" 262 default 100 263 range 0 100000 264 menuconfig BSP_PWM1_ADC_TRIGGER 265 bool "Enable ADC trigger from PWM1" 266 if BSP_PWM1_ADC_TRIGGER 267 choice 268 prompt "Select soc triggering time" 269 default BSP_PWM1_SOCASEL_ET_CTR_ZERO 270 config BSP_PWM1_SOCASEL_ET_DCAEVT1SOC 271 bool "DCAEVT1SOC" 272 config BSP_PWM1_SOCASEL_ET_CTR_ZERO 273 bool "ctr == zero" 274 config BSP_PWM1_SOCASEL_ET_CTR_PRD 275 bool "ctr == prd" 276 config BSP_PWM1_SOCASEL_ET_CTR_PRDZERO 277 bool "ctr == prd or ctr == zero" 278 config BSP_PWM1_SOCASEL_ET_CTRU_CMPA 279 bool "ctr == compa when counting up" 280 config BSP_PWM1_SOCASEL_ET_CTRD_CMPA 281 bool "ctr == compa when counting down" 282 config BSP_PWM1_SOCASEL_ET_CTRU_CMPB 283 bool "ctr == compb when counting up" 284 config BSP_PWM1_SOCASEL_ET_CTRD_CMPB 285 bool "ctr == compb when counting down" 286 endchoice 287 288 config BSP_PWM1_SOCASEL 289 int 290 default 0 if BSP_PWM1_SOCASEL_ET_DCAEVT1SOC 291 default 1 if BSP_PWM1_SOCASEL_ET_CTR_ZERO 292 default 2 if BSP_PWM1_SOCASEL_ET_CTR_PRD 293 default 3 if BSP_PWM1_SOCASEL_ET_CTR_PRDZERO 294 default 4 if BSP_PWM1_SOCASEL_ET_CTRU_CMPA 295 default 5 if BSP_PWM1_SOCASEL_ET_CTRD_CMPA 296 default 6 if BSP_PWM1_SOCASEL_ET_CTRU_CMPB 297 default 7 if BSP_PWM1_SOCASEL_ET_CTRD_CMPB 298 choice 299 prompt "SOCA generation time" 300 default BSP_PWM1_SOCA_ET_1ST 301 config BSP_PWM1_SOCA_ET_DISABLE 302 bool "disable soc generation" 303 config BSP_PWM1_SOCA_ET_1ST 304 bool "generate soc at the first time" 305 config BSP_PWM1_SOCA_ET_2ND 306 bool "generate soc at the second time" 307 config BSP_PWM1_SOCA_ET_3RD 308 bool "generate soc at the third time" 309 endchoice 310 config BSP_PWM1_SOCAPRD 311 int 312 default 0 if BSP_PWM1_SOCA_ET_DISABLE 313 default 1 if BSP_PWM1_SOCA_ET_1ST 314 default 2 if BSP_PWM1_SOCA_ET_2ND 315 default 3 if BSP_PWM1_SOCA_ET_3RD 316 endif 317 endmenu 318 endif 319 menuconfig BSP_USING_PWM2 320 bool "Enable ePWM2" 321 default n 322 if BSP_USING_PWM2 323 menu "Basic settings for PWM2" 324 config BSP_PWM2_INIT_PERIOD 325 int "Initial period for PWM2(ns)" 326 default 10000 327 config BSP_PWM2_INIT_PULSE 328 int "Initial pulse for PWM2(ns)" 329 default 1000 330 endmenu 331 menu "Advanced Settings for PWM2" 332 menuconfig BSP_PWM2_PHASE_ENABLE 333 bool "Enable phase" 334 default n 335 if BSP_PWM2_PHASE_ENABLE 336 choice 337 prompt "Select master or slave" 338 default BSP_PWM2_SLAVE 339 config BSP_PWM2_MASTER 340 bool "Master" 341 config BSP_PWM2_SLAVE 342 bool "Slave" 343 endchoice 344 if BSP_PWM2_MASTER 345 config BSP_PWM2_PHASE 346 int 347 default 0 348 endif 349 if BSP_PWM2_SLAVE 350 config BSP_PWM2_PHASE 351 int "Phase, 0~360" 352 range 0 360 353 default 0 354 help 355 the phase for PWM2 module 356 endif 357 endif 358 359 menuconfig BSP_PWM2_IT_ENABLE 360 bool "Enable interrupt service" 361 default n 362 if BSP_PWM2_IT_ENABLE 363 choice 364 prompt "Select interrupt time" 365 default BSP_PWM2_INTSEL_ET_CTR_ZERO 366 config BSP_PWM2_INTSEL_ET_DCAEVT1SOC 367 bool "DCAEVT1SOC" 368 config BSP_PWM2_INTSEL_ET_CTR_ZERO 369 bool "ctr == zero" 370 config BSP_PWM2_INTSEL_ET_CTR_PRD 371 bool "ctr == prd" 372 config BSP_PWM2_INTSEL_ET_CTR_PRDZERO 373 bool "ctr == prd or ctr == zero" 374 config BSP_PWM2_INTSEL_ET_CTRU_CMPA 375 bool "ctr == compa when counting up" 376 config BSP_PWM2_INTSEL_ET_CTRD_CMPA 377 bool "ctr == compa when counting down" 378 config BSP_PWM2_INTSEL_ET_CTRU_CMPB 379 bool "ctr == compb when counting up" 380 config BSP_PWM2_INTSEL_ET_CTRD_CMPB 381 bool "ctr == compb when counting down" 382 endchoice 383 384 config BSP_PWM2_INTSEL 385 int 386 default 0 if BSP_PWM2_INTSEL_ET_DCAEVT1SOC 387 default 1 if BSP_PWM2_INTSEL_ET_CTR_ZERO 388 default 2 if BSP_PWM2_INTSEL_ET_CTR_PRD 389 default 3 if BSP_PWM2_INTSEL_ET_CTR_PRDZERO 390 default 4 if BSP_PWM2_INTSEL_ET_CTRU_CMPA 391 default 5 if BSP_PWM2_INTSEL_ET_CTRD_CMPA 392 default 6 if BSP_PWM2_INTSEL_ET_CTRU_CMPB 393 default 7 if BSP_PWM2_INTSEL_ET_CTRD_CMPB 394 choice 395 prompt "Interrupt generation time" 396 default BSP_PWM2_INT_ET_1ST 397 config BSP_PWM2_INT_ET_DISABLE 398 bool "disable PWM interrupt" 399 config BSP_PWM2_INT_ET_1ST 400 bool "generate interrupt at the first time" 401 config BSP_PWM2_INT_ET_2ND 402 bool "generate interrupt at the second time" 403 config BSP_PWM2_INT_ET_3RD 404 bool "generate interrupt at the third time" 405 endchoice 406 config BSP_PWM2_INTPRD 407 int 408 default 0 if BSP_PWM2_INT_ET_DISABLE 409 default 1 if BSP_PWM2_INT_ET_1ST 410 default 2 if BSP_PWM2_INT_ET_2ND 411 default 3 if BSP_PWM2_INT_ET_3RD 412 endif 413 choice 414 prompt "HSP Clock division" 415 default BSP_PWM2_HSPCLKDIV1 416 config BSP_PWM2_HSPCLKDIV1 417 bool "Clock Divided by 1" 418 config BSP_PWM2_HSPCLKDIV2 419 bool "Clock Divided by 2" 420 config BSP_PWM2_HSPCLKDIV4 421 bool "Clock Divided by 4" 422 endchoice 423 config BSP_PWM2_HSPCLKDIV 424 int 425 default 0 if BSP_PWM2_HSPCLKDIV1 426 default 1 if BSP_PWM2_HSPCLKDIV2 427 default 2 if BSP_PWM2_HSPCLKDIV4 428 choice 429 prompt "Clock division" 430 default BSP_PWM2_CLKDIV1 431 config BSP_PWM2_CLKDIV1 432 bool "Clock Divided by 1" 433 config BSP_PWM2_CLKDIV2 434 bool "Clock Divided by 2" 435 config BSP_PWM2_CLKDIV4 436 bool "Clock Divided by 4" 437 endchoice 438 config BSP_PWM2_CLKDIV 439 int 440 default 0 if BSP_PWM2_CLKDIV1 441 default 1 if BSP_PWM2_CLKDIV2 442 default 2 if BSP_PWM2_CLKDIV4 443 choice 444 default BSP_PWM2_CTR_MODE_UPDOWN 445 prompt "Select counter mode" 446 config BSP_PWM2_CTR_MODE_UPDOWN 447 bool "Up-down mode" 448 config BSP_PWM2_CTR_MODE_UP 449 bool "Up mode" 450 config BSP_PWM2_CTR_MODE_DOWN 451 bool "Down mode" 452 config BSP_PWM2_CTR_FREEZE 453 bool "Freezing Counter" 454 endchoice 455 config BSP_PWM2_CTRMODE 456 int 457 default 0 if BSP_PWM2_CTR_MODE_UP 458 default 1 if BSP_PWM2_CTR_MODE_DOWN 459 default 2 if BSP_PWM2_CTR_MODE_UPDOWN 460 default 3 if BSP_PWM2_CTR_FREEZE 461 choice 462 prompt "Register load mode" 463 config BSP_PWM2_CC_CTR_ZERO 464 bool "Load when counter == 0" 465 config BSP_PWM2_CC_CTR_PRD 466 bool "Load when counter == prd" 467 config BSP_PWM2_CC_CTR_ZERO_PRD 468 bool "load when counter ==0 or counter == prd" 469 config BSP_PWM2_CC_LD_DISABLE 470 bool "disable load" 471 endchoice 472 473 config BSP_PWM2_LOADAMODE 474 int 475 default 0 if BSP_PWM2_CC_CTR_ZERO 476 default 1 if BSP_PWM2_CC_CTR_PRD 477 default 2 if BSP_PWM2_CC_CTR_ZERO_PRD 478 default 3 if BSP_PWM2_CC_LD_DISABLE 479 480 config BSP_PWM2_DB 481 int "Dead time(ns)" 482 default 100 483 range 0 100000 484 menuconfig BSP_PWM2_ADC_TRIGGER 485 bool "Enable ADC trigger from PWM2" 486 if BSP_PWM2_ADC_TRIGGER 487 choice 488 prompt "Select soc triggering time" 489 default BSP_PWM2_SOCASEL_ET_CTR_ZERO 490 config BSP_PWM2_SOCASEL_ET_DCAEVT1SOC 491 bool "DCAEVT1SOC" 492 config BSP_PWM2_SOCASEL_ET_CTR_ZERO 493 bool "ctr == zero" 494 config BSP_PWM2_SOCASEL_ET_CTR_PRD 495 bool "ctr == prd" 496 config BSP_PWM2_SOCASEL_ET_CTR_PRDZERO 497 bool "ctr == prd or ctr == zero" 498 config BSP_PWM2_SOCASEL_ET_CTRU_CMPA 499 bool "ctr == compa when counting up" 500 config BSP_PWM2_SOCASEL_ET_CTRD_CMPA 501 bool "ctr == compa when counting down" 502 config BSP_PWM2_SOCASEL_ET_CTRU_CMPB 503 bool "ctr == compb when counting up" 504 config BSP_PWM2_SOCASEL_ET_CTRD_CMPB 505 bool "ctr == compb when counting down" 506 endchoice 507 508 config BSP_PWM2_SOCASEL 509 int 510 default 0 if BSP_PWM2_SOCASEL_ET_DCAEVT1SOC 511 default 1 if BSP_PWM2_SOCASEL_ET_CTR_ZERO 512 default 2 if BSP_PWM2_SOCASEL_ET_CTR_PRD 513 default 3 if BSP_PWM2_SOCASEL_ET_CTR_PRDZERO 514 default 4 if BSP_PWM2_SOCASEL_ET_CTRU_CMPA 515 default 5 if BSP_PWM2_SOCASEL_ET_CTRD_CMPA 516 default 6 if BSP_PWM2_SOCASEL_ET_CTRU_CMPB 517 default 7 if BSP_PWM2_SOCASEL_ET_CTRD_CMPB 518 choice 519 prompt "SOCA generation time" 520 default BSP_PWM2_SOCA_ET_1ST 521 config BSP_PWM2_SOCA_ET_DISABLE 522 bool "disable soc generation" 523 config BSP_PWM2_SOCA_ET_1ST 524 bool "generate soc at the first time" 525 config BSP_PWM2_SOCA_ET_2ND 526 bool "generate soc at the second time" 527 config BSP_PWM2_SOCA_ET_3RD 528 bool "generate soc at the third time" 529 endchoice 530 config BSP_PWM2_SOCAPRD 531 int 532 default 0 if BSP_PWM2_SOCA_ET_DISABLE 533 default 1 if BSP_PWM2_SOCA_ET_1ST 534 default 2 if BSP_PWM2_SOCA_ET_2ND 535 default 3 if BSP_PWM2_SOCA_ET_3RD 536 endif 537 endmenu 538 endif 539 menuconfig BSP_USING_PWM3 540 bool "Enable ePWM3" 541 default n 542 if BSP_USING_PWM3 543 menu "Basic settings for PWM3" 544 config BSP_PWM3_INIT_PERIOD 545 int "Initial period for PWM3(ns)" 546 default 10000 547 config BSP_PWM3_INIT_PULSE 548 int "Initial pulse for PWM3(ns)" 549 default 1000 550 endmenu 551 menu "Advanced Settings for PWM3" 552 menuconfig BSP_PWM3_PHASE_ENABLE 553 bool "Enable phase" 554 default n 555 if BSP_PWM3_PHASE_ENABLE 556 choice 557 prompt "Select master or slave" 558 default BSP_PWM3_SLAVE 559 config BSP_PWM3_MASTER 560 bool "Master" 561 config BSP_PWM3_SLAVE 562 bool "Slave" 563 endchoice 564 if BSP_PWM3_MASTER 565 config BSP_PWM3_PHASE 566 int 567 default 0 568 endif 569 if BSP_PWM3_SLAVE 570 config BSP_PWM3_PHASE 571 int "Phase, 0~360" 572 range 0 360 573 default 0 574 help 575 the phase for PWM3 module 576 endif 577 endif 578 579 menuconfig BSP_PWM3_IT_ENABLE 580 bool "Enable interrupt service" 581 default n 582 if BSP_PWM3_IT_ENABLE 583 choice 584 prompt "Select interrupt time" 585 default BSP_PWM3_INTSEL_ET_CTR_ZERO 586 config BSP_PWM3_INTSEL_ET_DCAEVT1SOC 587 bool "DCAEVT1SOC" 588 config BSP_PWM3_INTSEL_ET_CTR_ZERO 589 bool "ctr == zero" 590 config BSP_PWM3_INTSEL_ET_CTR_PRD 591 bool "ctr == prd" 592 config BSP_PWM3_INTSEL_ET_CTR_PRDZERO 593 bool "ctr == prd or ctr == zero" 594 config BSP_PWM3_INTSEL_ET_CTRU_CMPA 595 bool "ctr == compa when counting up" 596 config BSP_PWM3_INTSEL_ET_CTRD_CMPA 597 bool "ctr == compa when counting down" 598 config BSP_PWM3_INTSEL_ET_CTRU_CMPB 599 bool "ctr == compb when counting up" 600 config BSP_PWM3_INTSEL_ET_CTRD_CMPB 601 bool "ctr == compb when counting down" 602 endchoice 603 604 config BSP_PWM3_INTSEL 605 int 606 default 0 if BSP_PWM3_INTSEL_ET_DCAEVT1SOC 607 default 1 if BSP_PWM3_INTSEL_ET_CTR_ZERO 608 default 2 if BSP_PWM3_INTSEL_ET_CTR_PRD 609 default 3 if BSP_PWM3_INTSEL_ET_CTR_PRDZERO 610 default 4 if BSP_PWM3_INTSEL_ET_CTRU_CMPA 611 default 5 if BSP_PWM3_INTSEL_ET_CTRD_CMPA 612 default 6 if BSP_PWM3_INTSEL_ET_CTRU_CMPB 613 default 7 if BSP_PWM3_INTSEL_ET_CTRD_CMPB 614 choice 615 prompt "Interrupt generation time" 616 default BSP_PWM3_INT_ET_1ST 617 config BSP_PWM3_INT_ET_DISABLE 618 bool "disable PWM interrupt" 619 config BSP_PWM3_INT_ET_1ST 620 bool "generate interrupt at the first time" 621 config BSP_PWM3_INT_ET_2ND 622 bool "generate interrupt at the second time" 623 config BSP_PWM3_INT_ET_3RD 624 bool "generate interrupt at the third time" 625 endchoice 626 config BSP_PWM3_INTPRD 627 int 628 default 0 if BSP_PWM3_INT_ET_DISABLE 629 default 1 if BSP_PWM3_INT_ET_1ST 630 default 2 if BSP_PWM3_INT_ET_2ND 631 default 3 if BSP_PWM3_INT_ET_3RD 632 endif 633 choice 634 prompt "HSP Clock division" 635 default BSP_PWM3_HSPCLKDIV1 636 config BSP_PWM3_HSPCLKDIV1 637 bool "Clock Divided by 1" 638 config BSP_PWM3_HSPCLKDIV2 639 bool "Clock Divided by 2" 640 config BSP_PWM3_HSPCLKDIV4 641 bool "Clock Divided by 4" 642 endchoice 643 config BSP_PWM3_HSPCLKDIV 644 int 645 default 0 if BSP_PWM3_HSPCLKDIV1 646 default 1 if BSP_PWM3_HSPCLKDIV2 647 default 2 if BSP_PWM3_HSPCLKDIV4 648 choice 649 prompt "Clock division" 650 default BSP_PWM3_CLKDIV1 651 config BSP_PWM3_CLKDIV1 652 bool "Clock Divided by 1" 653 config BSP_PWM3_CLKDIV2 654 bool "Clock Divided by 2" 655 config BSP_PWM3_CLKDIV4 656 bool "Clock Divided by 4" 657 endchoice 658 config BSP_PWM3_CLKDIV 659 int 660 default 0 if BSP_PWM3_CLKDIV1 661 default 1 if BSP_PWM3_CLKDIV2 662 default 2 if BSP_PWM3_CLKDIV4 663 choice 664 default BSP_PWM3_CTR_MODE_UPDOWN 665 prompt "Select counter mode" 666 config BSP_PWM3_CTR_MODE_UPDOWN 667 bool "Up-down mode" 668 config BSP_PWM3_CTR_MODE_UP 669 bool "Up mode" 670 config BSP_PWM3_CTR_MODE_DOWN 671 bool "Down mode" 672 config BSP_PWM3_CTR_FREEZE 673 bool "Freezing Counter" 674 endchoice 675 config BSP_PWM3_CTRMODE 676 int 677 default 0 if BSP_PWM3_CTR_MODE_UP 678 default 1 if BSP_PWM3_CTR_MODE_DOWN 679 default 2 if BSP_PWM3_CTR_MODE_UPDOWN 680 default 3 if BSP_PWM3_CTR_FREEZE 681 choice 682 prompt "Register load mode" 683 config BSP_PWM3_CC_CTR_ZERO 684 bool "Load when counter == 0" 685 config BSP_PWM3_CC_CTR_PRD 686 bool "Load when counter == prd" 687 config BSP_PWM3_CC_CTR_ZERO_PRD 688 bool "load when counter ==0 or counter == prd" 689 config BSP_PWM3_CC_LD_DISABLE 690 bool "disable load" 691 endchoice 692 693 config BSP_PWM3_LOADAMODE 694 int 695 default 0 if BSP_PWM3_CC_CTR_ZERO 696 default 1 if BSP_PWM3_CC_CTR_PRD 697 default 2 if BSP_PWM3_CC_CTR_ZERO_PRD 698 default 3 if BSP_PWM3_CC_LD_DISABLE 699 700 config BSP_PWM3_DB 701 int "Dead time(ns)" 702 default 100 703 range 0 100000 704 menuconfig BSP_PWM3_ADC_TRIGGER 705 bool "Enable ADC trigger from PWM3" 706 if BSP_PWM3_ADC_TRIGGER 707 choice 708 prompt "Select soc triggering time" 709 default BSP_PWM3_SOCASEL_ET_CTR_ZERO 710 config BSP_PWM3_SOCASEL_ET_DCAEVT1SOC 711 bool "DCAEVT1SOC" 712 config BSP_PWM3_SOCASEL_ET_CTR_ZERO 713 bool "ctr == zero" 714 config BSP_PWM3_SOCASEL_ET_CTR_PRD 715 bool "ctr == prd" 716 config BSP_PWM3_SOCASEL_ET_CTR_PRDZERO 717 bool "ctr == prd or ctr == zero" 718 config BSP_PWM3_SOCASEL_ET_CTRU_CMPA 719 bool "ctr == compa when counting up" 720 config BSP_PWM3_SOCASEL_ET_CTRD_CMPA 721 bool "ctr == compa when counting down" 722 config BSP_PWM3_SOCASEL_ET_CTRU_CMPB 723 bool "ctr == compb when counting up" 724 config BSP_PWM3_SOCASEL_ET_CTRD_CMPB 725 bool "ctr == compb when counting down" 726 endchoice 727 728 config BSP_PWM3_SOCASEL 729 int 730 default 0 if BSP_PWM3_SOCASEL_ET_DCAEVT1SOC 731 default 1 if BSP_PWM3_SOCASEL_ET_CTR_ZERO 732 default 2 if BSP_PWM3_SOCASEL_ET_CTR_PRD 733 default 3 if BSP_PWM3_SOCASEL_ET_CTR_PRDZERO 734 default 4 if BSP_PWM3_SOCASEL_ET_CTRU_CMPA 735 default 5 if BSP_PWM3_SOCASEL_ET_CTRD_CMPA 736 default 6 if BSP_PWM3_SOCASEL_ET_CTRU_CMPB 737 default 7 if BSP_PWM3_SOCASEL_ET_CTRD_CMPB 738 choice 739 prompt "SOCA generation time" 740 default BSP_PWM3_SOCA_ET_1ST 741 config BSP_PWM3_SOCA_ET_DISABLE 742 bool "disable soc generation" 743 config BSP_PWM3_SOCA_ET_1ST 744 bool "generate soc at the first time" 745 config BSP_PWM3_SOCA_ET_2ND 746 bool "generate soc at the second time" 747 config BSP_PWM3_SOCA_ET_3RD 748 bool "generate soc at the third time" 749 endchoice 750 config BSP_PWM3_SOCAPRD 751 int 752 default 0 if BSP_PWM3_SOCA_ET_DISABLE 753 default 1 if BSP_PWM3_SOCA_ET_1ST 754 default 2 if BSP_PWM3_SOCA_ET_2ND 755 default 3 if BSP_PWM3_SOCA_ET_3RD 756 endif 757 endmenu 758 endif 759 menuconfig BSP_USING_PWM4 760 bool "Enable ePWM4" 761 default n 762 if BSP_USING_PWM4 763 menu "Basic settings for PWM4" 764 config BSP_PWM4_INIT_PERIOD 765 int "Initial period for PWM4(ns)" 766 default 10000 767 config BSP_PWM4_INIT_PULSE 768 int "Initial pulse for PWM4(ns)" 769 default 1000 770 endmenu 771 menu "Advanced Settings for PWM4" 772 menuconfig BSP_PWM4_PHASE_ENABLE 773 bool "Enable phase" 774 default n 775 if BSP_PWM4_PHASE_ENABLE 776 choice 777 prompt "Select master or slave" 778 default BSP_PWM4_SLAVE 779 config BSP_PWM4_MASTER 780 bool "Master" 781 config BSP_PWM4_SLAVE 782 bool "Slave" 783 endchoice 784 if BSP_PWM4_MASTER 785 config BSP_PWM4_PHASE 786 int 787 default 0 788 endif 789 if BSP_PWM4_SLAVE 790 config BSP_PWM4_PHASE 791 int "Phase, 0~360" 792 range 0 360 793 default 0 794 help 795 the phase for PWM4 module 796 endif 797 endif 798 799 menuconfig BSP_PWM4_IT_ENABLE 800 bool "Enable interrupt service" 801 default n 802 if BSP_PWM4_IT_ENABLE 803 choice 804 prompt "Select interrupt time" 805 default BSP_PWM4_INTSEL_ET_CTR_ZERO 806 config BSP_PWM4_INTSEL_ET_DCAEVT1SOC 807 bool "DCAEVT1SOC" 808 config BSP_PWM4_INTSEL_ET_CTR_ZERO 809 bool "ctr == zero" 810 config BSP_PWM4_INTSEL_ET_CTR_PRD 811 bool "ctr == prd" 812 config BSP_PWM4_INTSEL_ET_CTR_PRDZERO 813 bool "ctr == prd or ctr == zero" 814 config BSP_PWM4_INTSEL_ET_CTRU_CMPA 815 bool "ctr == compa when counting up" 816 config BSP_PWM4_INTSEL_ET_CTRD_CMPA 817 bool "ctr == compa when counting down" 818 config BSP_PWM4_INTSEL_ET_CTRU_CMPB 819 bool "ctr == compb when counting up" 820 config BSP_PWM4_INTSEL_ET_CTRD_CMPB 821 bool "ctr == compb when counting down" 822 endchoice 823 824 config BSP_PWM4_INTSEL 825 int 826 default 0 if BSP_PWM4_INTSEL_ET_DCAEVT1SOC 827 default 1 if BSP_PWM4_INTSEL_ET_CTR_ZERO 828 default 2 if BSP_PWM4_INTSEL_ET_CTR_PRD 829 default 3 if BSP_PWM4_INTSEL_ET_CTR_PRDZERO 830 default 4 if BSP_PWM4_INTSEL_ET_CTRU_CMPA 831 default 5 if BSP_PWM4_INTSEL_ET_CTRD_CMPA 832 default 6 if BSP_PWM4_INTSEL_ET_CTRU_CMPB 833 default 7 if BSP_PWM4_INTSEL_ET_CTRD_CMPB 834 choice 835 prompt "Interrupt generation time" 836 default BSP_PWM4_INT_ET_1ST 837 config BSP_PWM4_INT_ET_DISABLE 838 bool "disable PWM interrupt" 839 config BSP_PWM4_INT_ET_1ST 840 bool "generate interrupt at the first time" 841 config BSP_PWM4_INT_ET_2ND 842 bool "generate interrupt at the second time" 843 config BSP_PWM4_INT_ET_3RD 844 bool "generate interrupt at the third time" 845 endchoice 846 config BSP_PWM4_INTPRD 847 int 848 default 0 if BSP_PWM4_INT_ET_DISABLE 849 default 1 if BSP_PWM4_INT_ET_1ST 850 default 2 if BSP_PWM4_INT_ET_2ND 851 default 3 if BSP_PWM4_INT_ET_3RD 852 endif 853 choice 854 prompt "HSP Clock division" 855 default BSP_PWM4_HSPCLKDIV1 856 config BSP_PWM4_HSPCLKDIV1 857 bool "Clock Divided by 1" 858 config BSP_PWM4_HSPCLKDIV2 859 bool "Clock Divided by 2" 860 config BSP_PWM4_HSPCLKDIV4 861 bool "Clock Divided by 4" 862 endchoice 863 config BSP_PWM4_HSPCLKDIV 864 int 865 default 0 if BSP_PWM4_HSPCLKDIV1 866 default 1 if BSP_PWM4_HSPCLKDIV2 867 default 2 if BSP_PWM4_HSPCLKDIV4 868 choice 869 prompt "Clock division" 870 default BSP_PWM4_CLKDIV1 871 config BSP_PWM4_CLKDIV1 872 bool "Clock Divided by 1" 873 config BSP_PWM4_CLKDIV2 874 bool "Clock Divided by 2" 875 config BSP_PWM4_CLKDIV4 876 bool "Clock Divided by 4" 877 endchoice 878 config BSP_PWM4_CLKDIV 879 int 880 default 0 if BSP_PWM4_CLKDIV1 881 default 1 if BSP_PWM4_CLKDIV2 882 default 2 if BSP_PWM4_CLKDIV4 883 choice 884 default BSP_PWM4_CTR_MODE_UPDOWN 885 prompt "Select counter mode" 886 config BSP_PWM4_CTR_MODE_UPDOWN 887 bool "Up-down mode" 888 config BSP_PWM4_CTR_MODE_UP 889 bool "Up mode" 890 config BSP_PWM4_CTR_MODE_DOWN 891 bool "Down mode" 892 config BSP_PWM4_CTR_FREEZE 893 bool "Freezing Counter" 894 endchoice 895 config BSP_PWM4_CTRMODE 896 int 897 default 0 if BSP_PWM4_CTR_MODE_UP 898 default 1 if BSP_PWM4_CTR_MODE_DOWN 899 default 2 if BSP_PWM4_CTR_MODE_UPDOWN 900 default 3 if BSP_PWM4_CTR_FREEZE 901 choice 902 prompt "Register load mode" 903 config BSP_PWM4_CC_CTR_ZERO 904 bool "Load when counter == 0" 905 config BSP_PWM4_CC_CTR_PRD 906 bool "Load when counter == prd" 907 config BSP_PWM4_CC_CTR_ZERO_PRD 908 bool "load when counter ==0 or counter == prd" 909 config BSP_PWM4_CC_LD_DISABLE 910 bool "disable load" 911 endchoice 912 913 config BSP_PWM4_LOADAMODE 914 int 915 default 0 if BSP_PWM4_CC_CTR_ZERO 916 default 1 if BSP_PWM4_CC_CTR_PRD 917 default 2 if BSP_PWM4_CC_CTR_ZERO_PRD 918 default 3 if BSP_PWM4_CC_LD_DISABLE 919 920 config BSP_PWM4_DB 921 int "Dead time(ns)" 922 default 100 923 range 0 100000 924 menuconfig BSP_PWM4_ADC_TRIGGER 925 bool "Enable ADC trigger from PWM4" 926 if BSP_PWM4_ADC_TRIGGER 927 choice 928 prompt "Select soc triggering time" 929 default BSP_PWM4_SOCASEL_ET_CTR_ZERO 930 config BSP_PWM4_SOCASEL_ET_DCAEVT1SOC 931 bool "DCAEVT1SOC" 932 config BSP_PWM4_SOCASEL_ET_CTR_ZERO 933 bool "ctr == zero" 934 config BSP_PWM4_SOCASEL_ET_CTR_PRD 935 bool "ctr == prd" 936 config BSP_PWM4_SOCASEL_ET_CTR_PRDZERO 937 bool "ctr == prd or ctr == zero" 938 config BSP_PWM4_SOCASEL_ET_CTRU_CMPA 939 bool "ctr == compa when counting up" 940 config BSP_PWM4_SOCASEL_ET_CTRD_CMPA 941 bool "ctr == compa when counting down" 942 config BSP_PWM4_SOCASEL_ET_CTRU_CMPB 943 bool "ctr == compb when counting up" 944 config BSP_PWM4_SOCASEL_ET_CTRD_CMPB 945 bool "ctr == compb when counting down" 946 endchoice 947 948 config BSP_PWM4_SOCASEL 949 int 950 default 0 if BSP_PWM4_SOCASEL_ET_DCAEVT1SOC 951 default 1 if BSP_PWM4_SOCASEL_ET_CTR_ZERO 952 default 2 if BSP_PWM4_SOCASEL_ET_CTR_PRD 953 default 3 if BSP_PWM4_SOCASEL_ET_CTR_PRDZERO 954 default 4 if BSP_PWM4_SOCASEL_ET_CTRU_CMPA 955 default 5 if BSP_PWM4_SOCASEL_ET_CTRD_CMPA 956 default 6 if BSP_PWM4_SOCASEL_ET_CTRU_CMPB 957 default 7 if BSP_PWM4_SOCASEL_ET_CTRD_CMPB 958 choice 959 prompt "SOCA generation time" 960 default BSP_PWM4_SOCA_ET_1ST 961 config BSP_PWM4_SOCA_ET_DISABLE 962 bool "disable soc generation" 963 config BSP_PWM4_SOCA_ET_1ST 964 bool "generate soc at the first time" 965 config BSP_PWM4_SOCA_ET_2ND 966 bool "generate soc at the second time" 967 config BSP_PWM4_SOCA_ET_3RD 968 bool "generate soc at the third time" 969 endchoice 970 config BSP_PWM4_SOCAPRD 971 int 972 default 0 if BSP_PWM4_SOCA_ET_DISABLE 973 default 1 if BSP_PWM4_SOCA_ET_1ST 974 default 2 if BSP_PWM4_SOCA_ET_2ND 975 default 3 if BSP_PWM4_SOCA_ET_3RD 976 endif 977 endmenu 978 endif 979 endif 980 981 menuconfig BSP_USING_ADC 982 bool "Enable ADC" 983 default n 984 select RT_USING_ADC 985 if BSP_USING_ADC 986 menuconfig BSP_USING_ADC1 987 bool "Enable ADC1" 988 default n 989 if BSP_USING_ADC1 990 choice 991 prompt "Select resolution" 992 default BSP_ADC_USING_12BIT 993 994 config BSP_ADC_USING_12BIT 995 bool "ADC Using 12 bit resolution" 996 997 config BSP_ADC_USING_16BIT 998 bool "ADC Using 16 bit resolution" 999 endchoice 1000 endif 1001 menuconfig BSP_USING_ADC2 1002 bool "Enable ADC2" 1003 default n 1004 if BSP_USING_ADC2 1005 choice 1006 prompt "Select resolution" 1007 default BSP_ADC_USING_12BIT 1008 1009 config BSP_ADC_USING_12BIT 1010 bool "ADC Using 12 bit resolution" 1011 1012 config BSP_ADC_USING_16BIT 1013 bool "ADC Using 16 bit resolution" 1014 endchoice 1015 endif 1016 menuconfig BSP_USING_ADC3 1017 bool "Enable ADC3" 1018 default n 1019 if BSP_USING_ADC3 1020 choice 1021 prompt "Select resolution" 1022 default BSP_ADC_USING_12BIT 1023 1024 config BSP_ADC_USING_12BIT 1025 bool "ADC Using 12 bit resolution" 1026 1027 config BSP_ADC_USING_16BIT 1028 bool "ADC Using 16 bit resolution" 1029 endchoice 1030 endif 1031 endif 1032 1033 menuconfig BSP_USING_ONCHIP_RTC 1034 bool "Enable RTC" 1035 select RT_USING_RTC 1036 default n 1037 if BSP_USING_ONCHIP_RTC 1038 choice 1039 prompt "Select clock source" 1040 default BSP_RTC_USING_LSE 1041 1042 config BSP_RTC_USING_LSE 1043 bool "RTC USING LSE" 1044 1045 config BSP_RTC_USING_LSI 1046 bool "RTC USING LSI" 1047 endchoice 1048 endif 1049 1050 config BSP_USING_WDT 1051 bool "Enable Watchdog Timer" 1052 select RT_USING_WDT 1053 default n 1054 1055 config BSP_USING_SDIO 1056 bool "Enable SDIO" 1057 select RT_USING_SDIO 1058 select RT_USING_DFS 1059 default n 1060 1061 menuconfig BSP_USING_CAN 1062 bool "Enable CAN" 1063 default n 1064 select RT_USING_CAN 1065 if BSP_USING_CAN 1066 config BSP_USING_CAN1 1067 bool "using CAN1" 1068 default n 1069 endif 1070 1071 config BSP_USING_USBD 1072 bool "Enable USB device" 1073 select RT_USING_USB_DEVICE 1074 default n 1075 if BSP_USING_USBD 1076 config BSP_USB_CONNECT_PIN 1077 int "USB connect pin" 1078 default 67 1079 1080 config BSP_USB_PULL_UP_STATUS 1081 int "USB PULL UP STATUS" 1082 default 0 1083 endif 1084endmenu 1085 1086menu "Board extended module Drivers" 1087 1088endmenu 1089 1090endmenu 1091