syscfg.yml 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526
  1. # Licensed to the Apache Software Foundation (ASF) under one
  2. # or more contributor license agreements. See the NOTICE file
  3. # distributed with this work for additional information
  4. # regarding copyright ownership. The ASF licenses this file
  5. # to you under the Apache License, Version 2.0 (the
  6. # "License"); you may not use this file except in compliance
  7. # with the License. You may obtain a copy of the License at
  8. #
  9. # http://www.apache.org/licenses/LICENSE-2.0
  10. #
  11. # Unless required by applicable law or agreed to in writing,
  12. # software distributed under the License is distributed on an
  13. # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  14. # KIND, either express or implied. See the License for the
  15. # specific language governing permissions and limitations
  16. # under the License.
  17. #
  18. syscfg.defs:
  19. MCU_TARGET:
  20. description: >
  21. Specifies target MCU, shall be set by BSP.
  22. value:
  23. restrictions:
  24. - $notnull
  25. choices:
  26. - nRF52810
  27. - nRF52811
  28. - nRF52832
  29. - nRF52840
  30. MCU_FLASH_MIN_WRITE_SIZE:
  31. description: >
  32. Specifies the required alignment for internal flash writes.
  33. Used internally by the newt tool.
  34. value: 1
  35. MCU_DCDC_ENABLED:
  36. description: >
  37. Specifies whether or not to enable DC/DC regulator. This requires
  38. external circuitry so is defined to be zero by default and
  39. expected to be overridden by the BSP.
  40. value: 0
  41. MCU_HFCLK_SOURCE:
  42. description: >
  43. Selected source for high frequency clock (HFCLK).
  44. Selecting HFXO will still mostly use the HFINT but will switch to HFXO when requested (BLE, certain timers, etc...)
  45. Selecting HFINT should only be used in the case where an external 32MHz crystal oscillator is not present.
  46. value: HFXO
  47. choices:
  48. - HFXO
  49. - HFINT
  50. restrictions:
  51. - '(MCU_HFCLK_SOURCE == "HFXO") || (MCU_LFCLK_SOURCE != "LFSYNTH")'
  52. MCU_LFCLK_SOURCE:
  53. description: >
  54. Selected source for low frequency clock (LFCLK).
  55. value:
  56. choices:
  57. - LFRC # 32.768 kHz RC oscillator
  58. - LFXO # 32.768 kHz crystal oscillator
  59. - LFSYNTH # 32.768 kHz synthesized from HFCLK
  60. MCU_I2C_RECOVERY_DELAY_USEC:
  61. description: >
  62. Time to wait for activity on SCL line after triggering start task
  63. before restarting TWI controller. This is to recover from state
  64. where controller is unresponsive due to glitch on I2C bus.
  65. Note: Default value seems to work fine, but may need to be tuned.
  66. value: 100
  67. MCU_BUS_DRIVER_I2C_USE_TWIM:
  68. description: >
  69. Enables usage of i2c_nrf52_twim bus driver for I2C.
  70. If disabled, standard i2c_hal driver is used.
  71. value: 0
  72. MCU_GPIO_USE_PORT_EVENT:
  73. description: >
  74. When enabled, hal_gpio will use GPIOTE PORT event instead of PIN
  75. events for interrupts. This mode may be less accurate (i.e. pulse
  76. length needs to be longer in order to be detected) but it reduces
  77. power consumption since it does not require HFCLK to be running.
  78. Refer to nRF52xxx Product Specification document for more details.
  79. value: 0
  80. MCU_DEBUG_IGNORE_BKPT:
  81. description: >
  82. When enabled, asm(bkpt) will be ignored. If not set, it will hit
  83. the breakpoint wherever it gets called, For example, reset and crash
  84. value: 0
  85. # MCU peripherals definitions
  86. I2C_0:
  87. description: 'Enable nRF52xxx I2C (TWI) 0'
  88. value: 0
  89. restrictions:
  90. - '!(SPI_0_MASTER && ((MCU_TARGET == "nrf52832") || (MCU_TARGET == "nrf52840")))'
  91. - '!(SPI_0_SLAVE && ((MCU_TARGET == "nrf52832") || (MCU_TARGET == "nrf52840")))'
  92. - '!(SPI_1_MASTER && (MCU_TARGET == "nrf52811"))'
  93. - '!(SPI_1_SLAVE && (MCU_TARGET == "nrf52811"))'
  94. I2C_0_PIN_SCL:
  95. description: 'SCL pin for I2C_0'
  96. value: ''
  97. I2C_0_PIN_SDA:
  98. description: 'SDA pin for I2C_0'
  99. value: ''
  100. I2C_0_FREQ_KHZ:
  101. description: 'Frequency [kHz] for I2C_0'
  102. value: 100
  103. I2C_1:
  104. description: 'Enable nRF52xxx I2C (TWI) 1'
  105. value: 0
  106. restrictions:
  107. - "!SPI_1_MASTER"
  108. - "!SPI_1_SLAVE"
  109. I2C_1_PIN_SCL:
  110. description: 'SCL pin for I2C_1'
  111. value: ''
  112. I2C_1_PIN_SDA:
  113. description: 'SDA pin for I2C_1'
  114. value: ''
  115. I2C_1_FREQ_KHZ:
  116. description: 'Frequency [kHz] for I2C_1'
  117. value: 100
  118. SPI_0_MASTER:
  119. description: 'Enable nRF52xxx SPI Master 0'
  120. value: 0
  121. restrictions:
  122. - "!SPI_0_SLAVE"
  123. - '!(I2C_0 && ((MCU_TARGET == "nrf52832") || (MCU_TARGET == "nrf52840")))'
  124. SPI_0_MASTER_PIN_SCK:
  125. description: 'SCK pin for SPI_0_MASTER'
  126. value: ''
  127. SPI_0_MASTER_PIN_MOSI:
  128. description: 'MOSI pin for SPI_0_MASTER'
  129. value: ''
  130. SPI_0_MASTER_PIN_MISO:
  131. description: 'MISO pin for SPI_0_MASTER'
  132. value: ''
  133. SPI_0_SLAVE:
  134. description: 'Enable nRF52xxx SPI Slave 0'
  135. value: 0
  136. restrictions:
  137. - "!SPI_0_MASTER"
  138. - '!(I2C_0 && ((MCU_TARGET == "nrf52832") || (MCU_TARGET == "nrf52840")))'
  139. SPI_0_SLAVE_PIN_SCK:
  140. description: 'SCK pin for SPI_0_SLAVE'
  141. value: ''
  142. SPI_0_SLAVE_PIN_MOSI:
  143. description: 'MOSI pin for SPI_0_SLAVE'
  144. value: ''
  145. SPI_0_SLAVE_PIN_MISO:
  146. description: 'MISO pin for SPI_0_SLAVE'
  147. value: ''
  148. SPI_0_SLAVE_PIN_SS:
  149. description: 'SS pin for SPI_0_SLAVE'
  150. value: ''
  151. SPI_1_MASTER:
  152. description: 'Enable nRF52xxx SPI Master 1'
  153. value: 0
  154. restrictions:
  155. - "!SPI_1_SLAVE"
  156. - '!(I2C_1 && ((MCU_TARGET == "nrf52832") || (MCU_TARGET == "nrf52840")))'
  157. - '!(I2C_0 && ((MCU_TARGET == "nrf52811")))'
  158. SPI_1_MASTER_PIN_SCK:
  159. description: 'SCK pin for SPI_1_MASTER'
  160. value: ''
  161. SPI_1_MASTER_PIN_MOSI:
  162. description: 'MOSI pin for SPI_1_MASTER'
  163. value: ''
  164. SPI_1_MASTER_PIN_MISO:
  165. description: 'MISO pin for SPI_1_MASTER'
  166. value: ''
  167. SPI_1_SLAVE:
  168. description: 'Enable nRF52xxx SPI Slave 1'
  169. value: 0
  170. restrictions:
  171. - "!SPI_1_MASTER"
  172. - '!(I2C_1 && ((MCU_TARGET == "nrf52832") || (MCU_TARGET == "nrf52840")))'
  173. - '!(I2C_0 && ((MCU_TARGET == "nrf52811")))'
  174. SPI_1_SLAVE_PIN_SCK:
  175. description: 'SCK pin for SPI_1_SLAVE'
  176. value: ''
  177. SPI_1_SLAVE_PIN_MOSI:
  178. description: 'MOSI pin for SPI_1_SLAVE'
  179. value: ''
  180. SPI_1_SLAVE_PIN_MISO:
  181. description: 'MISO pin for SPI_1_SLAVE'
  182. value: ''
  183. SPI_1_SLAVE_PIN_SS:
  184. description: 'SS pin for SPI_1_SLAVE'
  185. value: ''
  186. SPI_2_MASTER:
  187. description: 'Enable nRF52xxx SPI Master 2'
  188. value: 0
  189. restrictions:
  190. - "!SPI_2_SLAVE"
  191. SPI_2_MASTER_PIN_SCK:
  192. description: 'SCK pin for SPI_2_MASTER'
  193. value: ''
  194. SPI_2_MASTER_PIN_MOSI:
  195. description: 'MOSI pin for SPI_2_MASTER'
  196. value: ''
  197. SPI_2_MASTER_PIN_MISO:
  198. description: 'MISO pin for SPI_2_MASTER'
  199. value: ''
  200. SPI_2_SLAVE:
  201. description: 'Enable nRF52xxx SPI Slave 2'
  202. value: 0
  203. restrictions:
  204. - "!SPI_2_MASTER"
  205. SPI_2_SLAVE_PIN_SCK:
  206. description: 'SCK pin for SPI_2_SLAVE'
  207. value: ''
  208. SPI_2_SLAVE_PIN_MOSI:
  209. description: 'MOSI pin for SPI_2_SLAVE'
  210. value: ''
  211. SPI_2_SLAVE_PIN_MISO:
  212. description: 'MISO pin for SPI_2_SLAVE'
  213. value: ''
  214. SPI_2_SLAVE_PIN_SS:
  215. description: 'SS pin for SPI_2_SLAVE'
  216. value: ''
  217. SPI_3_MASTER:
  218. description: 'Enable nRF52xxx SPI Master 3'
  219. value: 0
  220. restrictions:
  221. - 'MCU_TARGET == "nRF52840" || !SPI_3_MASTER'
  222. SPI_3_MASTER_PIN_SCK:
  223. description: 'SCK pin for SPI_3_MASTER'
  224. value: ''
  225. SPI_3_MASTER_PIN_MOSI:
  226. description: 'MOSI pin for SPI_3_MASTER'
  227. value: ''
  228. SPI_3_MASTER_PIN_MISO:
  229. description: 'MISO pin for SPI_3_MASTER'
  230. value: ''
  231. ADC_0:
  232. description: 'Enable nRF52xxx ADC 0'
  233. value: 0
  234. ADC_0_REFMV_0:
  235. description: 'reference mV in AREF0 if used'
  236. value: 0
  237. PWM_0:
  238. description: 'Enable nRF52xxx PWM 0'
  239. value: 0
  240. PWM_1:
  241. description: 'Enable nRF52xxx PWM 1'
  242. value: 0
  243. PWM_2:
  244. description: 'Enable nRF52xxx PWM 2'
  245. value: 0
  246. PWM_3:
  247. description: 'Enable nRF52xxx PWM 3'
  248. value: 0
  249. restrictions:
  250. - 'MCU_TARGET == "nRF52840" || !PWM_3'
  251. TRNG:
  252. description: 'Enable nRF52xxx TRNG'
  253. value: 0
  254. CRYPTO:
  255. description: 'Enable nRF52xxx CRYPTO'
  256. value: 0
  257. UART_0:
  258. description: 'Enable nRF52xxx UART0'
  259. value: 1
  260. UART_0_PIN_TX:
  261. description: 'TX pin for UART0'
  262. value: ''
  263. UART_0_PIN_RX:
  264. description: 'RX pin for UART0'
  265. value: ''
  266. UART_0_PIN_RTS:
  267. description: 'RTS pin for UART0'
  268. value: -1
  269. UART_0_PIN_CTS:
  270. description: 'CTS pin for UART0'
  271. value: -1
  272. UART_1:
  273. description: 'Enable nRF52xxx UART1'
  274. value: 0
  275. restrictions:
  276. - 'MCU_TARGET == "nRF52840" || !UART_1'
  277. UART_1_PIN_TX:
  278. description: 'TX pin for UART1'
  279. value: ''
  280. UART_1_PIN_RX:
  281. description: 'RX pin for UART1'
  282. value: ''
  283. UART_1_PIN_RTS:
  284. description: 'RTS pin for UART1'
  285. value: -1
  286. UART_1_PIN_CTS:
  287. description: 'CTS pin for UART1'
  288. value: -1
  289. TEMP:
  290. description: 'Enable nRF52xxx internal temperature mesurement'
  291. value: 0
  292. TIMER_0:
  293. description: 'Enable nRF52xxx Timer 0'
  294. value: 1
  295. TIMER_1:
  296. description: 'Enable nRF52xxx Timer 1'
  297. value: 0
  298. TIMER_2:
  299. description: 'Enable nRF52xxx Timer 2'
  300. value: 0
  301. TIMER_3:
  302. description: 'Enable nRF52xxx Timer 3'
  303. value: 0
  304. TIMER_4:
  305. description: 'Enable nRF52xxx Timer 4'
  306. value: 0
  307. TIMER_5:
  308. description: 'Enable nRF52xxx RTC 0'
  309. value: 0
  310. QSPI_ENABLE:
  311. description: 'NRF52 QSPI'
  312. value: 0
  313. QSPI_READOC:
  314. description: >
  315. QSPI Command to use
  316. 0 - 0x09 Fast Read
  317. 1 - 0x3B Fast Read Dual Output
  318. 2 - 0xBB Fast Read Dual I/O
  319. 3 - 0x6B Fast Read Quad Output
  320. 4 - 0xEB Fast Read Quad I/O
  321. value: 0
  322. QSPI_WRITEOC:
  323. description: >
  324. QSPI Command to use
  325. 0 - 0x02 Page program
  326. 1 - 0xA2 Page program Dual Data
  327. 2 - 0x32 Page program Quad Data
  328. 3 - 0x38 Page program Quad I/O
  329. value: 0
  330. QSPI_ADDRMODE:
  331. description: 'Address lentgh 0=24 bits, 1=32 bits'
  332. value: 0
  333. QSPI_DPMCONFIG:
  334. description: 'Deep power mode enable'
  335. value: 0
  336. QSPI_SCK_DELAY:
  337. description: >
  338. Minimum amount of time that the CSN pin must stay high
  339. before it can go low again. Value is specified in number of 16
  340. MHz periods (62.5 ns).
  341. value: 0
  342. QSPI_SCK_FREQ:
  343. description: '32MHz clock divider (0-31). Clock = 32MHz / (1+divider)'
  344. value: 0
  345. QSPI_SPI_MODE:
  346. description: 'SPI 0=Mode0 or 1=Mode3'
  347. value: 0
  348. QSPI_FLASH_SECTOR_SIZE:
  349. description: 'QSPI sector size. In most cases it should be 4096.'
  350. value: 0
  351. QSPI_FLASH_PAGE_SIZE:
  352. description: >
  353. QSPI page size. Writes can only be performed to one page at a time.
  354. In most cases it should be 256.
  355. value: 0
  356. QSPI_FLASH_SECTOR_COUNT:
  357. description: 'QSPI sector count'
  358. value: -1
  359. QSPI_PIN_CS:
  360. description: 'CS pin for QSPI'
  361. value: -1
  362. QSPI_PIN_SCK:
  363. description: 'SCK pin for QSPI'
  364. value: -1
  365. QSPI_PIN_DIO0:
  366. description: 'DIO0 pin for QSPI'
  367. value: -1
  368. QSPI_PIN_DIO1:
  369. description: 'DIO1 pin for QSPI'
  370. value: -1
  371. QSPI_PIN_DIO2:
  372. description: 'DIO2 pin for QSPI'
  373. value: -1
  374. QSPI_PIN_DIO3:
  375. description: 'DIO3 pin for QSPI'
  376. value: -1
  377. NFC_PINS_AS_GPIO:
  378. description: 'Use NFC pins as GPIOs instead of NFC functionality'
  379. value: 1
  380. GPIO_AS_PIN_RESET:
  381. description: 'Enable pin reset'
  382. value: 0
  383. # Deprecated settings
  384. MCU_NRF52832:
  385. description: Use MCU_TARGET instead
  386. value: 0
  387. restrictions:
  388. - "!MCU_NRF52840"
  389. deprecated: 1
  390. MCU_NRF52840:
  391. description: Use MCU_TARGET instead
  392. value: 0
  393. restrictions:
  394. - "!MCU_NRF52832"
  395. deprecated: 1
  396. XTAL_32768:
  397. description: Use MCU_LFCLK_SOURCE instead
  398. value: 0
  399. restrictions:
  400. - "!XTAL_RC"
  401. - "!XTAL_32768_SYNTH"
  402. deprecated: 1
  403. XTAL_RC:
  404. description: Use MCU_LFCLK_SOURCE instead
  405. value: 0
  406. restrictions:
  407. - "!XTAL_32768"
  408. - "!XTAL_32768_SYNTH"
  409. deprecated: 1
  410. XTAL_32768_SYNTH:
  411. description: Use MCU_LFCLK_SOURCE instead
  412. value: 0
  413. restrictions:
  414. - "!XTAL_32768"
  415. - "!XTAL_RC"
  416. deprecated: 1
  417. MCU_NATIVE_USE_SIGNALS:
  418. description: >
  419. Whether to use POSIX signals to implement context switches. Valid
  420. values are as follows:
  421. 1: More correctness; less stability. The OS tick timer will
  422. cause a high-priority task to preempt a low-priority task.
  423. This causes stability issues because a task can be preempted
  424. while it is in the middle of a system call, potentially
  425. causing deadlock or memory corruption.
  426. 0: Less correctness; more stability. The OS tick timer only
  427. runs while the idle task is active. Therefore, a sleeping
  428. high-priority task will not preempt a low-priority task due
  429. to a timing event (e.g., delay or callout expired).
  430. However, this version of sim does not suffer from the
  431. stability issues that affect the "signals" implementation.
  432. Unit tests should use 1. Long-running sim processes should use 0.
  433. value: 1
  434. MCU_NATIVE:
  435. description: >
  436. Set to indicate that we are using native mcu.
  437. value: 1
  438. MCU_FLASH_STYLE_ST:
  439. description: Emulated flash layout is similar to one in STM32.
  440. value: 0
  441. restrictions:
  442. - "!MCU_FLASH_STYLE_NORDIC"
  443. MCU_FLASH_STYLE_NORDIC:
  444. description: >
  445. Emulated flash layout is similar to one in NRF51/2 and SAMD21.
  446. value: 1
  447. restrictions:
  448. - "!MCU_FLASH_STYLE_ST"
  449. MCU_UART_POLLER_PRIO:
  450. description: 'Priority of native UART poller task.'
  451. type: task_priority
  452. value: 1
  453. MCU_TIMER_POLLER_PRIO:
  454. description: 'Priority of native HAL timer task.'
  455. type: task_priority
  456. value: 0
  457. syscfg.vals:
  458. OS_TICKS_PER_SEC: 128
  459. syscfg.vals.MCU_NRF52832:
  460. MCU_TARGET: nRF52832
  461. syscfg.vals.MCU_NRF52840:
  462. MCU_TARGET: nRF52840
  463. syscfg.vals.XTAL_32768:
  464. MCU_LFCLK_SOURCE: LFXO
  465. syscfg.vals.XTAL_RC:
  466. MCU_LFCLK_SOURCE: LFRC
  467. syscfg.vals.XTAL_32768_SYNTH:
  468. MCU_LFCLK_SOURCE: LFSYNTH
  469. syscfg.restrictions:
  470. - "!I2C_0 || (I2C_0_PIN_SCL && I2C_0_PIN_SDA)"
  471. - "!I2C_1 || (I2C_1_PIN_SCL && I2C_1_PIN_SDA)"
  472. - "!SPI_0_MASTER || (SPI_0_MASTER_PIN_SCK && SPI_0_MASTER_PIN_MOSI && SPI_0_MASTER_PIN_MISO)"
  473. - "!SPI_1_MASTER || (SPI_1_MASTER_PIN_SCK && SPI_1_MASTER_PIN_MOSI && SPI_1_MASTER_PIN_MISO)"
  474. - "!SPI_2_MASTER || (SPI_2_MASTER_PIN_SCK && SPI_2_MASTER_PIN_MOSI && SPI_2_MASTER_PIN_MISO)"
  475. - "!SPI_3_MASTER || (SPI_3_MASTER_PIN_SCK && SPI_3_MASTER_PIN_MOSI && SPI_3_MASTER_PIN_MISO)"
  476. - "!SPI_0_SLAVE || (SPI_0_SLAVE_PIN_SCK && SPI_0_SLAVE_PIN_MOSI && SPI_0_SLAVE_PIN_MISO && SPI_0_SLAVE_PIN_SS)"
  477. - "!SPI_1_SLAVE || (SPI_1_SLAVE_PIN_SCK && SPI_1_SLAVE_PIN_MOSI && SPI_1_SLAVE_PIN_MISO && SPI_1_SLAVE_PIN_SS)"
  478. - "!SPI_2_SLAVE || (SPI_2_SLAVE_PIN_SCK && SPI_2_SLAVE_PIN_MOSI && SPI_2_SLAVE_PIN_MISO && SPI_2_SLAVE_PIN_SS)"
  479. - "!UART_0 || (UART_0_PIN_TX && UART_0_PIN_RX)"
  480. - "!UART_1 || (UART_1_PIN_TX && UART_1_PIN_RX)"
  481. - "(OS_TICKS_PER_SEC == 128 || OS_TICKS_PER_SEC == 256 || OS_TICKS_PER_SEC == 512 || OS_TICKS_PER_SEC == 1024)"