nrf52832_peripherals.h 7.1 KB

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