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