nrf52840_peripherals.h 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310
  1. /*
  2. Copyright (c) 2010 - 2018, 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. /* Power Peripheral */
  34. #define POWER_PRESENT
  35. #define POWER_COUNT 1
  36. #define POWER_FEATURE_RAM_REGISTERS_PRESENT
  37. #define POWER_FEATURE_RAM_REGISTERS_COUNT 9
  38. #define POWER_FEATURE_VDDH_PRESENT
  39. /* Floating Point Unit */
  40. #define FPU_PRESENT
  41. #define FPU_COUNT 1
  42. /* Systick timer */
  43. #define SYSTICK_PRESENT
  44. #define SYSTICK_COUNT 1
  45. /* Software Interrupts */
  46. #define SWI_PRESENT
  47. #define SWI_COUNT 6
  48. /* Memory Watch Unit */
  49. #define MWU_PRESENT
  50. #define MWU_COUNT 1
  51. /* GPIO */
  52. #define GPIO_PRESENT
  53. #define GPIO_COUNT 2
  54. #define P0_PIN_NUM 32
  55. #define P1_PIN_NUM 16
  56. /* ACL */
  57. #define ACL_PRESENT
  58. #define ACL_REGIONS_COUNT 8
  59. /* Radio */
  60. #define RADIO_PRESENT
  61. #define RADIO_COUNT 1
  62. #define RADIO_EASYDMA_MAXCNT_SIZE 8
  63. /* Accelerated Address Resolver */
  64. #define AAR_PRESENT
  65. #define AAR_COUNT 1
  66. #define AAR_MAX_IRK_NUM 16
  67. /* AES Electronic CodeBook mode encryption */
  68. #define ECB_PRESENT
  69. #define ECB_COUNT 1
  70. /* AES CCM mode encryption */
  71. #define CCM_PRESENT
  72. #define CCM_COUNT 1
  73. /* NFC Tag */
  74. #define NFCT_PRESENT
  75. #define NFCT_COUNT 1
  76. #define NFCT_EASYDMA_MAXCNT_SIZE 9
  77. /* Peripheral to Peripheral Interconnect */
  78. #define PPI_PRESENT
  79. #define PPI_COUNT 1
  80. #define PPI_CH_NUM 20
  81. #define PPI_FIXED_CH_NUM 12
  82. #define PPI_GROUP_NUM 6
  83. #define PPI_FEATURE_FORKS_PRESENT
  84. /* Event Generator Unit */
  85. #define EGU_PRESENT
  86. #define EGU_COUNT 6
  87. #define EGU0_CH_NUM 16
  88. #define EGU1_CH_NUM 16
  89. #define EGU2_CH_NUM 16
  90. #define EGU3_CH_NUM 16
  91. #define EGU4_CH_NUM 16
  92. #define EGU5_CH_NUM 16
  93. /* Timer/Counter */
  94. #define TIMER_PRESENT
  95. #define TIMER_COUNT 5
  96. #define TIMER0_MAX_SIZE 32
  97. #define TIMER1_MAX_SIZE 32
  98. #define TIMER2_MAX_SIZE 32
  99. #define TIMER3_MAX_SIZE 32
  100. #define TIMER4_MAX_SIZE 32
  101. #define TIMER0_CC_NUM 4
  102. #define TIMER1_CC_NUM 4
  103. #define TIMER2_CC_NUM 4
  104. #define TIMER3_CC_NUM 6
  105. #define TIMER4_CC_NUM 6
  106. /* Real Time Counter */
  107. #define RTC_PRESENT
  108. #define RTC_COUNT 3
  109. #define RTC0_CC_NUM 3
  110. #define RTC1_CC_NUM 4
  111. #define RTC2_CC_NUM 4
  112. /* RNG */
  113. #define RNG_PRESENT
  114. #define RNG_COUNT 1
  115. /* Watchdog Timer */
  116. #define WDT_PRESENT
  117. #define WDT_COUNT 1
  118. /* Temperature Sensor */
  119. #define TEMP_PRESENT
  120. #define TEMP_COUNT 1
  121. /* Serial Peripheral Interface Master */
  122. #define SPI_PRESENT
  123. #define SPI_COUNT 3
  124. /* Serial Peripheral Interface Master with DMA */
  125. #define SPIM_PRESENT
  126. #define SPIM_COUNT 4
  127. #define SPIM0_MAX_DATARATE 8
  128. #define SPIM1_MAX_DATARATE 8
  129. #define SPIM2_MAX_DATARATE 8
  130. #define SPIM3_MAX_DATARATE 32
  131. #define SPIM0_FEATURE_HARDWARE_CSN_PRESENT 0
  132. #define SPIM1_FEATURE_HARDWARE_CSN_PRESENT 0
  133. #define SPIM2_FEATURE_HARDWARE_CSN_PRESENT 0
  134. #define SPIM3_FEATURE_HARDWARE_CSN_PRESENT 1
  135. #define SPIM0_FEATURE_DCX_PRESENT 0
  136. #define SPIM1_FEATURE_DCX_PRESENT 0
  137. #define SPIM2_FEATURE_DCX_PRESENT 0
  138. #define SPIM3_FEATURE_DCX_PRESENT 1
  139. #define SPIM0_FEATURE_RXDELAY_PRESENT 0
  140. #define SPIM1_FEATURE_RXDELAY_PRESENT 0
  141. #define SPIM2_FEATURE_RXDELAY_PRESENT 0
  142. #define SPIM3_FEATURE_RXDELAY_PRESENT 1
  143. #define SPIM0_EASYDMA_MAXCNT_SIZE 16
  144. #define SPIM1_EASYDMA_MAXCNT_SIZE 16
  145. #define SPIM2_EASYDMA_MAXCNT_SIZE 16
  146. #define SPIM3_EASYDMA_MAXCNT_SIZE 16
  147. /* Serial Peripheral Interface Slave with DMA*/
  148. #define SPIS_PRESENT
  149. #define SPIS_COUNT 3
  150. #define SPIS0_EASYDMA_MAXCNT_SIZE 16
  151. #define SPIS1_EASYDMA_MAXCNT_SIZE 16
  152. #define SPIS2_EASYDMA_MAXCNT_SIZE 16
  153. /* Two Wire Interface Master */
  154. #define TWI_PRESENT
  155. #define TWI_COUNT 2
  156. /* Two Wire Interface Master with DMA */
  157. #define TWIM_PRESENT
  158. #define TWIM_COUNT 2
  159. #define TWIM0_EASYDMA_MAXCNT_SIZE 16
  160. #define TWIM1_EASYDMA_MAXCNT_SIZE 16
  161. /* Two Wire Interface Slave with DMA */
  162. #define TWIS_PRESENT
  163. #define TWIS_COUNT 2
  164. #define TWIS0_EASYDMA_MAXCNT_SIZE 16
  165. #define TWIS1_EASYDMA_MAXCNT_SIZE 16
  166. /* Universal Asynchronous Receiver-Transmitter */
  167. #define UART_PRESENT
  168. #define UART_COUNT 1
  169. /* Universal Asynchronous Receiver-Transmitter with DMA */
  170. #define UARTE_PRESENT
  171. #define UARTE_COUNT 2
  172. #define UARTE0_EASYDMA_MAXCNT_SIZE 16
  173. #define UARTE1_EASYDMA_MAXCNT_SIZE 16
  174. /* Quadrature Decoder */
  175. #define QDEC_PRESENT
  176. #define QDEC_COUNT 1
  177. /* Successive Approximation Analog to Digital Converter */
  178. #define SAADC_PRESENT
  179. #define SAADC_COUNT 1
  180. #define SAADC_EASYDMA_MAXCNT_SIZE 15
  181. #define SAADC_CH_NUM 8
  182. /* GPIO Tasks and Events */
  183. #define GPIOTE_PRESENT
  184. #define GPIOTE_COUNT 1
  185. #define GPIOTE_CH_NUM 8
  186. #define GPIOTE_FEATURE_SET_PRESENT
  187. #define GPIOTE_FEATURE_CLR_PRESENT
  188. /* Low Power Comparator */
  189. #define LPCOMP_PRESENT
  190. #define LPCOMP_COUNT 1
  191. #define LPCOMP_REFSEL_RESOLUTION 16
  192. #define LPCOMP_FEATURE_HYST_PRESENT
  193. /* Comparator */
  194. #define COMP_PRESENT
  195. #define COMP_COUNT 1
  196. /* Pulse Width Modulator */
  197. #define PWM_PRESENT
  198. #define PWM_COUNT 4
  199. #define PWM0_CH_NUM 4
  200. #define PWM1_CH_NUM 4
  201. #define PWM2_CH_NUM 4
  202. #define PWM3_CH_NUM 4
  203. #define PWM0_EASYDMA_MAXCNT_SIZE 15
  204. #define PWM1_EASYDMA_MAXCNT_SIZE 15
  205. #define PWM2_EASYDMA_MAXCNT_SIZE 15
  206. #define PWM3_EASYDMA_MAXCNT_SIZE 15
  207. /* Pulse Density Modulator */
  208. #define PDM_PRESENT
  209. #define PDM_COUNT 1
  210. #define PDM_EASYDMA_MAXCNT_SIZE 15
  211. /* Inter-IC Sound Interface */
  212. #define I2S_PRESENT
  213. #define I2S_COUNT 1
  214. #define I2S_EASYDMA_MAXCNT_SIZE 14
  215. /* Universal Serial Bus Device */
  216. #define USBD_PRESENT
  217. #define USBD_COUNT 1
  218. #define USBD_EASYDMA_MAXCNT_SIZE 7
  219. /* ARM TrustZone Cryptocell 310 */
  220. #define CRYPTOCELL_PRESENT
  221. #define CRYPTOCELL_COUNT 1
  222. /* Quad SPI */
  223. #define QSPI_PRESENT
  224. #define QSPI_COUNT 1
  225. #define QSPI_EASYDMA_MAXCNT_SIZE 20
  226. #endif // _NRF52840_PERIPHERALS_H