nrf52840_peripherals.h 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327
  1. /*
  2. Copyright (c) 2010 - 2020, Nordic Semiconductor ASA
  3. All rights reserved.
  4. Redistribution and use in source and binary forms, with or without modification,
  5. are permitted provided that the following conditions are met:
  6. 1. Redistributions of source code must retain the above copyright notice, this
  7. list of conditions and the following disclaimer.
  8. 2. Redistributions in binary form, except as embedded into a Nordic
  9. Semiconductor ASA integrated circuit in a product or a software update for
  10. such product, must reproduce the above copyright notice, this list of
  11. conditions and the following disclaimer in the documentation and/or other
  12. materials provided with the distribution.
  13. 3. Neither the name of Nordic Semiconductor ASA nor the names of its
  14. contributors may be used to endorse or promote products derived from this
  15. software without specific prior written permission.
  16. 4. This software, with or without modification, must only be used with a
  17. Nordic Semiconductor ASA integrated circuit.
  18. 5. Any software provided in binary form under this license must not be reverse
  19. engineered, decompiled, modified and/or disassembled.
  20. THIS SOFTWARE IS PROVIDED BY NORDIC SEMICONDUCTOR ASA "AS IS" AND ANY EXPRESS
  21. OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  22. OF MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE ARE
  23. DISCLAIMED. IN NO EVENT SHALL NORDIC SEMICONDUCTOR ASA OR CONTRIBUTORS BE
  24. LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
  25. CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
  26. GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  27. HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  28. LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  29. OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  30. */
  31. #ifndef _NRF52840_PERIPHERALS_H
  32. #define _NRF52840_PERIPHERALS_H
  33. /* Clock Peripheral */
  34. #define CLOCK_PRESENT
  35. #define CLOCK_COUNT 1
  36. /* Power Peripheral */
  37. #define POWER_PRESENT
  38. #define POWER_COUNT 1
  39. #define POWER_FEATURE_RAM_REGISTERS_PRESENT
  40. #define POWER_FEATURE_RAM_REGISTERS_COUNT 9
  41. #define POWER_FEATURE_VDDH_PRESENT
  42. #define POWER_FEATURE_VDDH_DCDC_PRESENT
  43. /* Non-Volatile Memory Controller */
  44. #define NVMC_PRESENT
  45. #define NVMC_COUNT 1
  46. #define NVMC_FEATURE_CACHE_PRESENT
  47. /* Floating Point Unit */
  48. #define FPU_PRESENT
  49. #define FPU_COUNT 1
  50. /* Systick timer */
  51. #define SYSTICK_PRESENT
  52. #define SYSTICK_COUNT 1
  53. /* Software Interrupts */
  54. #define SWI_PRESENT
  55. #define SWI_COUNT 6
  56. /* Memory Watch Unit */
  57. #define MWU_PRESENT
  58. #define MWU_COUNT 1
  59. /* GPIO */
  60. #define GPIO_PRESENT
  61. #define GPIO_COUNT 2
  62. #define P0_PIN_NUM 32
  63. #define P1_PIN_NUM 16
  64. #define P0_FEATURE_PINS_PRESENT 0xFFFFFFFFUL
  65. #define P1_FEATURE_PINS_PRESENT 0x0000FFFFUL
  66. /* ACL */
  67. #define ACL_PRESENT
  68. #define ACL_REGIONS_COUNT 8
  69. /* Radio */
  70. #define RADIO_PRESENT
  71. #define RADIO_COUNT 1
  72. #define RADIO_EASYDMA_MAXCNT_SIZE 8
  73. #define RADIO_FEATURE_IEEE_802_15_4_PRESENT
  74. #define RADIO_TXPOWER_TXPOWER_Max RADIO_TXPOWER_TXPOWER_Pos8dBm
  75. /* Accelerated Address Resolver */
  76. #define AAR_PRESENT
  77. #define AAR_COUNT 1
  78. #define AAR_MAX_IRK_NUM 16
  79. /* AES Electronic CodeBook mode encryption */
  80. #define ECB_PRESENT
  81. #define ECB_COUNT 1
  82. /* AES CCM mode encryption */
  83. #define CCM_PRESENT
  84. #define CCM_COUNT 1
  85. /* NFC Tag */
  86. #define NFCT_PRESENT
  87. #define NFCT_COUNT 1
  88. #define NFCT_EASYDMA_MAXCNT_SIZE 9
  89. /* Peripheral to Peripheral Interconnect */
  90. #define PPI_PRESENT
  91. #define PPI_COUNT 1
  92. #define PPI_CH_NUM 20
  93. #define PPI_FIXED_CH_NUM 12
  94. #define PPI_GROUP_NUM 6
  95. #define PPI_FEATURE_FORKS_PRESENT
  96. /* Event Generator Unit */
  97. #define EGU_PRESENT
  98. #define EGU_COUNT 6
  99. #define EGU0_CH_NUM 16
  100. #define EGU1_CH_NUM 16
  101. #define EGU2_CH_NUM 16
  102. #define EGU3_CH_NUM 16
  103. #define EGU4_CH_NUM 16
  104. #define EGU5_CH_NUM 16
  105. /* Timer/Counter */
  106. #define TIMER_PRESENT
  107. #define TIMER_COUNT 5
  108. #define TIMER0_MAX_SIZE 32
  109. #define TIMER1_MAX_SIZE 32
  110. #define TIMER2_MAX_SIZE 32
  111. #define TIMER3_MAX_SIZE 32
  112. #define TIMER4_MAX_SIZE 32
  113. #define TIMER0_CC_NUM 4
  114. #define TIMER1_CC_NUM 4
  115. #define TIMER2_CC_NUM 4
  116. #define TIMER3_CC_NUM 6
  117. #define TIMER4_CC_NUM 6
  118. /* Real Time Counter */
  119. #define RTC_PRESENT
  120. #define RTC_COUNT 3
  121. #define RTC0_CC_NUM 3
  122. #define RTC1_CC_NUM 4
  123. #define RTC2_CC_NUM 4
  124. /* RNG */
  125. #define RNG_PRESENT
  126. #define RNG_COUNT 1
  127. /* Watchdog Timer */
  128. #define WDT_PRESENT
  129. #define WDT_COUNT 1
  130. /* Temperature Sensor */
  131. #define TEMP_PRESENT
  132. #define TEMP_COUNT 1
  133. /* Serial Peripheral Interface Master */
  134. #define SPI_PRESENT
  135. #define SPI_COUNT 3
  136. /* Serial Peripheral Interface Master with DMA */
  137. #define SPIM_PRESENT
  138. #define SPIM_COUNT 4
  139. #define SPIM0_MAX_DATARATE 8
  140. #define SPIM1_MAX_DATARATE 8
  141. #define SPIM2_MAX_DATARATE 8
  142. #define SPIM3_MAX_DATARATE 32
  143. #define SPIM0_FEATURE_HARDWARE_CSN_PRESENT 0
  144. #define SPIM1_FEATURE_HARDWARE_CSN_PRESENT 0
  145. #define SPIM2_FEATURE_HARDWARE_CSN_PRESENT 0
  146. #define SPIM3_FEATURE_HARDWARE_CSN_PRESENT 1
  147. #define SPIM0_FEATURE_DCX_PRESENT 0
  148. #define SPIM1_FEATURE_DCX_PRESENT 0
  149. #define SPIM2_FEATURE_DCX_PRESENT 0
  150. #define SPIM3_FEATURE_DCX_PRESENT 1
  151. #define SPIM0_FEATURE_RXDELAY_PRESENT 0
  152. #define SPIM1_FEATURE_RXDELAY_PRESENT 0
  153. #define SPIM2_FEATURE_RXDELAY_PRESENT 0
  154. #define SPIM3_FEATURE_RXDELAY_PRESENT 1
  155. #define SPIM0_EASYDMA_MAXCNT_SIZE 16
  156. #define SPIM1_EASYDMA_MAXCNT_SIZE 16
  157. #define SPIM2_EASYDMA_MAXCNT_SIZE 16
  158. #define SPIM3_EASYDMA_MAXCNT_SIZE 16
  159. /* Serial Peripheral Interface Slave with DMA*/
  160. #define SPIS_PRESENT
  161. #define SPIS_COUNT 3
  162. #define SPIS0_EASYDMA_MAXCNT_SIZE 16
  163. #define SPIS1_EASYDMA_MAXCNT_SIZE 16
  164. #define SPIS2_EASYDMA_MAXCNT_SIZE 16
  165. /* Two Wire Interface Master */
  166. #define TWI_PRESENT
  167. #define TWI_COUNT 2
  168. /* Two Wire Interface Master with DMA */
  169. #define TWIM_PRESENT
  170. #define TWIM_COUNT 2
  171. #define TWIM0_EASYDMA_MAXCNT_SIZE 16
  172. #define TWIM1_EASYDMA_MAXCNT_SIZE 16
  173. /* Two Wire Interface Slave with DMA */
  174. #define TWIS_PRESENT
  175. #define TWIS_COUNT 2
  176. #define TWIS0_EASYDMA_MAXCNT_SIZE 16
  177. #define TWIS1_EASYDMA_MAXCNT_SIZE 16
  178. /* Universal Asynchronous Receiver-Transmitter */
  179. #define UART_PRESENT
  180. #define UART_COUNT 1
  181. /* Universal Asynchronous Receiver-Transmitter with DMA */
  182. #define UARTE_PRESENT
  183. #define UARTE_COUNT 2
  184. #define UARTE0_EASYDMA_MAXCNT_SIZE 16
  185. #define UARTE1_EASYDMA_MAXCNT_SIZE 16
  186. /* Quadrature Decoder */
  187. #define QDEC_PRESENT
  188. #define QDEC_COUNT 1
  189. /* Successive Approximation Analog to Digital Converter */
  190. #define SAADC_PRESENT
  191. #define SAADC_COUNT 1
  192. #define SAADC_EASYDMA_MAXCNT_SIZE 15
  193. #define SAADC_CH_NUM 8
  194. /* GPIO Tasks and Events */
  195. #define GPIOTE_PRESENT
  196. #define GPIOTE_COUNT 1
  197. #define GPIOTE_CH_NUM 8
  198. #define GPIOTE_FEATURE_SET_PRESENT
  199. #define GPIOTE_FEATURE_CLR_PRESENT
  200. /* Low Power Comparator */
  201. #define LPCOMP_PRESENT
  202. #define LPCOMP_COUNT 1
  203. #define LPCOMP_REFSEL_RESOLUTION 16
  204. #define LPCOMP_FEATURE_HYST_PRESENT
  205. /* Comparator */
  206. #define COMP_PRESENT
  207. #define COMP_COUNT 1
  208. /* Pulse Width Modulator */
  209. #define PWM_PRESENT
  210. #define PWM_COUNT 4
  211. #define PWM0_CH_NUM 4
  212. #define PWM1_CH_NUM 4
  213. #define PWM2_CH_NUM 4
  214. #define PWM3_CH_NUM 4
  215. #define PWM0_EASYDMA_MAXCNT_SIZE 15
  216. #define PWM1_EASYDMA_MAXCNT_SIZE 15
  217. #define PWM2_EASYDMA_MAXCNT_SIZE 15
  218. #define PWM3_EASYDMA_MAXCNT_SIZE 15
  219. /* Pulse Density Modulator */
  220. #define PDM_PRESENT
  221. #define PDM_COUNT 1
  222. #define PDM_EASYDMA_MAXCNT_SIZE 15
  223. /* Inter-IC Sound Interface */
  224. #define I2S_PRESENT
  225. #define I2S_COUNT 1
  226. #define I2S_EASYDMA_MAXCNT_SIZE 14
  227. /* Universal Serial Bus Device */
  228. #define USBD_PRESENT
  229. #define USBD_COUNT 1
  230. #define USBD_EASYDMA_MAXCNT_SIZE 7
  231. /* ARM TrustZone Cryptocell 310 */
  232. #define CRYPTOCELL_PRESENT
  233. #define CRYPTOCELL_COUNT 1
  234. /* Quad SPI */
  235. #define QSPI_PRESENT
  236. #define QSPI_COUNT 1
  237. #define QSPI_EASYDMA_MAXCNT_SIZE 20
  238. #endif // _NRF52840_PERIPHERALS_H