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 * 2024-04-10 RealThread first version 9 */ 10 11 #ifndef __BOARD_H__ 12 #define __BOARD_H__ 13 14 #include <rtthread.h> 15 #include <stm32h7rsxx.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_STM32H7RS 27 #define CHIP_NAME_STM32H750XBHX 28 29 /*-------------------------- CHIP CONFIG END --------------------------*/ 30 31 /*-------------------------- ROM/RAM CONFIG BEGIN --------------------------*/ 32 /** 33 * @brief H7RS7 SRAM MEMORY Layout 34 * 0x24060000 - 0x23071FFF AXI SRAM shared with ECC 35 * 0x24040000 - 0x2305FFFF AXI SRAM shared with DTCM 36 * 0x24020000 - 0x2403FFFF AXI SRAM 37 * 0x24000000 - 0x2401FFFF AXI SRAM shared with ITCM 38 */ 39 #define ROM_START ((uint32_t)0x70000000) 40 #define ROM_SIZE (131072) 41 #define ROM_END ((uint32_t)(ROM_START + ROM_SIZE * 1024)) 42 43 #define RAM_START (0x24000000) 44 #define RAM_SIZE (456) 45 #define RAM_END (RAM_START + RAM_SIZE * 1024) 46 47 /*-------------------------- ROM/RAM CONFIG END --------------------------*/ 48 49 /*-------------------------- CLOCK CONFIG BEGIN --------------------------*/ 50 51 #define BSP_CLOCK_SOURCE ("HSE") 52 #define BSP_CLOCK_SOURCE_FREQ_MHZ ((int32_t)0) 53 #define BSP_CLOCK_SYSTEM_FREQ_MHZ ((int32_t)480) 54 55 /*-------------------------- CLOCK CONFIG END --------------------------*/ 56 57 /*-------------------------- UART CONFIG BEGIN --------------------------*/ 58 59 /** After configuring corresponding UART or UART DMA, you can use it. 60 * 61 * STEP 1, define macro define related to the serial port opening based on the serial port number 62 * such as #define BSP_USING_UATR1 63 * 64 * STEP 2, according to the corresponding pin of serial port, define the related serial port information macro 65 * such as #define BSP_UART1_TX_PIN "PA9" 66 * #define BSP_UART1_RX_PIN "PA10" 67 * 68 * STEP 3, if you want using SERIAL DMA, you must open it in the RT-Thread Settings. 69 * RT-Thread Setting -> Components -> Device Drivers -> Serial Device Drivers -> Enable Serial DMA Mode 70 * 71 * STEP 4, according to serial port number to define serial port tx/rx DMA function in the board.h file 72 * such as #define BSP_UART1_RX_USING_DMA 73 * 74 */ 75 76 #define STM32_FLASH_START_ADRESS ROM_START 77 #define STM32_FLASH_SIZE ROM_SIZE 78 #define STM32_FLASH_END_ADDRESS ROM_END 79 80 #define STM32_SRAM1_SIZE RAM_SIZE 81 #define STM32_SRAM1_START RAM_START 82 #define STM32_SRAM1_END RAM_END 83 84 #if defined(__ARMCC_VERSION) 85 extern int Image$$RW_IRAM1$$ZI$$Limit; 86 #define HEAP_BEGIN (&Image$$RW_IRAM1$$ZI$$Limit) 87 #elif __ICCARM__ 88 #pragma section="CSTACK" 89 #define HEAP_BEGIN (__segment_end("CSTACK")) 90 #else 91 extern int __bss_end; 92 #define HEAP_BEGIN (&__bss_end) 93 #endif 94 95 #define HEAP_END STM32_SRAM1_END 96 97 void SystemClock_Config(void); 98 99 #ifdef __cplusplus 100 } 101 #endif 102 103 #endif 104