/* * Copyright (c) 2006-2020, RT-Thread Development Team * * SPDX-License-Identifier: Apache-2.0 * * Change Logs: * Date Author Notes * 2019-10-26 ChenYong first version * 2020-05-08 Chenyaxing add memory and clock information */ #ifndef __BOARD_H__ #define __BOARD_H__ #ifdef __cplusplus extern "C" { #endif /*-------------------------- ROM/RAM CONFIG BEGIN --------------------------*/ #define ROM_START ((uint32_t)0x08000000) #define ROM_SIZE (1024) #define ROM_END ((uint32_t)(ROM_START + ROM_SIZE * 1024)) #define RAM_START (0x20000000) #define RAM_SIZE (128) #define RAM_END (RAM_START + RAM_SIZE * 1024) /*-------------------------- ROM/RAM CONFIG END --------------------------*/ /*-------------------------- CLOCK CONFIG BEGIN --------------------------*/ #define BSP_CLOCK_SOURCE ("HSI") #define BSP_CLOCK_SOURCE_FREQ_MHZ ((int32_t)0) #define BSP_CLOCK_SYSTEM_FREQ_MHZ ((int32_t)168) /*-------------------------- CLOCK CONFIG END --------------------------*/ /*-------------------------- UART CONFIG BEGIN --------------------------*/ /** After configuring corresponding UART or UART DMA, you can use it. * * STEP 1, define macro define related to the serial port opening based on the serial port number * such as #define BSP_USING_UATR1 * * STEP 2, according to the corresponding pin of serial port, define the related serial port information macro * such as #define BSP_UART1_TX_PIN "PA9" * #define BSP_UART1_RX_PIN "PA10" * * STEP 3, if you want using SERIAL DMA, you must open it in the RT-Thread Settings. * RT-Thread Setting -> Components -> Device Drivers -> Serial Device Drivers -> Enable Serial DMA Mode * * STEP 4, according to serial port number to define serial port tx/rx DMA function in the board.h file * such as #define BSP_UART1_RX_USING_DMA * */ #define BSP_USING_UART1 #define BSP_UART1_TX_PIN "PA9" #define BSP_UART1_RX_PIN "PA10" /*-------------------------- UART CONFIG END --------------------------*/ extern void wait_ms(unsigned long ms_time); #endif /* __BOARD_H__ */