board.h 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. /*
  2. * Copyright (c) 2006-2020, RT-Thread Development Team
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. *
  6. * Change Logs:
  7. * Date Author Notes
  8. * 2020-07-12 RealThread first version
  9. */
  10. #ifndef __BOARD_H__
  11. #define __BOARD_H__
  12. #ifdef __cplusplus
  13. extern "C"
  14. {
  15. #endif
  16. /*-------------------------- CHIP CONFIG BEGIN --------------------------*/
  17. #define CHIP_FAMILY_STM32
  18. #define CHIP_SERIES_STM32F1
  19. #define CHIP_NAME_STM32F103RC
  20. /*-------------------------- CHIP CONFIG END --------------------------*/
  21. /*-------------------------- ROM/RAM CONFIG BEGIN --------------------------*/
  22. #define ROM_START ((uint32_t)0x08000000)
  23. #define ROM_SIZE (512)
  24. #define ROM_END ((uint32_t)(ROM_START + ROM_SIZE * 1024))
  25. #define RAM_START (0x20000000)
  26. #define RAM_SIZE (64)
  27. #define RAM_END (RAM_START + RAM_SIZE * 1024)
  28. /*-------------------------- ROM/RAM CONFIG END --------------------------*/
  29. /*-------------------------- CLOCK CONFIG BEGIN --------------------------*/
  30. #define BSP_CLOCK_SOURCE ("HSI")
  31. #define BSP_CLOCK_SOURCE_FREQ_MHZ ((int32_t)0)
  32. #define BSP_CLOCK_SYSTEM_FREQ_MHZ ((int32_t)72)
  33. /*-------------------------- CLOCK CONFIG END --------------------------*/
  34. /*-------------------------- UART CONFIG BEGIN --------------------------*/
  35. /** After configuring corresponding UART or UART DMA, you can use it.
  36. *
  37. * STEP 1, define macro define related to the serial port opening based on the serial port number
  38. * such as #define BSP_USING_UATR1
  39. *
  40. * STEP 2, according to the corresponding pin of serial port, define the related serial port information macro
  41. * such as #define BSP_UART1_TX_PIN "PA9"
  42. * #define BSP_UART1_RX_PIN "PA10"
  43. *
  44. */
  45. #define BSP_USING_UART1
  46. #define BSP_UART1_TX_PIN "PA9"
  47. #define BSP_UART1_RX_PIN "PA10"
  48. /*-------------------------- UART CONFIG END --------------------------*/
  49. extern void wait_ms(unsigned long ms_time);
  50. #ifdef __cplusplus
  51. }
  52. #endif
  53. #endif /* __BOARD_H__ */