mcuconf.h 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223
  1. /*
  2. ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
  3. Licensed under the Apache License, Version 2.0 (the "License");
  4. you may not use this file except in compliance with the License.
  5. You may obtain a copy of the License at
  6. http://www.apache.org/licenses/LICENSE-2.0
  7. Unless required by applicable law or agreed to in writing, software
  8. distributed under the License is distributed on an "AS IS" BASIS,
  9. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  10. See the License for the specific language governing permissions and
  11. limitations under the License.
  12. */
  13. #ifndef MCUCONF_H
  14. #define MCUCONF_H
  15. #define SAMA5D2x_MCUCONF
  16. /*
  17. * HAL driver system settings.
  18. */
  19. #define SAMA_HAL_IS_SECURE TRUE
  20. #define SAMA_NO_INIT TRUE
  21. #define SAMA_MOSCRC_ENABLED FALSE
  22. #define SAMA_MOSCXT_ENABLED TRUE
  23. #define SAMA_MOSC_SEL SAMA_MOSC_MOSCXT
  24. #define SAMA_OSC_SEL SAMA_OSC_OSCXT
  25. #define SAMA_MCK_SEL SAMA_MCK_PLLA_CLK
  26. #define SAMA_MCK_PRES_VALUE 1
  27. #define SAMA_MCK_MDIV_VALUE 3
  28. #define SAMA_PLLA_MUL_VALUE 83
  29. #define SAMA_PLLADIV2_EN TRUE
  30. #define SAMA_H64MX_H32MX_RATIO 2
  31. /*
  32. * CLASSD driver system settings.
  33. */
  34. #define SAMA_USE_CLASSD FALSE
  35. #define SAMA_CLASSD_DMA_IRQ_PRIORITY 4
  36. #define SAMA_CLASSD_DMA_ERROR_HOOK(classdp) osalSysHalt("DMA failure")
  37. /*
  38. * CRY driver system settings.
  39. */
  40. #define PLATFORM_CRY_USE_CRY1 FALSE
  41. /*
  42. * I2C driver system settings.
  43. */
  44. #define SAMA_I2C_USE_TWIHS0 FALSE
  45. #define SAMA_I2C_USE_TWIHS1 FALSE
  46. #define SAMA_I2C_BUSY_TIMEOUT 50
  47. #define SAMA_I2C_TWIHS0_IRQ_PRIORITY 6
  48. #define SAMA_I2C_TWIHS1_IRQ_PRIORITY 6
  49. #define SAMA_I2C_TWIHS0_DMA_IRQ_PRIORITY 6
  50. #define SAMA_I2C_TWIHS1_DMA_IRQ_PRIORITY 6
  51. #define SAMA_I2C_DMA_ERROR_HOOK(i2cp) osalSysHalt("DMA failure")
  52. /*
  53. * L2CC related defines.
  54. */
  55. #define SAMA_L2CC_ASSUME_ENABLED 0
  56. #define SAMA_L2CC_ENABLE 1
  57. /*
  58. * ONEWIRE driver system settings.
  59. */
  60. #define SAMA_USE_ONEWIRE FALSE
  61. /*
  62. * LCDC driver system settings.
  63. */
  64. #define SAMA_USE_LCDC FALSE
  65. /*
  66. * SDMMC driver system settings.
  67. */
  68. #define SAMA_USE_SDMMC FALSE
  69. #define PLATFORM_SDMMC_USE_SDMMC1 FALSE
  70. /*
  71. * SECUMOD driver system settings.
  72. */
  73. #define SAMA_USE_SECUMOD FALSE
  74. /*
  75. * SERIAL driver system settings.
  76. */
  77. #define SAMA_SERIAL_USE_UART0 FALSE
  78. #define SAMA_SERIAL_USE_UART1 TRUE
  79. #define SAMA_SERIAL_USE_UART2 FALSE
  80. #define SAMA_SERIAL_USE_UART3 FALSE
  81. #define SAMA_SERIAL_USE_UART4 FALSE
  82. #define SAMA_SERIAL_USE_FLEXCOM0 FALSE
  83. #define SAMA_SERIAL_USE_FLEXCOM1 FALSE
  84. #define SAMA_SERIAL_USE_FLEXCOM2 FALSE
  85. #define SAMA_SERIAL_USE_FLEXCOM3 FALSE
  86. #define SAMA_SERIAL_USE_FLEXCOM4 FALSE
  87. #define SAMA_SERIAL_UART0_IRQ_PRIORITY 4
  88. #define SAMA_SERIAL_UART1_IRQ_PRIORITY 4
  89. #define SAMA_SERIAL_UART2_IRQ_PRIORITY 4
  90. #define SAMA_SERIAL_UART3_IRQ_PRIORITY 4
  91. #define SAMA_SERIAL_UART4_IRQ_PRIORITY 4
  92. #define SAMA_SERIAL_FLEXCOM0_IRQ_PRIORITY 4
  93. #define SAMA_SERIAL_FLEXCOM1_IRQ_PRIORITY 4
  94. #define SAMA_SERIAL_FLEXCOM2_IRQ_PRIORITY 4
  95. #define SAMA_SERIAL_FLEXCOM3_IRQ_PRIORITY 4
  96. #define SAMA_SERIAL_FLEXCOM4_IRQ_PRIORITY 4
  97. /*
  98. * SPI driver system settings.
  99. */
  100. #define SAMA_SPI_USE_SPI0 FALSE
  101. #define SAMA_SPI0_USE_GCLK FALSE
  102. #define SAMA_SPI0_GCLK_SOURCE SAMA_GCLK_MCK_CLK
  103. #define SAMA_SPI0_GCLK_DIV 21
  104. #define SAMA_SPI_USE_SPI1 FALSE
  105. #define SAMA_SPI1_USE_GCLK FALSE
  106. #define SAMA_SPI1_GCLK_SOURCE SAMA_GCLK_MCK_CLK
  107. #define SAMA_SPI1_GCLK_DIV 21
  108. #define SAMA_SPI_USE_FLEXCOM0 FALSE
  109. #define SAMA_FSPI0_USE_GCLK FALSE
  110. #define SAMA_FSPI0_GCLK_SOURCE SAMA_GCLK_MCK_CLK
  111. #define SAMA_FSPI0_GCLK_DIV 21
  112. #define SAMA_SPI_USE_FLEXCOM1 FALSE
  113. #define SAMA_FSPI1_USE_GCLK FALSE
  114. #define SAMA_FSPI1_GCLK_SOURCE SAMA_GCLK_MCK_CLK
  115. #define SAMA_FSPI1_GCLK_DIV 21
  116. #define SAMA_SPI_USE_FLEXCOM2 FALSE
  117. #define SAMA_FSPI2_USE_GCLK FALSE
  118. #define SAMA_FSPI2_GCLK_SOURCE SAMA_GCLK_MCK_CLK
  119. #define SAMA_FSPI2_GCLK_DIV 21
  120. #define SAMA_SPI_USE_FLEXCOM3 FALSE
  121. #define SAMA_FSPI3_USE_GCLK FALSE
  122. #define SAMA_FSPI3_GCLK_SOURCE SAMA_GCLK_MCK_CLK
  123. #define SAMA_FSPI3_GCLK_DIV 21
  124. #define SAMA_SPI_USE_FLEXCOM4 FALSE
  125. #define SAMA_FSPI4_USE_GCLK FALSE
  126. #define SAMA_FSPI4_GCLK_SOURCE SAMA_GCLK_MCK_CLK
  127. #define SAMA_FSPI4_GCLK_DIV 21
  128. #define SAMA_SPI_DMA_ERROR_HOOK(spip) osalSysHalt("DMA failure")
  129. #define SAMA_SPI_CACHE_USER_MANAGED FALSE
  130. /*
  131. * ST driver settings.
  132. */
  133. #define SAMA_ST_USE_PIT TRUE
  134. #define SAMA_ST_USE_TC0 FALSE
  135. #define SAMA_ST_USE_TC1 FALSE
  136. /*
  137. * TC driver system settings.
  138. */
  139. #define SAMA_USE_TC FALSE
  140. #define SAMA_USE_TC0 FALSE
  141. #define SAMA_USE_TC1 FALSE
  142. #define SAMA_TC0_IRQ_PRIORITY 2
  143. #define SAMA_TC1_IRQ_PRIORITY 2
  144. /*
  145. * TRNG driver system settings.
  146. */
  147. #define SAMA_TRNG_USE_TRNG0 FALSE
  148. /*
  149. * UART driver system settings.
  150. */
  151. #define SAMA_UART_USE_UART0 FALSE
  152. #define SAMA_UART_USE_UART1 FALSE
  153. #define SAMA_UART_USE_UART2 FALSE
  154. #define SAMA_UART_USE_UART3 FALSE
  155. #define SAMA_UART_USE_UART4 FALSE
  156. #define SAMA_UART_USE_FLEXCOM0 FALSE
  157. #define SAMA_UART_USE_FLEXCOM1 FALSE
  158. #define SAMA_UART_USE_FLEXCOM2 FALSE
  159. #define SAMA_UART_USE_FLEXCOM3 FALSE
  160. #define SAMA_UART_USE_FLEXCOM4 FALSE
  161. #define SAMA_UART_UART0_IRQ_PRIORITY 4
  162. #define SAMA_UART_UART1_IRQ_PRIORITY 4
  163. #define SAMA_UART_UART2_IRQ_PRIORITY 4
  164. #define SAMA_UART_UART3_IRQ_PRIORITY 4
  165. #define SAMA_UART_UART4_IRQ_PRIORITY 4
  166. #define SAMA_UART_FLEXCOM0_IRQ_PRIORITY 4
  167. #define SAMA_UART_FLEXCOM1_IRQ_PRIORITY 4
  168. #define SAMA_UART_FLEXCOM2_IRQ_PRIORITY 4
  169. #define SAMA_UART_FLEXCOM3_IRQ_PRIORITY 4
  170. #define SAMA_UART_FLEXCOM4_IRQ_PRIORITY 4
  171. #define SAMA_UART_UART0_DMA_IRQ_PRIORITY 4
  172. #define SAMA_UART_UART1_DMA_IRQ_PRIORITY 4
  173. #define SAMA_UART_UART2_DMA_IRQ_PRIORITY 4
  174. #define SAMA_UART_UART3_DMA_IRQ_PRIORITY 4
  175. #define SAMA_UART_UART4_DMA_IRQ_PRIORITY 4
  176. #define SAMA_UART_FLEXCOM0_DMA_IRQ_PRIORITY 4
  177. #define SAMA_UART_FLEXCOM1_DMA_IRQ_PRIORITY 4
  178. #define SAMA_UART_FLEXCOM2_DMA_IRQ_PRIORITY 4
  179. #define SAMA_UART_FLEXCOM3_DMA_IRQ_PRIORITY 4
  180. #define SAMA_UART_FLEXCOM4_DMA_IRQ_PRIORITY 4
  181. #define SAMA_UART_DMA_ERROR_HOOK(uartp) osalSysHalt("DMA failure")
  182. #define SAMA_UART_CACHE_USER_MANAGED FALSE
  183. /*
  184. * WSPI driver system settings.
  185. */
  186. #define SAMA_WSPI_USE_QUADSPI0 FALSE
  187. #define SAMA_WSPI_USE_QUADSPI1 FALSE
  188. #define SAMA_WSPI_QUADSPI0_IRQ_PRIORITY 7
  189. #define SAMA_WSPI_QUADSPI1_IRQ_PRIORITY 7
  190. #define SAMA_WSPI_QUADSPI0_DMA_IRQ_PRIORITY 7
  191. #define SAMA_WSPI_QUADSPI0_DMA_IRQ_PRIORITY 7
  192. #define SAMA_WSPI_DMA_ERROR_HOOK(qspip) osalSysHalt("DMA failure")
  193. #define SAMA_WSPI_CACHE_USER_MANAGED FALSE
  194. #endif /* MCUCONF_H */