Kconfig 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635
  1. config SOC_SERIES_M032
  2. bool
  3. select ARCH_ARM_CORTEX_M0
  4. select SOC_FAMILY_NUMICRO
  5. select RT_USING_COMPONENTS_INIT
  6. select RT_USING_USER_MAIN
  7. select PKG_USING_NUVOTON_SERIES_DRIVER
  8. default y
  9. config BSP_USE_STDDRIVER_SOURCE
  10. bool "Build StdDriver source"
  11. default n
  12. menuconfig BSP_USING_PDMA
  13. bool "Enable Peripheral Direct Memory Access Controller(PDMA)"
  14. default y
  15. if BSP_USING_PDMA
  16. config NU_PDMA_MEMFUN_ACTOR_MAX
  17. int "Specify maximum mem actor for memfun"
  18. range 1 4
  19. default 4
  20. config NU_PDMA_SGTBL_POOL_SIZE
  21. int "Specify maximum scatter-gather pool size"
  22. range 1 32
  23. default 16
  24. endif
  25. config BSP_USING_FMC
  26. bool "Enable Flash Memory Controller(FMC)"
  27. select RT_USING_FAL
  28. default n
  29. config BSP_USING_GPIO
  30. bool "Enable General Purpose I/O(GPIO)"
  31. select RT_USING_PIN
  32. default y
  33. menuconfig BSP_USING_CLK
  34. bool "Enable Clock Controller(CLK)"
  35. select RT_USING_PM
  36. select BSP_USING_TMR
  37. default y
  38. help
  39. Choose this option if you need CLK/PM function.
  40. Notice: Enable the option will hold timer3 resource
  41. if BSP_USING_CLK
  42. config NU_CLK_INVOKE_WKTMR
  43. bool "Enable SPD1 and DPD mode wakeup timer. (About 6.6 Secs)"
  44. default y
  45. endif
  46. menuconfig BSP_USING_RTC
  47. bool "Enable Real Time Clock(RTC)"
  48. select RT_USING_RTC
  49. config NU_RTC_SUPPORT_IO_RW
  50. bool "Support device RW entry"
  51. depends on BSP_USING_RTC && RT_USING_RTC
  52. config NU_RTC_SUPPORT_MSH_CMD
  53. bool "Support module shell command"
  54. depends on BSP_USING_RTC && RT_USING_RTC
  55. menuconfig BSP_USING_ADC
  56. bool "Enable Enhanced Analog-to-Digital Converter(ADC)"
  57. select RT_USING_ADC
  58. if BSP_USING_ADC
  59. config BSP_USING_ADC0
  60. bool "Enable ADC0"
  61. endif
  62. menuconfig BSP_USING_TMR
  63. bool "Enable Timer Controller(TIMER)"
  64. config BSP_USING_TIMER
  65. bool
  66. config BSP_USING_TIMER_CAPTURE
  67. bool
  68. config BSP_USING_TMR0
  69. bool "Enable TIMER0"
  70. depends on BSP_USING_TMR
  71. if BSP_USING_TMR0
  72. choice
  73. prompt "Select TIMER0 function mode"
  74. config BSP_USING_TIMER0
  75. select BSP_USING_TIMER
  76. select RT_USING_HWTIMER
  77. bool "TIMER"
  78. help
  79. Choose this option if you need TIMER function mode.
  80. config BSP_USING_TIMER0_CAPTURE
  81. select BSP_USING_TIMER_CAPTURE
  82. select RT_USING_INPUT_CAPTURE
  83. bool "TIMER CAPTURE"
  84. help
  85. Choose this option if you need CAPTURE function mode.
  86. endchoice
  87. endif
  88. config BSP_USING_TMR1
  89. bool "Enable TIMER1"
  90. depends on BSP_USING_TMR
  91. if BSP_USING_TMR1
  92. choice
  93. prompt "Select TIMER1 function mode"
  94. config BSP_USING_TIMER1
  95. select BSP_USING_TIMER
  96. select RT_USING_HWTIMER
  97. bool "TIMER"
  98. help
  99. Choose this option if you need TIMER function mode.
  100. config BSP_USING_TIMER1_CAPTURE
  101. select BSP_USING_TIMER_CAPTURE
  102. select RT_USING_INPUT_CAPTURE
  103. bool "TIMER CAPTURE"
  104. help
  105. Choose this option if you need CAPTURE function mode.
  106. endchoice
  107. endif
  108. config BSP_USING_TMR2
  109. bool "Enable TIMER2"
  110. depends on BSP_USING_TMR
  111. if BSP_USING_TMR2
  112. choice
  113. prompt "Select TIMER2 function mode"
  114. config BSP_USING_TIMER2
  115. select BSP_USING_TIMER
  116. select RT_USING_HWTIMER
  117. bool "TIMER"
  118. help
  119. Choose this option if you need TIMER function mode.
  120. config BSP_USING_TIMER2_CAPTURE
  121. select BSP_USING_TIMER_CAPTURE
  122. select RT_USING_INPUT_CAPTURE
  123. bool "TIMER CAPTURE"
  124. help
  125. Choose this option if you need CAPTURE function mode.
  126. endchoice
  127. endif
  128. config BSP_USING_TMR3
  129. bool "Enable TIMER3"
  130. depends on BSP_USING_TMR && !BSP_USING_CLK
  131. if BSP_USING_TMR3
  132. choice
  133. prompt "Select TIMER3 function mode"
  134. config BSP_USING_TIMER3
  135. select BSP_USING_TIMER
  136. select RT_USING_HWTIMER
  137. bool "TIMER"
  138. help
  139. Choose this option if you need TIMER function mode.
  140. config BSP_USING_TIMER3_CAPTURE
  141. select BSP_USING_TIMER_CAPTURE
  142. select RT_USING_INPUT_CAPTURE
  143. bool "TIMER CAPTURE"
  144. help
  145. Choose this option if you need CAPTURE function mode.
  146. endchoice
  147. endif
  148. menuconfig BSP_USING_UART
  149. bool "Enable Universal Asynchronous Receiver/Transmitters(UART)"
  150. select RT_USING_SERIAL
  151. if BSP_USING_UART
  152. config BSP_USING_UART0
  153. bool "Enable UART0"
  154. config BSP_USING_UART0_TX_DMA
  155. bool "Enable UART0 TX DMA"
  156. depends on BSP_USING_UART0 && RT_SERIAL_USING_DMA
  157. config BSP_USING_UART0_RX_DMA
  158. bool "Enable UART0 RX DMA"
  159. depends on BSP_USING_UART0 && RT_SERIAL_USING_DMA
  160. config BSP_USING_UART1
  161. bool "Enable UART1"
  162. config BSP_USING_UART1_TX_DMA
  163. bool "Enable UART1 TX DMA"
  164. depends on BSP_USING_UART1 && RT_SERIAL_USING_DMA
  165. config BSP_USING_UART1_RX_DMA
  166. bool "Enable UART1 RX DMA"
  167. depends on BSP_USING_UART1 && RT_SERIAL_USING_DMA
  168. config BSP_USING_UART2
  169. bool "Enable UART2"
  170. config BSP_USING_UART2_TX_DMA
  171. bool "Enable UART2 TX DMA"
  172. depends on BSP_USING_UART2 && RT_SERIAL_USING_DMA
  173. config BSP_USING_UART2_RX_DMA
  174. bool "Enable UART2 RX DMA"
  175. depends on BSP_USING_UART2 && RT_SERIAL_USING_DMA
  176. config BSP_USING_UART3
  177. bool "Enable UART3"
  178. config BSP_USING_UART3_TX_DMA
  179. bool "Enable UART3 TX DMA"
  180. depends on BSP_USING_UART3 && RT_SERIAL_USING_DMA
  181. config BSP_USING_UART3_RX_DMA
  182. bool "Enable UART3 RX DMA"
  183. depends on BSP_USING_UART3 && RT_SERIAL_USING_DMA
  184. config BSP_USING_UART4
  185. bool "Enable UART4"
  186. config BSP_USING_UART4_TX_DMA
  187. bool "Enable UART4 TX DMA"
  188. depends on BSP_USING_UART4 && RT_SERIAL_USING_DMA
  189. config BSP_USING_UART4_RX_DMA
  190. bool "Enable UART4 RX DMA"
  191. depends on BSP_USING_UART4 && RT_SERIAL_USING_DMA
  192. config BSP_USING_UART5
  193. bool "Enable UART5"
  194. config BSP_USING_UART5_TX_DMA
  195. bool "Enable UART5 TX DMA"
  196. depends on BSP_USING_UART5 && RT_SERIAL_USING_DMA
  197. config BSP_USING_UART5_RX_DMA
  198. bool "Enable UART5 RX DMA"
  199. depends on BSP_USING_UART5 && RT_SERIAL_USING_DMA
  200. config BSP_USING_UART6
  201. bool "Enable UART6"
  202. config BSP_USING_UART6_TX_DMA
  203. bool "Enable UART6 TX DMA"
  204. depends on BSP_USING_UART6 && RT_SERIAL_USING_DMA
  205. config BSP_USING_UART6_RX_DMA
  206. bool "Enable UART6 RX DMA"
  207. depends on BSP_USING_UART6 && RT_SERIAL_USING_DMA
  208. config BSP_USING_UART7
  209. bool "Enable UART7"
  210. config BSP_USING_UART7_TX_DMA
  211. bool "Enable UART7 TX DMA"
  212. depends on BSP_USING_UART7 && RT_SERIAL_USING_DMA
  213. config BSP_USING_UART7_RX_DMA
  214. bool "Enable UART7 RX DMA"
  215. depends on BSP_USING_UART7 && RT_SERIAL_USING_DMA
  216. endif
  217. menuconfig BSP_USING_I2C
  218. bool "Enable I2C Serial Interface Controller(I2C)"
  219. select RT_USING_I2C
  220. if BSP_USING_I2C
  221. config BSP_USING_I2C0
  222. bool "Enable I2C0"
  223. config BSP_USING_I2C1
  224. bool "Enable I2C1"
  225. endif
  226. menuconfig BSP_USING_USCI
  227. bool "Enable Universal Serial Control Interface Controller(USCI)"
  228. if BSP_USING_USCI
  229. config BSP_USING_UUART
  230. bool
  231. config BSP_USING_USPI
  232. bool
  233. config BSP_USING_USPI_PDMA
  234. bool
  235. default n
  236. config BSP_USING_UI2C
  237. bool
  238. config BSP_USING_USCI0
  239. bool "Enable USCI0"
  240. if BSP_USING_USCI0
  241. choice
  242. prompt "Select USCI0 function mode"
  243. config BSP_USING_UUART0
  244. select RT_USING_SERIAL
  245. select BSP_USING_UUART
  246. bool "UUART0"
  247. help
  248. Choose this option if you need UART function mode.
  249. config BSP_USING_UI2C0
  250. select RT_USING_I2C
  251. select BSP_USING_UI2C
  252. bool "UI2C0"
  253. help
  254. Choose this option if you need I2C function mode.
  255. config BSP_USING_USPI0
  256. select RT_USING_SPI
  257. select BSP_USING_USPI
  258. bool "USPI0"
  259. help
  260. Choose this option if you need SPI function mode.
  261. endchoice
  262. config BSP_USING_UUART0_TX_DMA
  263. bool "Enable UUART0 TX DMA"
  264. depends on BSP_USING_UUART0 && RT_SERIAL_USING_DMA
  265. config BSP_USING_UUART0_RX_DMA
  266. bool "Enable UUART0 RX DMA"
  267. depends on BSP_USING_UUART0 && RT_SERIAL_USING_DMA
  268. config BSP_USING_USPI0_PDMA
  269. bool "Use PDMA for data transferring"
  270. select BSP_USING_USPI_PDMA
  271. depends on BSP_USING_USPI0
  272. endif
  273. config BSP_USING_USCI1
  274. bool "Enable USCI1"
  275. if BSP_USING_USCI1
  276. choice
  277. prompt "Select USCI1 function mode"
  278. config BSP_USING_UUART1
  279. select RT_USING_SERIAL
  280. select BSP_USING_UUART
  281. bool "UUART1"
  282. help
  283. Choose this option if you need UART function mode.
  284. config BSP_USING_UI2C1
  285. select RT_USING_I2C
  286. select BSP_USING_UI2C
  287. bool "UI2C1"
  288. help
  289. Choose this option if you need I2C function mode.
  290. config BSP_USING_USPI1
  291. select RT_USING_SPI
  292. select BSP_USING_USPI
  293. bool "USPI1"
  294. help
  295. Choose this option if you need SPI function mode.
  296. endchoice
  297. config BSP_USING_UUART1_TX_DMA
  298. bool "Enable UUART1 TX DMA"
  299. depends on BSP_USING_UUART1 && RT_SERIAL_USING_DMA
  300. config BSP_USING_UUART1_RX_DMA
  301. bool "Enable UUART1 RX DMA"
  302. depends on BSP_USING_UUART1 && RT_SERIAL_USING_DMA
  303. config BSP_USING_USPI1_PDMA
  304. bool "Use PDMA for data transferring"
  305. select BSP_USING_USPI_PDMA
  306. depends on BSP_USING_USPI1
  307. endif
  308. endif
  309. menuconfig BSP_USING_BPWM
  310. bool "Enable Basic PWM Generator and Capture Timer(BPWM)"
  311. select RT_USING_PWM
  312. if BSP_USING_BPWM
  313. config BSP_USING_BPWM_CAPTURE
  314. bool
  315. choice
  316. prompt "Select BPWM0 function mode"
  317. config BSP_USING_BPWM0
  318. select RT_USING_PWM
  319. bool "Enable BPWM0"
  320. help
  321. Choose this option if you need PWM function mode.
  322. config BSP_USING_BPWM0_CAPTURE
  323. select RT_USING_INPUT_CAPTURE
  324. select BSP_USING_BPWM_CAPTURE
  325. bool "Enable BPWM0_CAPTURE"
  326. help
  327. Choose this option if you need PWM capture function mode.
  328. endchoice
  329. if BSP_USING_BPWM0_CAPTURE
  330. config BSP_USING_BPWM0_CAPTURE_CHMSK
  331. hex "Specify channel mask for BPWM0_CAP channel."
  332. range 0 0x3F
  333. default 0
  334. endif
  335. choice
  336. prompt "Select BPWM1 function mode"
  337. config BSP_USING_BPWM1
  338. select RT_USING_PWM
  339. bool "Enable BPWM1"
  340. help
  341. Choose this option if you need PWM function mode.
  342. config BSP_USING_BPWM1_CAPTURE
  343. select RT_USING_INPUT_CAPTURE
  344. select BSP_USING_BPWM_CAPTURE
  345. bool "Enable BPWM1_CAPTURE"
  346. help
  347. Choose this option if you need PWM capture function mode.
  348. endchoice
  349. if BSP_USING_BPWM1_CAPTURE
  350. config BSP_USING_BPWM1_CAPTURE_CHMSK
  351. hex "Specify channel mask for BPWM1_CAP channel."
  352. range 0 0x3F
  353. default 0
  354. endif
  355. endif
  356. menuconfig BSP_USING_PWM
  357. bool "Enable PWM Generator and Capture Timer(PWM)"
  358. if BSP_USING_PWM
  359. config BSP_USING_PWM_CAPTURE
  360. bool
  361. choice
  362. prompt "Select PWM0 function mode"
  363. config BSP_USING_PWM0
  364. select RT_USING_PWM
  365. bool "Enable PWM0"
  366. help
  367. Choose this option if you need PWM function mode.
  368. config BSP_USING_PWM0_CAPTURE
  369. select RT_USING_INPUT_CAPTURE
  370. select BSP_USING_PWM_CAPTURE
  371. bool "Enable PWM0_CAPTURE"
  372. help
  373. Choose this option if you need PWM capture function mode.
  374. endchoice
  375. if BSP_USING_PWM0_CAPTURE
  376. config BSP_USING_PWM0_CAPTURE_CHMSK
  377. hex "Specify channel mask for PWM0_CAP channel."
  378. range 0 0x3F
  379. default 0
  380. endif
  381. choice
  382. prompt "Select PWM1 function mode"
  383. config BSP_USING_PWM1
  384. select RT_USING_PWM
  385. bool "Enable PWM1"
  386. help
  387. Choose this option if you need PWM function mode.
  388. config BSP_USING_PWM1_CAPTURE
  389. select RT_USING_INPUT_CAPTURE
  390. select BSP_USING_PWM_CAPTURE
  391. bool "Enable PWM1_CAPTURE"
  392. help
  393. Choose this option if you need PWM capture function mode.
  394. endchoice
  395. if BSP_USING_PWM1_CAPTURE
  396. config BSP_USING_PWM1_CAPTURE_CHMSK
  397. hex "Specify channel mask for PWM1_CAP channel."
  398. range 0 0x3F
  399. default 0
  400. endif
  401. endif
  402. menuconfig BSP_USING_SPI
  403. bool "Enable Serial Peripheral Interface(SPI)"
  404. select RT_USING_SPI
  405. if BSP_USING_SPI
  406. config BSP_USING_SPI_PDMA
  407. bool
  408. default n
  409. config BSP_USING_SPII2S
  410. bool
  411. default n
  412. choice
  413. prompt "Select SPI0 function mode"
  414. config BSP_USING_SPI0_NONE
  415. bool "NONE"
  416. help
  417. Choose this option if you need not SPI0.
  418. config BSP_USING_SPI0
  419. bool "Enable SPI0"
  420. help
  421. Choose this option if you need SPI function mode.
  422. config BSP_USING_SPII2S0
  423. select RT_USING_AUDIO
  424. select BSP_USING_SPII2S
  425. bool "Enable SPII2S0"
  426. help
  427. Choose this option if you need SPII2S function mode.
  428. endchoice
  429. if BSP_USING_SPI0
  430. config BSP_USING_SPI0_PDMA
  431. bool "Enable PDMA for SPI0"
  432. select BSP_USING_SPI_PDMA
  433. depends on BSP_USING_SPI0
  434. endif
  435. endif
  436. menuconfig BSP_USING_QSPI
  437. bool "Enable Quad Serial Peripheral Interface(QSPI)"
  438. select RT_USING_SPI
  439. select RT_USING_QSPI
  440. select BSP_USING_SPI
  441. if BSP_USING_QSPI
  442. config BSP_USING_QSPI0
  443. bool "Enable QSPI0"
  444. config BSP_USING_QSPI0_PDMA
  445. bool "Enable PDMA for QSPI0"
  446. select BSP_USING_SPI_PDMA
  447. depends on BSP_USING_QSPI0
  448. endif
  449. menuconfig BSP_USING_CRC
  450. bool "Enable Cyclic Redundancy Check Generator(CRC)"
  451. select BSP_USING_CRYPTO
  452. select RT_USING_HWCRYPTO
  453. select RT_HWCRYPTO_USING_CRC
  454. select RT_HWCRYPTO_USING_CRC_07
  455. select RT_HWCRYPTO_USING_CRC_8005
  456. select RT_HWCRYPTO_USING_CRC_1021
  457. select RT_HWCRYPTO_USING_CRC_04C11DB7
  458. if BSP_USING_CRC
  459. config NU_CRC_USE_PDMA
  460. bool "Use PDMA for data transferring."
  461. select BSP_USING_PDMA
  462. default y
  463. endif
  464. menuconfig BSP_USING_SOFT_I2C
  465. bool "Enable SOFT I2C"
  466. if BSP_USING_SOFT_I2C
  467. config BSP_USING_SOFT_I2C0
  468. bool "Enable SOFT I2C0"
  469. select RT_USING_I2C
  470. select RT_USING_I2C_BITOPS
  471. default n
  472. if BSP_USING_SOFT_I2C0
  473. config BSP_SOFT_I2C0_SCL_PIN
  474. hex "Specify the pin index of SCL of SOFT I2C0"
  475. range 0 0x7F
  476. default 0x18
  477. config BSP_SOFT_I2C0_SDA_PIN
  478. hex "Specify the pin index of SDA of SOFT I2C0"
  479. range 0 0x7F
  480. default 0x17
  481. endif
  482. config BSP_USING_SOFT_I2C1
  483. bool "Enable SOFT I2C1"
  484. select RT_USING_I2C
  485. select RT_USING_I2C_BITOPS
  486. default n
  487. if BSP_USING_SOFT_I2C1
  488. config BSP_SOFT_I2C1_SCL_PIN
  489. hex "Specify the pin index of SCL of SOFT I2C1"
  490. range 0 0x7F
  491. default 0x0B
  492. config BSP_SOFT_I2C1_SDA_PIN
  493. hex "Specify the pin index of SDA of SOFT I2C1"
  494. range 0 0x7F
  495. default 0x0A
  496. endif
  497. endif
  498. config BSP_USING_WDT
  499. bool "Enable Watchdog Timer(WDT)"
  500. select RT_USING_WDT
  501. default y
  502. config BSP_USING_EBI
  503. bool "Enable External Bus Interface(EBI)"
  504. default n
  505. config BSP_USING_USBD
  506. bool "Enable Full-Speed USB Device Controller(USBD)"
  507. select RT_USING_USB_DEVICE