spc5_registry.h 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289
  1. /*
  2. SPC5 HAL - Copyright (C) 2013 STMicroelectronics
  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. /**
  14. * @file SPC560Dxx/spc5_registry.h
  15. * @brief SPC560Dxx capabilities registry.
  16. *
  17. * @addtogroup HAL
  18. * @{
  19. */
  20. #ifndef SPC5_REGISTRY_H
  21. #define SPC5_REGISTRY_H
  22. /*===========================================================================*/
  23. /* Platform capabilities. */
  24. /*===========================================================================*/
  25. /**
  26. * @name SPC560Dxx capabilities
  27. * @{
  28. */
  29. /* DSPI attribures.*/
  30. #define SPC5_HAS_DSPI0 TRUE
  31. #define SPC5_HAS_DSPI1 TRUE
  32. #define SPC5_HAS_DSPI2 FALSE
  33. #define SPC5_HAS_DSPI3 FALSE
  34. #define SPC5_HAS_DSPI4 FALSE
  35. #define SPC5_HAS_DSPI5 FALSE
  36. #define SPC5_HAS_DSPI6 FALSE
  37. #define SPC5_HAS_DSPI7 FALSE
  38. #define SPC5_DSPI_FIFO_DEPTH 4
  39. #define SPC5_DSPI0_PCTL 4
  40. #define SPC5_DSPI1_PCTL 5
  41. #define SPC5_DSPI0_TX1_DMA_DEV_ID 1
  42. #define SPC5_DSPI0_TX2_DMA_DEV_ID 0
  43. #define SPC5_DSPI0_RX_DMA_DEV_ID 2
  44. #define SPC5_DSPI1_TX1_DMA_DEV_ID 3
  45. #define SPC5_DSPI1_TX2_DMA_DEV_ID 0
  46. #define SPC5_DSPI1_RX_DMA_DEV_ID 4
  47. #define SPC5_DSPI0_TFFF_HANDLER vector76
  48. #define SPC5_DSPI0_TFFF_NUMBER 76
  49. #define SPC5_DSPI0_RFDF_HANDLER vector78
  50. #define SPC5_DSPI0_RFDF_NUMBER 78
  51. #define SPC5_DSPI1_TFFF_HANDLER vector96
  52. #define SPC5_DSPI1_TFFF_NUMBER 96
  53. #define SPC5_DSPI1_RFDF_HANDLER vector98
  54. #define SPC5_DSPI1_RFDF_NUMBER 98
  55. #define SPC5_DSPI0_ENABLE_CLOCK() \
  56. halSPCSetPeripheralClockMode(SPC5_DSPI0_PCTL, SPC5_SPI_DSPI0_START_PCTL)
  57. #define SPC5_DSPI0_DISABLE_CLOCK() \
  58. halSPCSetPeripheralClockMode(SPC5_DSPI0_PCTL, SPC5_SPI_DSPI0_STOP_PCTL)
  59. #define SPC5_DSPI1_ENABLE_CLOCK() \
  60. halSPCSetPeripheralClockMode(SPC5_DSPI1_PCTL, SPC5_SPI_DSPI1_START_PCTL)
  61. #define SPC5_DSPI1_DISABLE_CLOCK() \
  62. halSPCSetPeripheralClockMode(SPC5_DSPI1_PCTL, SPC5_SPI_DSPI1_STOP_PCTL)
  63. /* eDMA attributes.*/
  64. #define SPC5_HAS_EDMA TRUE
  65. #define SPC5_EDMA_NCHANNELS 16
  66. #define SPC5_EDMA_HAS_MUX TRUE
  67. #define SPC5_EDMA_MUX_PCTL 23
  68. /* LINFlex attributes.*/
  69. #define SPC5_HAS_LINFLEX0 TRUE
  70. #define SPC5_LINFLEX0_PCTL 48
  71. #define SPC5_LINFLEX0_RXI_HANDLER vector79
  72. #define SPC5_LINFLEX0_TXI_HANDLER vector80
  73. #define SPC5_LINFLEX0_ERR_HANDLER vector81
  74. #define SPC5_LINFLEX0_RXI_NUMBER 79
  75. #define SPC5_LINFLEX0_TXI_NUMBER 80
  76. #define SPC5_LINFLEX0_ERR_NUMBER 81
  77. #define SPC5_LINFLEX0_CLK (halSPCGetSystemClock() / \
  78. SPC5_PERIPHERAL1_CLK_DIV_VALUE)
  79. #define SPC5_HAS_LINFLEX1 TRUE
  80. #define SPC5_LINFLEX1_PCTL 49
  81. #define SPC5_LINFLEX1_RXI_HANDLER vector99
  82. #define SPC5_LINFLEX1_TXI_HANDLER vector100
  83. #define SPC5_LINFLEX1_ERR_HANDLER vector101
  84. #define SPC5_LINFLEX1_RXI_NUMBER 99
  85. #define SPC5_LINFLEX1_TXI_NUMBER 100
  86. #define SPC5_LINFLEX1_ERR_NUMBER 101
  87. #define SPC5_LINFLEX1_CLK (halSPCGetSystemClock() / \
  88. SPC5_PERIPHERAL1_CLK_DIV_VALUE)
  89. #define SPC5_HAS_LINFLEX2 TRUE
  90. #define SPC5_LINFLEX2_PCTL 50
  91. #define SPC5_LINFLEX2_RXI_HANDLER vector119
  92. #define SPC5_LINFLEX2_TXI_HANDLER vector120
  93. #define SPC5_LINFLEX2_ERR_HANDLER vector121
  94. #define SPC5_LINFLEX2_RXI_NUMBER 119
  95. #define SPC5_LINFLEX2_TXI_NUMBER 120
  96. #define SPC5_LINFLEX2_ERR_NUMBER 121
  97. #define SPC5_LINFLEX2_CLK (halSPCGetSystemClock() / \
  98. SPC5_PERIPHERAL1_CLK_DIV_VALUE)
  99. #define SPC5_HAS_LINFLEX3 FALSE
  100. #define SPC5_HAS_LINFLEX4 FALSE
  101. #define SPC5_HAS_LINFLEX5 FALSE
  102. #define SPC5_HAS_LINFLEX6 FALSE
  103. #define SPC5_HAS_LINFLEX7 FALSE
  104. #define SPC5_HAS_LINFLEX8 FALSE
  105. #define SPC5_HAS_LINFLEX9 FALSE
  106. /* SIUL attributes.*/
  107. #define SPC5_HAS_SIUL TRUE
  108. #define SPC5_SIUL_PCTL 68
  109. #define SPC5_SIUL_NUM_PORTS 8
  110. #define SPC5_SIUL_NUM_PCRS 77
  111. #define SPC5_SIUL_NUM_PADSELS 63
  112. #define SPC5_SIUL_SYSTEM_PINS 32,33
  113. /* eMIOS attributes.*/
  114. #define SPC5_HAS_EMIOS0 TRUE
  115. #define SPC5_EMIOS0_PCTL 72
  116. #define SPC5_EMIOS0_GFR_F0F1_HANDLER vector141
  117. #define SPC5_EMIOS0_GFR_F2F3_HANDLER vector142
  118. #define SPC5_EMIOS0_GFR_F4F5_HANDLER vector143
  119. #define SPC5_EMIOS0_GFR_F6F7_HANDLER vector144
  120. #define SPC5_EMIOS0_GFR_F8F9_HANDLER vector145
  121. #define SPC5_EMIOS0_GFR_F10F11_HANDLER vector146
  122. #define SPC5_EMIOS0_GFR_F12F13_HANDLER vector147
  123. #define SPC5_EMIOS0_GFR_F14F15_HANDLER vector148
  124. #define SPC5_EMIOS0_GFR_F16F17_HANDLER vector149
  125. #define SPC5_EMIOS0_GFR_F18F19_HANDLER vector150
  126. #define SPC5_EMIOS0_GFR_F20F21_HANDLER vector151
  127. #define SPC5_EMIOS0_GFR_F22F23_HANDLER vector152
  128. #define SPC5_EMIOS0_GFR_F24F25_HANDLER vector153
  129. #define SPC5_EMIOS0_GFR_F26F27_HANDLER vector154
  130. #define SPC5_EMIOS0_GFR_F0F1_NUMBER 141
  131. #define SPC5_EMIOS0_GFR_F2F3_NUMBER 142
  132. #define SPC5_EMIOS0_GFR_F4F5_NUMBER 143
  133. #define SPC5_EMIOS0_GFR_F6F7_NUMBER 144
  134. #define SPC5_EMIOS0_GFR_F8F9_NUMBER 145
  135. #define SPC5_EMIOS0_GFR_F10F11_NUMBER 146
  136. #define SPC5_EMIOS0_GFR_F12F13_NUMBER 147
  137. #define SPC5_EMIOS0_GFR_F14F15_NUMBER 148
  138. #define SPC5_EMIOS0_GFR_F16F17_NUMBER 149
  139. #define SPC5_EMIOS0_GFR_F18F19_NUMBER 150
  140. #define SPC5_EMIOS0_GFR_F20F21_NUMBER 151
  141. #define SPC5_EMIOS0_GFR_F22F23_NUMBER 152
  142. #define SPC5_EMIOS0_GFR_F24F25_NUMBER 153
  143. #define SPC5_EMIOS0_GFR_F26F27_NUMBER 154
  144. #define SPC5_EMIOS0_CLK (halSPCGetSystemClock() / \
  145. SPC5_PERIPHERAL3_CLK_DIV_VALUE / \
  146. SPC5_EMIOS0_GPRE_VALUE)
  147. #define SPC5_HAS_EMIOS1 FALSE
  148. /* FlexCAN attributes.*/
  149. #define SPC5_HAS_FLEXCAN0 TRUE
  150. #define SPC5_FLEXCAN0_PCTL 16
  151. #define SPC5_FLEXCAN0_MB 32
  152. #define SPC5_FLEXCAN0_SHARED_IRQ TRUE
  153. #define SPC5_FLEXCAN0_FLEXCAN_ESR_ERR_INT_HANDLER vector65
  154. #define SPC5_FLEXCAN0_FLEXCAN_ESR_BOFF_HANDLER vector66
  155. #define SPC5_FLEXCAN0_FLEXCAN_BUF_00_03_HANDLER vector68
  156. #define SPC5_FLEXCAN0_FLEXCAN_BUF_04_07_HANDLER vector69
  157. #define SPC5_FLEXCAN0_FLEXCAN_BUF_08_11_HANDLER vector70
  158. #define SPC5_FLEXCAN0_FLEXCAN_BUF_12_15_HANDLER vector71
  159. #define SPC5_FLEXCAN0_FLEXCAN_BUF_16_31_HANDLER vector72
  160. #define SPC5_FLEXCAN0_FLEXCAN_ESR_ERR_INT_NUMBER 65
  161. #define SPC5_FLEXCAN0_FLEXCAN_ESR_BOFF_NUMBER 66
  162. #define SPC5_FLEXCAN0_FLEXCAN_BUF_00_03_NUMBER 68
  163. #define SPC5_FLEXCAN0_FLEXCAN_BUF_04_07_NUMBER 69
  164. #define SPC5_FLEXCAN0_FLEXCAN_BUF_08_11_NUMBER 70
  165. #define SPC5_FLEXCAN0_FLEXCAN_BUF_12_15_NUMBER 71
  166. #define SPC5_FLEXCAN0_FLEXCAN_BUF_16_31_NUMBER 72
  167. #define SPC5_FLEXCAN0_ENABLE_CLOCK() halSPCSetPeripheralClockMode(SPC5_FLEXCAN0_PCTL, SPC5_CAN_FLEXCAN0_START_PCTL);
  168. #define SPC5_FLEXCAN0_DISABLE_CLOCK() halSPCSetPeripheralClockMode(SPC5_FLEXCAN0_PCTL, SPC5_CAN_FLEXCAN0_STOP_PCTL);
  169. /* ADC attributes.*/
  170. #define SPC5_ADC_HAS_TRC FALSE
  171. #define SPC5_HAS_ADC0 FALSE
  172. #define SPC5_ADC_ADC0_HAS_CTR0 FALSE
  173. #define SPC5_ADC_ADC0_HAS_CTR1 FALSE
  174. #define SPC5_ADC_ADC0_HAS_CTR2 FALSE
  175. #define SPC5_ADC_ADC0_HAS_NCMR0 FALSE
  176. #define SPC5_ADC_ADC0_HAS_NCMR1 FALSE
  177. #define SPC5_ADC_ADC0_HAS_NCMR2 FALSE
  178. #define SPC5_ADC_ADC0_HAS_THRHLR0 FALSE
  179. #define SPC5_ADC_ADC0_HAS_THRHLR1 FALSE
  180. #define SPC5_ADC_ADC0_HAS_THRHLR2 FALSE
  181. #define SPC5_ADC_ADC0_HAS_THRHLR3 FALSE
  182. #define SPC5_ADC_ADC0_HAS_THRHLR4 FALSE
  183. #define SPC5_ADC_ADC0_HAS_THRHLR5 FALSE
  184. #define SPC5_ADC_ADC0_HAS_THRHLR6 FALSE
  185. #define SPC5_ADC_ADC0_HAS_THRHLR7 FALSE
  186. #define SPC5_ADC_ADC0_HAS_THRHLR8 FALSE
  187. #define SPC5_ADC_ADC0_HAS_THRHLR9 FALSE
  188. #define SPC5_ADC_ADC0_HAS_THRHLR10 FALSE
  189. #define SPC5_ADC_ADC0_HAS_THRHLR11 FALSE
  190. #define SPC5_ADC_ADC0_HAS_THRHLR12 FALSE
  191. #define SPC5_ADC_ADC0_HAS_THRHLR13 FALSE
  192. #define SPC5_ADC_ADC0_HAS_THRHLR14 FALSE
  193. #define SPC5_ADC_ADC0_HAS_THRHLR15 FALSE
  194. #define SPC5_ADC_ADC0_HAS_CWENR0 FALSE
  195. #define SPC5_ADC_ADC0_HAS_CWENR1 FALSE
  196. #define SPC5_ADC_ADC0_HAS_CWENR2 FALSE
  197. #define SPC5_ADC_ADC0_HAS_CWSEL0 FALSE
  198. #define SPC5_ADC_ADC0_HAS_CWSEL1 FALSE
  199. #define SPC5_ADC_ADC0_HAS_CWSEL2 FALSE
  200. #define SPC5_ADC_ADC0_HAS_CWSEL3 FALSE
  201. #define SPC5_ADC_ADC0_HAS_CWSEL4 FALSE
  202. #define SPC5_ADC_ADC0_HAS_CWSEL5 FALSE
  203. #define SPC5_ADC_ADC0_HAS_CWSEL6 FALSE
  204. #define SPC5_ADC_ADC0_HAS_CWSEL7 FALSE
  205. #define SPC5_ADC_ADC0_HAS_CWSEL8 FALSE
  206. #define SPC5_ADC_ADC0_HAS_CWSEL9 FALSE
  207. #define SPC5_ADC_ADC0_HAS_CWSEL10 FALSE
  208. #define SPC5_ADC_ADC0_HAS_CWSEL11 FALSE
  209. #define SPC5_ADC_ADC0_HAS_CIMR0 FALSE
  210. #define SPC5_ADC_ADC0_HAS_CIMR1 FALSE
  211. #define SPC5_ADC_ADC0_HAS_CIMR2 FALSE
  212. #define SPC5_ADC_ADC0_HAS_CEOCFR0 FALSE
  213. #define SPC5_ADC_ADC0_HAS_CEOCFR1 FALSE
  214. #define SPC5_ADC_ADC0_HAS_CEOCFR2 FALSE
  215. #define SPC5_HAS_ADC1 TRUE
  216. #define SPC5_ADC_ADC1_HAS_CTR0 TRUE
  217. #define SPC5_ADC_ADC1_HAS_CTR1 TRUE
  218. #define SPC5_ADC_ADC1_HAS_CTR2 TRUE
  219. #define SPC5_ADC_ADC1_HAS_NCMR0 TRUE
  220. #define SPC5_ADC_ADC1_HAS_NCMR1 TRUE
  221. #define SPC5_ADC_ADC1_HAS_NCMR2 TRUE
  222. #define SPC5_ADC_ADC1_HAS_THRHLR0 TRUE
  223. #define SPC5_ADC_ADC1_HAS_THRHLR1 TRUE
  224. #define SPC5_ADC_ADC1_HAS_THRHLR2 TRUE
  225. #define SPC5_ADC_ADC1_HAS_THRHLR3 FALSE
  226. #define SPC5_ADC_ADC1_HAS_THRHLR4 FALSE
  227. #define SPC5_ADC_ADC1_HAS_THRHLR5 FALSE
  228. #define SPC5_ADC_ADC1_HAS_THRHLR6 FALSE
  229. #define SPC5_ADC_ADC1_HAS_THRHLR7 FALSE
  230. #define SPC5_ADC_ADC1_HAS_THRHLR8 FALSE
  231. #define SPC5_ADC_ADC1_HAS_THRHLR9 FALSE
  232. #define SPC5_ADC_ADC1_HAS_THRHLR10 FALSE
  233. #define SPC5_ADC_ADC1_HAS_THRHLR11 FALSE
  234. #define SPC5_ADC_ADC1_HAS_THRHLR12 FALSE
  235. #define SPC5_ADC_ADC1_HAS_THRHLR13 FALSE
  236. #define SPC5_ADC_ADC1_HAS_THRHLR14 FALSE
  237. #define SPC5_ADC_ADC1_HAS_THRHLR15 FALSE
  238. #define SPC5_ADC_ADC1_HAS_CWENR0 TRUE
  239. #define SPC5_ADC_ADC1_HAS_CWENR1 TRUE
  240. #define SPC5_ADC_ADC1_HAS_CWENR2 TRUE
  241. #define SPC5_ADC_ADC1_HAS_CWSEL0 TRUE
  242. #define SPC5_ADC_ADC1_HAS_CWSEL1 TRUE
  243. #define SPC5_ADC_ADC1_HAS_CWSEL2 FALSE
  244. #define SPC5_ADC_ADC1_HAS_CWSEL3 FALSE
  245. #define SPC5_ADC_ADC1_HAS_CWSEL4 TRUE
  246. #define SPC5_ADC_ADC1_HAS_CWSEL5 TRUE
  247. #define SPC5_ADC_ADC1_HAS_CWSEL6 FALSE
  248. #define SPC5_ADC_ADC1_HAS_CWSEL7 FALSE
  249. #define SPC5_ADC_ADC1_HAS_CWSEL8 TRUE
  250. #define SPC5_ADC_ADC1_HAS_CWSEL9 TRUE
  251. #define SPC5_ADC_ADC1_HAS_CWSEL10 TRUE
  252. #define SPC5_ADC_ADC1_HAS_CWSEL11 TRUE
  253. #define SPC5_ADC_ADC1_HAS_CIMR0 TRUE
  254. #define SPC5_ADC_ADC1_HAS_CIMR1 TRUE
  255. #define SPC5_ADC_ADC1_HAS_CIMR2 TRUE
  256. #define SPC5_ADC_ADC1_HAS_CEOCFR0 TRUE
  257. #define SPC5_ADC_ADC1_HAS_CEOCFR1 TRUE
  258. #define SPC5_ADC_ADC1_HAS_CEOCFR2 TRUE
  259. #define SPC5_ADC1_PCTL 33
  260. #define SPC5_ADC1_DMA_DEV_ID 30
  261. #define SPC5_ADC1_EOC_HANDLER vector82
  262. #define SPC5_ADC1_EOC_NUMBER 82
  263. #define SPC5_ADC1_WD_HANDLER vector84
  264. #define SPC5_ADC1_WD_NUMBER 84
  265. /** @} */
  266. #endif /* SPC5_REGISTRY_H */
  267. /** @} */