STM32F105xC.py 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. #!/usr/bin/env python
  2. '''
  3. setup for STM32F105xx
  4. '''
  5. # additional build information for ChibiOS
  6. build = {
  7. "CHIBIOS_STARTUP_MK" : "os/common/startup/ARMCMx/compilers/GCC/mk/startup_stm32f1xx.mk",
  8. "CHIBIOS_PLATFORM_MK" : "os/hal/ports/STM32/STM32F1xx/platform.mk",
  9. "CHPRINTF_USE_FLOAT" : 'no',
  10. "USE_FPU" : 'no'
  11. }
  12. pincount = {
  13. 'A': 16,
  14. 'B': 16,
  15. 'C': 16,
  16. 'D': 16,
  17. 'E': 16
  18. }
  19. # MCU parameters
  20. mcu = {
  21. # location of MCU serial number
  22. 'UDID_START' : 0x1FFFF7E8,
  23. 'RAM_MAP' : [
  24. (0x20000000, 64, 1), # main memory, DMA safe
  25. ]
  26. }
  27. ADC1_map = {
  28. # format is PIN : ADC1_CHAN
  29. "PA0" : 0,
  30. "PA1" : 1,
  31. "PA2" : 2,
  32. "PA3" : 3,
  33. "PA4" : 4,
  34. "PA5" : 5,
  35. "PA6" : 6,
  36. "PA7" : 7,
  37. "PB0" : 8,
  38. "PB1" : 9,
  39. "PC0" : 10,
  40. "PC1" : 11,
  41. "PC2" : 12,
  42. "PC3" : 13,
  43. "PC4" : 14,
  44. "PC5" : 15,
  45. }
  46. DMA_Map = {
  47. # format is (DMA_TABLE, StreamNum, Channel)
  48. "ADC1" : [(1,1,0)],
  49. "TIM1_CH1" : [(1,2,0)],
  50. "TIM1_CH3" : [(1,6,0)],
  51. "TIM1_CH4" : [(1,4,0)],
  52. "TIM1_UP" : [(1,5,0)],
  53. "TIM2_CH1" : [(1,5,0)],
  54. "TIM2_CH2" : [(1,7,0)],
  55. "TIM2_CH3" : [(1,1,0)],
  56. "TIM2_CH4" : [(1,7,0)],
  57. "TIM2_UP" : [(1,2,0)],
  58. "TIM3_CH1" : [(1,6,0)],
  59. "TIM3_CH3" : [(1,2,0)],
  60. "TIM3_CH4" : [(1,3,0)],
  61. "TIM3_UP" : [(1,3,0)],
  62. "TIM4_CH1" : [(1,1,0)],
  63. "TIM4_CH2" : [(1,4,0)],
  64. "TIM4_CH3" : [(1,5,0)],
  65. "TIM4_UP" : [(1,7,0)],
  66. "TIM5_CH1" : [(2,5,0)],
  67. "TIM5_CH2" : [(2,4,0)],
  68. "TIM5_CH3" : [(2,2,0)],
  69. "TIM5_CH4" : [(2,1,0)],
  70. "TIM5_UP" : [(2,2,0)],
  71. "TIM8_CH1" : [(2,3,0)],
  72. "TIM8_CH2" : [(2,5,0)],
  73. "TIM8_CH3" : [(2,1,0)],
  74. "TIM8_CH4" : [(2,2,0)],
  75. "TIM8_UP" : [(2,1,0)],
  76. "TIM6_UP" : [(2,3,0)],
  77. "TIM7_UP" : [(2,4,0)],
  78. "I2C1_RX" : [(1,7,0)],
  79. "I2C1_TX" : [(1,6,0)],
  80. "I2C2_RX" : [(1,5,0)],
  81. "I2C2_TX" : [(1,4,0)],
  82. "SPI1_RX" : [(1,2,0)],
  83. "SPI1_TX" : [(1,3,0)],
  84. "SPI2_RX" : [(1,4,0)],
  85. "SPI2_TX" : [(1,5,0)],
  86. "SPI3_RX" : [(2,1,0)],
  87. "SPI3_TX" : [(2,2,0)],
  88. "UART4_RX" : [(2,3,0)],
  89. "UART4_TX" : [(2,5,0)],
  90. "USART1_RX" : [(1,5,0)],
  91. "USART1_TX" : [(1,4,0)],
  92. "USART2_RX" : [(1,6,0)],
  93. "USART2_TX" : [(1,7,0)],
  94. "USART3_RX" : [(1,3,0)],
  95. "USART3_TX" : [(1,2,0)],
  96. }