stm3240g_eval.h 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. /*
  2. * Copyright (c) 2013 proconX Pty Ltd <www.proconX.com>
  3. *
  4. * All rights reserved.
  5. *
  6. * Redistribution and use in source and binary forms, with or without
  7. * modification, are permitted provided that the following conditions
  8. * are met:
  9. *
  10. * 1. Redistributions of source code must retain the above copyright
  11. * notice, this list of conditions and the following disclaimer.
  12. * 2. Redistributions in binary form must reproduce the above copyright
  13. * notice, this list of conditions and the following disclaimer in the
  14. * documentation and/or other materials provided with the distribution.
  15. * 3. Neither the name of the copyright holders nor the names of
  16. * contributors may be used to endorse or promote products derived
  17. * from this software without specific prior written permission.
  18. *
  19. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  20. * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  21. * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
  22. * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
  23. * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
  24. * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
  25. * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
  26. * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
  27. * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  28. * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
  29. * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  30. * SUCH DAMAGE.
  31. *
  32. * For additional information see http://www.ethernut.de/
  33. */
  34. /*
  35. * \file arch/cm3/board/stm3230g_eval.h
  36. * \brief STM3220G-EVAL board specific settings.
  37. */
  38. #ifndef _DEV_BOARD_H_
  39. #error "Do not include this file directly. Use dev/board.h instead!"
  40. #endif
  41. /*
  42. * Sertial devices
  43. */
  44. #ifndef DEV_DEBUG
  45. #define DEV_DEBUG devUsartStm32_3
  46. #endif
  47. #ifndef DEV_DEBUG_NAME
  48. #define DEV_DEBUG_NAME devUsartStm32_3.dev_name
  49. #endif
  50. #ifndef DEV_UART
  51. #define DEV_UART devUsartStm32_3
  52. #endif
  53. #ifndef DEV_UART_NAME
  54. #define DEV_UART_NAME devUsartStm32_3.dev_name
  55. #endif
  56. /*
  57. * CAN devices
  58. */
  59. #define CAN1_RX_PIN 0
  60. #define CAN1_TX_PIN 1
  61. #define CAN2_RX_PIN 5
  62. #define CAN2_TX_PIN 13
  63. /*
  64. * Ethernet devices, incl. board specific settings for alternate function pins
  65. */
  66. #include <dev/stm32_emac.h>
  67. //#define EMAC_USE_RMII_MODE /* requires 50 MHz oscillator mounted on STM3230G_EVAL board */
  68. #ifndef EMAC_PHY_CLOCK_MCO
  69. #define EMAC_PHY_CLOCK_MCO
  70. #endif
  71. #ifndef EMAC_CRS_PORT
  72. #define EMAC_CRS_PORT NUTGPIO_PORTH
  73. #define EMAC_CRS_PIN 2
  74. #endif
  75. #ifndef EMAC_COL_PORT
  76. #define EMAC_COL_PORT NUTGPIO_PORTH
  77. #endif
  78. #ifndef EMAC_RXD2_PORT
  79. #define EMAC_RXD2_PORT NUTGPIO_PORTH
  80. #define EMAC_RXD2_PIN 6
  81. #endif
  82. #ifndef EMAC_RXD3_PORT
  83. #define EMAC_RXD3_PORT NUTGPIO_PORTH
  84. #define EMAC_RXD3_PIN 7
  85. #endif
  86. #ifndef EMAC_RX_ER_PORT
  87. #define EMAC_RX_ER_PORT NUTGPIO_PORTI
  88. #endif
  89. #ifndef EMAC_TXEN_PORT
  90. #define EMAC_TXEN_PORT NUTGPIO_PORTG
  91. #endif
  92. #ifndef EMAC_TXD0_PORT
  93. #define EMAC_TXD0_PORT NUTGPIO_PORTG
  94. #define EMAC_TXD0_PIN 13
  95. #endif
  96. #ifndef EMAC_TXD1_PORT
  97. #define EMAC_TXD1_PORT NUTGPIO_PORTG
  98. #define EMAC_TXD1_PIN 14
  99. #endif