1 /* 2 * Copyright (c) 2006-2022, RT-Thread Development Team 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 * 6 * Change Logs: 7 * Date Author Notes 8 * 2018-11-5 SummerGift first version 9 * 2020-8-6 NU-LL Add stm32h750vbt6 support 10 */ 11 12 #ifndef __BOARD_H__ 13 #define __BOARD_H__ 14 15 #include <rtthread.h> 16 #include <stm32h7xx.h> 17 #include "drv_common.h" 18 #include "drv_gpio.h" 19 20 #ifdef __cplusplus 21 extern "C" { 22 #endif 23 24 /*-------------------------- CHIP CONFIG BEGIN --------------------------*/ 25 26 #define CHIP_FAMILY_STM32 27 #define CHIP_SERIES_STM32H7 28 #define CHIP_NAME_STM32H750XBHX 29 30 /*-------------------------- CHIP CONFIG END --------------------------*/ 31 32 /*-------------------------- ROM/RAM CONFIG BEGIN --------------------------*/ 33 #define ROM_START ((uint32_t)0x80000000) 34 #define ROM_SIZE (128) 35 #define ROM_END ((uint32_t)(ROM_START + ROM_SIZE * 1024)) 36 37 #define RAM_START (0x20000000)//DTCM_region 38 #define RAM_SIZE (128) 39 #define RAM_END (RAM_START + RAM_SIZE * 1024) 40 41 /*-------------------------- ROM/RAM CONFIG END --------------------------*/ 42 43 /*-------------------------- CLOCK CONFIG BEGIN --------------------------*/ 44 45 #define BSP_CLOCK_SOURCE ("HSE") 46 #define BSP_CLOCK_SOURCE_FREQ_MHZ ((int32_t)0) 47 #define BSP_CLOCK_SYSTEM_FREQ_MHZ ((int32_t)480) 48 49 /*-------------------------- CLOCK CONFIG END --------------------------*/ 50 51 /*-------------------------- UART CONFIG BEGIN --------------------------*/ 52 53 /** After configuring corresponding UART or UART DMA, you can use it. 54 * 55 * STEP 1, define macro define related to the serial port opening based on the serial port number 56 * such as #define BSP_USING_UATR1 57 * 58 * STEP 2, according to the corresponding pin of serial port, define the related serial port information macro 59 * such as #define BSP_UART1_TX_PIN "PA9" 60 * #define BSP_UART1_RX_PIN "PA10" 61 * 62 * STEP 3, if you want using SERIAL DMA, you must open it in the RT-Thread Settings. 63 * RT-Thread Setting -> Components -> Device Drivers -> Serial Device Drivers -> Enable Serial DMA Mode 64 * 65 * STEP 4, according to serial port number to define serial port tx/rx DMA function in the board.h file 66 * such as #define BSP_UART1_RX_USING_DMA 67 * 68 */ 69 70 #define BSP_UART1_RX_BUFSIZE 256 71 #define BSP_UART1_TX_BUFSIZE 256 72 73 #define STM32_FLASH_START_ADRESS ROM_START 74 #define STM32_FLASH_SIZE ROM_SIZE 75 #define STM32_FLASH_END_ADDRESS ROM_END 76 77 #define STM32_SRAM_SIZE RAM_SIZE 78 #define STM32_SRAM_START RAM_START 79 #define STM32_SRAM_END RAM_END 80 81 #if defined(__ARMCC_VERSION) 82 extern int Image$$RW_IRAM1$$ZI$$Limit; 83 #define HEAP_BEGIN (&Image$$RW_IRAM1$$ZI$$Limit) 84 #elif __ICCARM__ 85 #pragma section="CSTACK" 86 #define HEAP_BEGIN (__segment_end("CSTACK")) 87 #else 88 extern int __bss_end; 89 #define HEAP_BEGIN (&__bss_end) 90 #endif 91 92 #define HEAP_END STM32_SRAM_END 93 94 void SystemClock_Config(void); 95 96 #ifdef __cplusplus 97 } 98 #endif 99 100 #endif 101