spc5_registry.h 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314
  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 SPC564Axx/spc5_registry.h
  15. * @brief SPC564Axx capabilities registry.
  16. *
  17. * @addtogroup HAL
  18. * @{
  19. */
  20. #ifndef SPC5_REGISTRY_H
  21. #define SPC5_REGISTRY_H
  22. /*===========================================================================*/
  23. /* Derived constants and error checks. */
  24. /*===========================================================================*/
  25. #if defined(_SPC564A70B4_) || defined(_SPC564A70L7_)
  26. #define _SPC564A70_
  27. #elif defined(_SPC564A74B4_) || defined(_SPC564A74L7_)
  28. #define _SPC564A74_
  29. #elif defined(_SPC564A80B4_) || defined(_SPC564A80L7_)
  30. #define _SPC564A80_
  31. #else
  32. #error "SPC564Axx platform not defined"
  33. #endif
  34. /*===========================================================================*/
  35. /* Platform capabilities. */
  36. /*===========================================================================*/
  37. /**
  38. * @name SPC564Axx capabilities
  39. * @{
  40. */
  41. /* DSPI attribures.*/
  42. #define SPC5_HAS_DSPI0 FALSE
  43. #define SPC5_HAS_DSPI1 TRUE
  44. #define SPC5_HAS_DSPI2 TRUE
  45. #define SPC5_HAS_DSPI3 TRUE
  46. #define SPC5_HAS_DSPI4 FALSE
  47. #define SPC5_HAS_DSPI5 FALSE
  48. #define SPC5_HAS_DSPI6 FALSE
  49. #define SPC5_HAS_DSPI7 FALSE
  50. #define SPC5_DSPI_FIFO_DEPTH 4
  51. #define SPC5_DSPI1_TFFF_HANDLER vector133
  52. #define SPC5_DSPI1_TFFF_NUMBER 133
  53. #define SPC5_DSPI1_RFDF_HANDLER vector135
  54. #define SPC5_DSPI1_RFDF_NUMBER 135
  55. #define SPC5_DSPI2_TFFF_HANDLER vector138
  56. #define SPC5_DSPI2_TFFF_NUMBER 138
  57. #define SPC5_DSPI2_RFDF_HANDLER vector140
  58. #define SPC5_DSPI2_RFDF_NUMBER 140
  59. #define SPC5_DSPI3_TFFF_HANDLER vector143
  60. #define SPC5_DSPI3_TFFF_NUMBER 143
  61. #define SPC5_DSPI3_RFDF_HANDLER vector145
  62. #define SPC5_DSPI3_RFDF_NUMBER 145
  63. #define SPC5_DSPI1_ENABLE_CLOCK()
  64. #define SPC5_DSPI1_DISABLE_CLOCK()
  65. #define SPC5_DSPI2_ENABLE_CLOCK()
  66. #define SPC5_DSPI2_DISABLE_CLOCK()
  67. #define SPC5_DSPI3_ENABLE_CLOCK()
  68. #define SPC5_DSPI3_DISABLE_CLOCK()
  69. /* eDMA attributes.*/
  70. #define SPC5_HAS_EDMA TRUE
  71. #define SPC5_EDMA_NCHANNELS 64
  72. #define SPC5_EDMA_HAS_MUX FALSE
  73. #define SPC5_SPI_DSPI1_TX1_DMA_CH_ID 12
  74. #define SPC5_SPI_DSPI1_TX2_DMA_CH_ID 24
  75. #define SPC5_SPI_DSPI1_RX_DMA_CH_ID 13
  76. #define SPC5_SPI_DSPI2_TX1_DMA_CH_ID 14
  77. #define SPC5_SPI_DSPI2_TX2_DMA_CH_ID 25
  78. #define SPC5_SPI_DSPI2_RX_DMA_CH_ID 15
  79. #define SPC5_SPI_DSPI3_TX1_DMA_CH_ID 16
  80. #define SPC5_SPI_DSPI3_TX2_DMA_CH_ID 26
  81. #define SPC5_SPI_DSPI3_RX_DMA_CH_ID 17
  82. /* eQADC attributes.*/
  83. #define SPC5_HAS_EQADC TRUE
  84. /* eSCI attributes.*/
  85. #define SPC5_HAS_ESCIA TRUE
  86. #define SPC5_ESCIA_HANDLER vector146
  87. #define SPC5_ESCIA_NUMBER 146
  88. #define SPC5_HAS_ESCIB TRUE
  89. #define SPC5_ESCIB_HANDLER vector149
  90. #define SPC5_ESCIB_NUMBER 149
  91. #define SPC5_HAS_ESCIC TRUE
  92. #define SPC5_ESCIC_HANDLER vector473
  93. #define SPC5_ESCIC_NUMBER 473
  94. /* SIU attributes.*/
  95. #define SPC5_HAS_SIU TRUE
  96. #define SPC5_SIU_SUPPORTS_PORTS FALSE
  97. /* EMIOS attributes.*/
  98. #define SPC5_HAS_EMIOS TRUE
  99. #define SPC5_EMIOS_NUM_CHANNELS 24
  100. #define SPC5_EMIOS_FLAG_F0_HANDLER vector51
  101. #define SPC5_EMIOS_FLAG_F1_HANDLER vector52
  102. #define SPC5_EMIOS_FLAG_F2_HANDLER vector53
  103. #define SPC5_EMIOS_FLAG_F3_HANDLER vector54
  104. #define SPC5_EMIOS_FLAG_F4_HANDLER vector55
  105. #define SPC5_EMIOS_FLAG_F5_HANDLER vector56
  106. #define SPC5_EMIOS_FLAG_F6_HANDLER vector57
  107. #define SPC5_EMIOS_FLAG_F7_HANDLER vector58
  108. #define SPC5_EMIOS_FLAG_F8_HANDLER vector59
  109. #define SPC5_EMIOS_FLAG_F9_HANDLER vector60
  110. #define SPC5_EMIOS_FLAG_F10_HANDLER vector61
  111. #define SPC5_EMIOS_FLAG_F11_HANDLER vector62
  112. #define SPC5_EMIOS_FLAG_F12_HANDLER vector63
  113. #define SPC5_EMIOS_FLAG_F13_HANDLER vector64
  114. #define SPC5_EMIOS_FLAG_F14_HANDLER vector65
  115. #define SPC5_EMIOS_FLAG_F15_HANDLER vector66
  116. #define SPC5_EMIOS_FLAG_F16_HANDLER vector202
  117. #define SPC5_EMIOS_FLAG_F17_HANDLER vector203
  118. #define SPC5_EMIOS_FLAG_F18_HANDLER vector204
  119. #define SPC5_EMIOS_FLAG_F19_HANDLER vector205
  120. #define SPC5_EMIOS_FLAG_F20_HANDLER vector206
  121. #define SPC5_EMIOS_FLAG_F21_HANDLER vector207
  122. #define SPC5_EMIOS_FLAG_F22_HANDLER vector208
  123. #define SPC5_EMIOS_FLAG_F23_HANDLER vector209
  124. #define SPC5_EMIOS_FLAG_F0_NUMBER 51
  125. #define SPC5_EMIOS_FLAG_F1_NUMBER 52
  126. #define SPC5_EMIOS_FLAG_F2_NUMBER 53
  127. #define SPC5_EMIOS_FLAG_F3_NUMBER 54
  128. #define SPC5_EMIOS_FLAG_F4_NUMBER 55
  129. #define SPC5_EMIOS_FLAG_F5_NUMBER 56
  130. #define SPC5_EMIOS_FLAG_F6_NUMBER 57
  131. #define SPC5_EMIOS_FLAG_F7_NUMBER 58
  132. #define SPC5_EMIOS_FLAG_F8_NUMBER 59
  133. #define SPC5_EMIOS_FLAG_F9_NUMBER 60
  134. #define SPC5_EMIOS_FLAG_F10_NUMBER 61
  135. #define SPC5_EMIOS_FLAG_F11_NUMBER 62
  136. #define SPC5_EMIOS_FLAG_F12_NUMBER 63
  137. #define SPC5_EMIOS_FLAG_F13_NUMBER 64
  138. #define SPC5_EMIOS_FLAG_F14_NUMBER 65
  139. #define SPC5_EMIOS_FLAG_F15_NUMBER 66
  140. #define SPC5_EMIOS_FLAG_F16_NUMBER 202
  141. #define SPC5_EMIOS_FLAG_F17_NUMBER 203
  142. #define SPC5_EMIOS_FLAG_F18_NUMBER 204
  143. #define SPC5_EMIOS_FLAG_F19_NUMBER 205
  144. #define SPC5_EMIOS_FLAG_F20_NUMBER 206
  145. #define SPC5_EMIOS_FLAG_F21_NUMBER 207
  146. #define SPC5_EMIOS_FLAG_F22_NUMBER 208
  147. #define SPC5_EMIOS_FLAG_F23_NUMBER 209
  148. #define SPC5_EMIOS_CLK (SPC5_SYSCLK / \
  149. SPC5_EMIOS_GPRE_VALUE)
  150. #define SPC5_EMIOS_ENABLE_CLOCK()
  151. #define SPC5_EMIOS_DISABLE_CLOCK()
  152. /* FlexCAN attributes.*/
  153. #define SPC5_HAS_FLEXCAN0 TRUE
  154. #define SPC5_FLEXCAN0_MB 64
  155. #define SPC5_FLEXCAN0_SHARED_IRQ FALSE
  156. #define SPC5_FLEXCAN0_FLEXCAN_ESR_BOFF_HANDLER vector152
  157. #define SPC5_FLEXCAN0_FLEXCAN_ESR_ERR_INT_HANDLER vector153
  158. #define SPC5_FLEXCAN0_FLEXCAN_BUF_00_HANDLER vector155
  159. #define SPC5_FLEXCAN0_FLEXCAN_BUF_01_HANDLER vector156
  160. #define SPC5_FLEXCAN0_FLEXCAN_BUF_02_HANDLER vector157
  161. #define SPC5_FLEXCAN0_FLEXCAN_BUF_03_HANDLER vector158
  162. #define SPC5_FLEXCAN0_FLEXCAN_BUF_04_HANDLER vector159
  163. #define SPC5_FLEXCAN0_FLEXCAN_BUF_05_HANDLER vector160
  164. #define SPC5_FLEXCAN0_FLEXCAN_BUF_06_HANDLER vector161
  165. #define SPC5_FLEXCAN0_FLEXCAN_BUF_07_HANDLER vector162
  166. #define SPC5_FLEXCAN0_FLEXCAN_BUF_08_HANDLER vector163
  167. #define SPC5_FLEXCAN0_FLEXCAN_BUF_09_HANDLER vector164
  168. #define SPC5_FLEXCAN0_FLEXCAN_BUF_10_HANDLER vector165
  169. #define SPC5_FLEXCAN0_FLEXCAN_BUF_11_HANDLER vector166
  170. #define SPC5_FLEXCAN0_FLEXCAN_BUF_12_HANDLER vector167
  171. #define SPC5_FLEXCAN0_FLEXCAN_BUF_13_HANDLER vector168
  172. #define SPC5_FLEXCAN0_FLEXCAN_BUF_14_HANDLER vector169
  173. #define SPC5_FLEXCAN0_FLEXCAN_BUF_15_HANDLER vector170
  174. #define SPC5_FLEXCAN0_FLEXCAN_BUF_16_31_HANDLER vector171
  175. #define SPC5_FLEXCAN0_FLEXCAN_BUF_32_63_HANDLER vector172
  176. #define SPC5_FLEXCAN0_FLEXCAN_ESR_BOFF_NUMBER 152
  177. #define SPC5_FLEXCAN0_FLEXCAN_ESR_ERR_INT_NUMBER 153
  178. #define SPC5_FLEXCAN0_FLEXCAN_BUF_00_NUMBER 155
  179. #define SPC5_FLEXCAN0_FLEXCAN_BUF_01_NUMBER 156
  180. #define SPC5_FLEXCAN0_FLEXCAN_BUF_02_NUMBER 157
  181. #define SPC5_FLEXCAN0_FLEXCAN_BUF_03_NUMBER 158
  182. #define SPC5_FLEXCAN0_FLEXCAN_BUF_04_NUMBER 159
  183. #define SPC5_FLEXCAN0_FLEXCAN_BUF_05_NUMBER 160
  184. #define SPC5_FLEXCAN0_FLEXCAN_BUF_06_NUMBER 161
  185. #define SPC5_FLEXCAN0_FLEXCAN_BUF_07_NUMBER 162
  186. #define SPC5_FLEXCAN0_FLEXCAN_BUF_08_NUMBER 163
  187. #define SPC5_FLEXCAN0_FLEXCAN_BUF_09_NUMBER 164
  188. #define SPC5_FLEXCAN0_FLEXCAN_BUF_10_NUMBER 165
  189. #define SPC5_FLEXCAN0_FLEXCAN_BUF_11_NUMBER 166
  190. #define SPC5_FLEXCAN0_FLEXCAN_BUF_12_NUMBER 167
  191. #define SPC5_FLEXCAN0_FLEXCAN_BUF_13_NUMBER 168
  192. #define SPC5_FLEXCAN0_FLEXCAN_BUF_14_NUMBER 169
  193. #define SPC5_FLEXCAN0_FLEXCAN_BUF_15_NUMBER 170
  194. #define SPC5_FLEXCAN0_FLEXCAN_BUF_16_31_NUMBER 171
  195. #define SPC5_FLEXCAN0_FLEXCAN_BUF_32_63_NUMBER 172
  196. #define SPC5_FLEXCAN0_ENABLE_CLOCK()
  197. #define SPC5_FLEXCAN0_DISABLE_CLOCK()
  198. #define SPC5_HAS_FLEXCAN1 TRUE
  199. #define SPC5_FLEXCAN1_MB 64
  200. #define SPC5_FLEXCAN1_SHARED_IRQ FALSE
  201. #define SPC5_FLEXCAN1_FLEXCAN_ESR_BOFF_HANDLER vector173
  202. #define SPC5_FLEXCAN1_FLEXCAN_ESR_ERR_INT_HANDLER vector174
  203. #define SPC5_FLEXCAN1_FLEXCAN_BUF_00_HANDLER vector176
  204. #define SPC5_FLEXCAN1_FLEXCAN_BUF_01_HANDLER vector177
  205. #define SPC5_FLEXCAN1_FLEXCAN_BUF_02_HANDLER vector178
  206. #define SPC5_FLEXCAN1_FLEXCAN_BUF_03_HANDLER vector179
  207. #define SPC5_FLEXCAN1_FLEXCAN_BUF_04_HANDLER vector180
  208. #define SPC5_FLEXCAN1_FLEXCAN_BUF_05_HANDLER vector181
  209. #define SPC5_FLEXCAN1_FLEXCAN_BUF_06_HANDLER vector182
  210. #define SPC5_FLEXCAN1_FLEXCAN_BUF_07_HANDLER vector183
  211. #define SPC5_FLEXCAN1_FLEXCAN_BUF_08_HANDLER vector184
  212. #define SPC5_FLEXCAN1_FLEXCAN_BUF_09_HANDLER vector185
  213. #define SPC5_FLEXCAN1_FLEXCAN_BUF_10_HANDLER vector186
  214. #define SPC5_FLEXCAN1_FLEXCAN_BUF_11_HANDLER vector187
  215. #define SPC5_FLEXCAN1_FLEXCAN_BUF_12_HANDLER vector188
  216. #define SPC5_FLEXCAN1_FLEXCAN_BUF_13_HANDLER vector189
  217. #define SPC5_FLEXCAN1_FLEXCAN_BUF_14_HANDLER vector190
  218. #define SPC5_FLEXCAN1_FLEXCAN_BUF_15_HANDLER vector191
  219. #define SPC5_FLEXCAN1_FLEXCAN_BUF_16_31_HANDLER vector192
  220. #define SPC5_FLEXCAN1_FLEXCAN_BUF_32_63_HANDLER vector193
  221. #define SPC5_FLEXCAN1_FLEXCAN_ESR_BOFF_NUMBER 173
  222. #define SPC5_FLEXCAN1_FLEXCAN_ESR_ERR_INT_NUMBER 174
  223. #define SPC5_FLEXCAN1_FLEXCAN_BUF_00_NUMBER 176
  224. #define SPC5_FLEXCAN1_FLEXCAN_BUF_01_NUMBER 177
  225. #define SPC5_FLEXCAN1_FLEXCAN_BUF_02_NUMBER 178
  226. #define SPC5_FLEXCAN1_FLEXCAN_BUF_03_NUMBER 179
  227. #define SPC5_FLEXCAN1_FLEXCAN_BUF_04_NUMBER 180
  228. #define SPC5_FLEXCAN1_FLEXCAN_BUF_05_NUMBER 181
  229. #define SPC5_FLEXCAN1_FLEXCAN_BUF_06_NUMBER 182
  230. #define SPC5_FLEXCAN1_FLEXCAN_BUF_07_NUMBER 183
  231. #define SPC5_FLEXCAN1_FLEXCAN_BUF_08_NUMBER 184
  232. #define SPC5_FLEXCAN1_FLEXCAN_BUF_09_NUMBER 185
  233. #define SPC5_FLEXCAN1_FLEXCAN_BUF_10_NUMBER 186
  234. #define SPC5_FLEXCAN1_FLEXCAN_BUF_11_NUMBER 187
  235. #define SPC5_FLEXCAN1_FLEXCAN_BUF_12_NUMBER 188
  236. #define SPC5_FLEXCAN1_FLEXCAN_BUF_13_NUMBER 189
  237. #define SPC5_FLEXCAN1_FLEXCAN_BUF_14_NUMBER 190
  238. #define SPC5_FLEXCAN1_FLEXCAN_BUF_15_NUMBER 191
  239. #define SPC5_FLEXCAN1_FLEXCAN_BUF_16_31_NUMBER 192
  240. #define SPC5_FLEXCAN1_FLEXCAN_BUF_32_63_NUMBER 193
  241. #define SPC5_FLEXCAN1_ENABLE_CLOCK()
  242. #define SPC5_FLEXCAN1_DISABLE_CLOCK()
  243. #define SPC5_HAS_FLEXCAN2 TRUE
  244. #define SPC5_FLEXCAN2_MB 64
  245. #define SPC5_FLEXCAN2_SHARED_IRQ FALSE
  246. #define SPC5_FLEXCAN2_FLEXCAN_ESR_BOFF_HANDLER vector280
  247. #define SPC5_FLEXCAN2_FLEXCAN_ESR_ERR_INT_HANDLER vector281
  248. #define SPC5_FLEXCAN2_FLEXCAN_BUF_00_HANDLER vector283
  249. #define SPC5_FLEXCAN2_FLEXCAN_BUF_01_HANDLER vector284
  250. #define SPC5_FLEXCAN2_FLEXCAN_BUF_02_HANDLER vector285
  251. #define SPC5_FLEXCAN2_FLEXCAN_BUF_03_HANDLER vector286
  252. #define SPC5_FLEXCAN2_FLEXCAN_BUF_04_HANDLER vector287
  253. #define SPC5_FLEXCAN2_FLEXCAN_BUF_05_HANDLER vector288
  254. #define SPC5_FLEXCAN2_FLEXCAN_BUF_06_HANDLER vector289
  255. #define SPC5_FLEXCAN2_FLEXCAN_BUF_07_HANDLER vector290
  256. #define SPC5_FLEXCAN2_FLEXCAN_BUF_08_HANDLER vector291
  257. #define SPC5_FLEXCAN2_FLEXCAN_BUF_09_HANDLER vector292
  258. #define SPC5_FLEXCAN2_FLEXCAN_BUF_10_HANDLER vector293
  259. #define SPC5_FLEXCAN2_FLEXCAN_BUF_11_HANDLER vector294
  260. #define SPC5_FLEXCAN2_FLEXCAN_BUF_12_HANDLER vector295
  261. #define SPC5_FLEXCAN2_FLEXCAN_BUF_13_HANDLER vector296
  262. #define SPC5_FLEXCAN2_FLEXCAN_BUF_14_HANDLER vector297
  263. #define SPC5_FLEXCAN2_FLEXCAN_BUF_15_HANDLER vector298
  264. #define SPC5_FLEXCAN2_FLEXCAN_BUF_16_31_HANDLER vector299
  265. #define SPC5_FLEXCAN2_FLEXCAN_BUF_32_63_HANDLER vector300
  266. #define SPC5_FLEXCAN2_FLEXCAN_ESR_BOFF_NUMBER 280
  267. #define SPC5_FLEXCAN2_FLEXCAN_ESR_ERR_INT_NUMBER 281
  268. #define SPC5_FLEXCAN2_FLEXCAN_BUF_00_NUMBER 283
  269. #define SPC5_FLEXCAN2_FLEXCAN_BUF_01_NUMBER 284
  270. #define SPC5_FLEXCAN2_FLEXCAN_BUF_02_NUMBER 285
  271. #define SPC5_FLEXCAN2_FLEXCAN_BUF_03_NUMBER 286
  272. #define SPC5_FLEXCAN2_FLEXCAN_BUF_04_NUMBER 287
  273. #define SPC5_FLEXCAN2_FLEXCAN_BUF_05_NUMBER 288
  274. #define SPC5_FLEXCAN2_FLEXCAN_BUF_06_NUMBER 289
  275. #define SPC5_FLEXCAN2_FLEXCAN_BUF_07_NUMBER 290
  276. #define SPC5_FLEXCAN2_FLEXCAN_BUF_08_NUMBER 291
  277. #define SPC5_FLEXCAN2_FLEXCAN_BUF_09_NUMBER 292
  278. #define SPC5_FLEXCAN2_FLEXCAN_BUF_10_NUMBER 293
  279. #define SPC5_FLEXCAN2_FLEXCAN_BUF_11_NUMBER 294
  280. #define SPC5_FLEXCAN2_FLEXCAN_BUF_12_NUMBER 295
  281. #define SPC5_FLEXCAN2_FLEXCAN_BUF_13_NUMBER 296
  282. #define SPC5_FLEXCAN2_FLEXCAN_BUF_14_NUMBER 297
  283. #define SPC5_FLEXCAN2_FLEXCAN_BUF_15_NUMBER 298
  284. #define SPC5_FLEXCAN2_FLEXCAN_BUF_16_31_NUMBER 299
  285. #define SPC5_FLEXCAN2_FLEXCAN_BUF_32_63_NUMBER 300
  286. #define SPC5_FLEXCAN2_ENABLE_CLOCK()
  287. #define SPC5_FLEXCAN2_DISABLE_CLOCK()
  288. /** @} */
  289. #endif /* SPC5_REGISTRY_H */
  290. /** @} */