Kconfig 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494
  1. menu "Hardware Drivers Config"
  2. config SOC_NRF52832
  3. bool
  4. config SOC_NRF52832
  5. select RT_USING_COMPONENTS_INIT
  6. select RT_USING_USER_MAIN
  7. default y
  8. config NRFX_CLOCK_ENABLED
  9. int
  10. default 1
  11. config NRFX_CLOCK_DEFAULT_CONFIG_IRQ_PRIORITY
  12. int
  13. default 7
  14. config NRFX_CLOCK_CONFIG_LF_SRC
  15. int
  16. default 1
  17. config SOC_NORDIC
  18. bool
  19. config SOC_NORDIC
  20. default y
  21. menu "Onboard Peripheral Drivers"
  22. config BSP_USING_JLINK_TO_USART
  23. bool "Enable JLINK TO USART (uart0|RX_PIN:8|TX_PIN:6)"
  24. select BSP_USING_UART
  25. select BSP_USING_UART0
  26. default y
  27. endmenu
  28. menu "On-chip Peripheral Drivers"
  29. config BSP_USING_GPIO
  30. bool "Enable GPIO"
  31. select RT_USING_PIN
  32. default y
  33. if BSP_USING_GPIO
  34. config NRFX_GPIOTE_ENABLED
  35. int
  36. default 1
  37. endif
  38. config BSP_USING_SAADC
  39. bool "Enable SAADC"
  40. select RT_USING_ADC
  41. default n
  42. if BSP_USING_SAADC
  43. config NRFX_SAADC_ENABLED
  44. int
  45. default 1
  46. endif
  47. menuconfig BSP_USING_PWM
  48. bool "Enable PWM"
  49. select RT_USING_PWM
  50. default n
  51. if BSP_USING_PWM
  52. config NRFX_PWM_ENABLED
  53. int
  54. default 1
  55. config BSP_USING_PWM0
  56. bool "Enable PWM0 bus"
  57. default y
  58. if BSP_USING_PWM0
  59. config NRFX_PWM0_ENABLED
  60. int
  61. default 1
  62. config BSP_USING_PWM0_CH0
  63. int "PWM0 channel 0 pin number set"
  64. range 0 47
  65. default 17
  66. config BSP_USING_PWM0_CH1
  67. int "PWM0 channel 1 pin number set"
  68. range 0 47
  69. default 18
  70. config BSP_USING_PWM0_CH2
  71. int "PWM0 channel 2 pin number set"
  72. range 0 47
  73. default 19
  74. config BSP_USING_PWM0_CH3
  75. int "PWM0 channel 3 pin number set"
  76. range 0 47
  77. default 20
  78. endif
  79. config BSP_USING_PWM1
  80. bool "Enable PWM1 bus"
  81. default n
  82. if BSP_USING_PWM1
  83. config NRFX_PWM1_ENABLED
  84. int
  85. default 1
  86. config BSP_USING_PWM1_CH0
  87. int "PWM1 channel 0 pin number set"
  88. range 0 47
  89. default 13
  90. config BSP_USING_PWM1_CH1
  91. int "PWM1 channel 1 pin number set"
  92. range 0 47
  93. default 14
  94. config BSP_USING_PWM1_CH2
  95. int "PWM1 channel 2 pin number set"
  96. range 0 47
  97. default 15
  98. config BSP_USING_PWM1_CH3
  99. int "PWM1 channel 3 pin number set"
  100. range 0 47
  101. default 16
  102. endif
  103. config BSP_USING_PWM2
  104. bool "Enable PWM2 bus"
  105. default n
  106. if BSP_USING_PWM2
  107. config NRFX_PWM2_ENABLED
  108. int
  109. default 1
  110. config BSP_USING_PWM2_CH0
  111. int "PWM2 channel 0 pin number set"
  112. range 0 47
  113. default 13
  114. config BSP_USING_PWM2_CH1
  115. int "PWM2 channel 1 pin number set"
  116. range 0 47
  117. default 14
  118. config BSP_USING_PWM2_CH2
  119. int "PWM2 channel 2 pin number set"
  120. range 0 47
  121. default 15
  122. config BSP_USING_PWM2_CH3
  123. int "PWM2 channel 3 pin number set"
  124. range 0 47
  125. default 16
  126. endif
  127. config BSP_USING_PWM3
  128. bool "Enable PWM3 bus"
  129. default n
  130. if BSP_USING_PWM3
  131. config NRFX_PWM3_ENABLED
  132. int
  133. default 1
  134. config BSP_USING_PWM3_CH0
  135. int "PWM3 channel 0 pin number set"
  136. range 0 47
  137. default 13
  138. config BSP_USING_PWM3_CH1
  139. int "PWM3 channel 1 pin number set"
  140. range 0 47
  141. default 14
  142. config BSP_USING_PWM3_CH2
  143. int "PWM3 channel 2 pin number set"
  144. range 0 47
  145. default 15
  146. config BSP_USING_PWM3_CH3
  147. int "PWM3 channel 3 pin number set"
  148. range 0 47
  149. default 16
  150. endif
  151. endif
  152. config BSP_USING_UART
  153. bool "Enable UART"
  154. default y
  155. select RT_USING_SERIAL
  156. if BSP_USING_UART
  157. choice
  158. prompt "UART or UARTE"
  159. default NRFX_USING_UART
  160. help
  161. Select the UART or UARTE
  162. config NRFX_USING_UART
  163. bool "UART"
  164. config NRFX_USING_UARTE
  165. bool "UARTE"
  166. endchoice
  167. endif
  168. if BSP_USING_UART&&NRFX_USING_UART
  169. config NRFX_UART_ENABLED
  170. int
  171. default 1
  172. config BSP_USING_UART0
  173. bool "Enable UART0"
  174. default y
  175. if BSP_USING_UART0
  176. config NRFX_UART0_ENABLED
  177. int
  178. default 1
  179. config BSP_UART0_RX_PIN
  180. int "uart0 rx pin number"
  181. range 0 31
  182. default 8
  183. config BSP_UART0_TX_PIN
  184. int "uart0 tx pin number"
  185. range 0 31
  186. default 6
  187. endif
  188. endif
  189. if BSP_USING_UART&&NRFX_USING_UARTE
  190. config NRFX_UARTE_ENABLED
  191. int
  192. default 1
  193. config BSP_USING_UART0
  194. bool "Enable UARTE0"
  195. default n
  196. if BSP_USING_UART0
  197. config NRFX_UARTE0_ENABLED
  198. int
  199. default 1
  200. config BSP_UART0_RX_PIN
  201. int "uarte0 rx pin number"
  202. range 0 31
  203. default 8
  204. config BSP_UART0_TX_PIN
  205. int "uarte0 tx pin number"
  206. range 0 31
  207. default 6
  208. endif
  209. endif
  210. config BSP_USING_I2C
  211. bool "Enable I2C"
  212. select RT_USING_I2C
  213. default n
  214. if BSP_USING_I2C
  215. config NRFX_TWIM_ENABLED
  216. int
  217. default 1
  218. config BSP_USING_I2C0
  219. bool "Enable I2C0 bus"
  220. default n
  221. if BSP_USING_I2C0
  222. config NRFX_TWIM0_ENABLED
  223. int
  224. default 1
  225. config BSP_I2C0_SCL_PIN
  226. int "i2c0 scl pin number"
  227. range 0 31
  228. default 27
  229. config BSP_I2C0_SDA_PIN
  230. int "I2C0 sda pin number"
  231. range 0 31
  232. default 26
  233. endif
  234. config BSP_USING_I2C1
  235. bool "Enable I2C1 bus"
  236. default n
  237. if BSP_USING_I2C1
  238. config NRFX_TWIM1_ENABLED
  239. int
  240. default 1
  241. config BSP_I2C1_SCL_PIN
  242. int "i2c1 scl pin number"
  243. range 0 31
  244. default 3
  245. config BSP_I2C1_SDA_PIN
  246. int "I2C1 sda pin number"
  247. range 0 31
  248. default 2
  249. endif
  250. endif
  251. config BSP_USING_SPI
  252. bool "Enable SPI"
  253. select RT_USING_PIN
  254. default y
  255. if BSP_USING_SPI
  256. config NRFX_SPI_ENABLED
  257. int
  258. default 1
  259. config BSP_USING_SPI0
  260. bool "Enable SPI0 bus"
  261. default y
  262. if BSP_USING_SPI0
  263. config BSP_SPI0_SCK_PIN
  264. int "SPI0 sck pin number set"
  265. range 0 47
  266. default 28
  267. config BSP_SPI0_MOSI_PIN
  268. int "SPI0 mosi pin number set"
  269. range 0 47
  270. default 29
  271. config BSP_SPI0_MISO_PIN
  272. int "SPI0 miso pin number set"
  273. range 0 47
  274. default 30
  275. config BSP_SPI0_SS_PIN
  276. int "SPI0 ss pin number set"
  277. range 0 47
  278. default 31
  279. endif
  280. config BSP_USING_SPI1
  281. bool "Enable SPI1 bus"
  282. default n
  283. if BSP_USING_SPI1
  284. config BSP_SPI1_SCK_PIN
  285. int "SPI0 sck pin number set"
  286. range 0 47
  287. default 28
  288. config BSP_SPI1_MOSI_PIN
  289. int "SPI0 mosi pin number set"
  290. range 0 47
  291. default 29
  292. config BSP_SPI1_MISO_PIN
  293. int "SPI0 miso pin number set"
  294. range 0 47
  295. default 30
  296. config BSP_SPI1_SS_PIN
  297. int "SPI0 ss pin number set"
  298. range 0 47
  299. default 31
  300. endif
  301. config BSP_USING_SPI2
  302. bool "Enable SPI2 bus"
  303. default n
  304. if BSP_USING_SPI2
  305. config BSP_SPI2_SCK_PIN
  306. int "SPI0 sck pin number set"
  307. range 0 47
  308. default 28
  309. config BSP_SPI2_MOSI_PIN
  310. int "SPI0 mosi pin number set"
  311. range 0 47
  312. default 29
  313. config BSP_SPI2_MISO_PIN
  314. int "SPI0 miso pin number set"
  315. range 0 47
  316. default 30
  317. config BSP_SPI2_SS_PIN
  318. int "SPI0 ss pin number set"
  319. range 0 47
  320. default 31
  321. endif
  322. endif
  323. config BSP_USING_ON_CHIP_FLASH
  324. select RT_USING_FAL
  325. bool "Enable on-chip FLASH"
  326. default n
  327. config BSP_USING_ON_CHIP_FS
  328. bool "Enable on-chip filesystem"
  329. default n
  330. menu "On-chip flash config"
  331. config MCU_FLASH_START_ADDRESS
  332. hex "MCU FLASH START ADDRESS"
  333. default 0x00000000
  334. config MCU_FLASH_SIZE_KB
  335. int "MCU FLASH SIZE, MAX size 1024 KB"
  336. range 1 1024
  337. default 512
  338. config MCU_SRAM_START_ADDRESS
  339. hex "MCU RAM START ADDRESS"
  340. default 0x20000000
  341. config MCU_SRAM_SIZE_KB
  342. int "MCU RAM SIZE, MAX size 256 KB"
  343. range 1 256
  344. default 64
  345. config MCU_FLASH_PAGE_SIZE
  346. hex "MCU FLASH PAGE SIZE, please not change,nrfx default is 0x1000"
  347. range 0x1000 0x1000
  348. default 0x1000
  349. endmenu
  350. config BSP_USING_WDT
  351. bool "Enable WDT"
  352. select RT_USING_WDT
  353. default n
  354. if BSP_USING_WDT
  355. config NRFX_WDT_ENABLED
  356. int
  357. default 1
  358. config NRFX_WDT0_ENABLED
  359. int
  360. default 1
  361. config NRFX_WDT_CONFIG_NO_IRQ
  362. int
  363. default 1
  364. endif
  365. menuconfig BSP_USING_ONCHIP_RTC
  366. bool "Enable RTC"
  367. select RT_USING_RTC
  368. default n
  369. if BSP_USING_ONCHIP_RTC
  370. config NRFX_CLOCK_ENABLED
  371. int
  372. default 1
  373. config NRFX_CLOCK_DEFAULT_CONFIG_IRQ_PRIORITY
  374. int
  375. default 7
  376. config NRFX_RTC_ENABLED
  377. int
  378. default 1
  379. config NRFX_RTC0_ENABLED
  380. int
  381. default 1
  382. config NRFX_RTC1_ENABLED
  383. int
  384. default 1
  385. config NRFX_RTC2_ENABLED
  386. int
  387. default 1
  388. config RTC_INSTANCE_ID
  389. int
  390. default 2
  391. config RTC_INSTANCE_ID
  392. int "select RTC instance id, must be 0, 1, 2"
  393. range 0 2
  394. default 2
  395. endif
  396. config BSP_USING_TIM
  397. bool "Enable TIMER"
  398. select RT_USING_HWTIMER
  399. default n
  400. if BSP_USING_TIM
  401. config NRFX_TIMER_ENABLED
  402. int
  403. default 1
  404. config BSP_USING_TIM0
  405. bool "Enable TIMER0"
  406. default n
  407. if BSP_USING_TIM0
  408. config NRFX_TIMER0_ENABLED
  409. int
  410. default 1
  411. endif
  412. config BSP_USING_TIM1
  413. bool "Enable TIMER1"
  414. default n
  415. if BSP_USING_TIM1
  416. config NRFX_TIMER1_ENABLED
  417. int
  418. default 1
  419. endif
  420. config BSP_USING_TIM2
  421. bool "Enable TIMER2"
  422. default n
  423. if BSP_USING_TIM2
  424. config NRFX_TIMER2_ENABLED
  425. int
  426. default 1
  427. endif
  428. config BSP_USING_TIM3
  429. bool "Enable TIMER3"
  430. default n
  431. if BSP_USING_TIM3
  432. config NRFX_TIMER3_ENABLED
  433. int
  434. default 1
  435. endif
  436. config BSP_USING_TIM4
  437. bool "Enable TIMER4"
  438. default n
  439. if BSP_USING_TIM4
  440. config NRFX_TIMER4_ENABLED
  441. int
  442. default 1
  443. endif
  444. endif
  445. endmenu
  446. choice
  447. prompt "BLE STACK"
  448. default BLE_STACK_USING_NULL
  449. help
  450. Select the ble stack
  451. config BLE_STACK_USING_NULL
  452. bool "not use the ble stack"
  453. config BSP_USING_SOFTDEVICE
  454. select PKG_USING_NRF5X_SDK
  455. bool "Nordic softdevice(perpheral)"
  456. config BSP_USING_NIMBLE
  457. select PKG_USING_NIMBLE
  458. select PKG_NIMBLE_BSP_NRF52840
  459. bool "use nimble stack(iot)"
  460. endchoice
  461. endmenu