You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
104 lines
3.2 KiB
104 lines
3.2 KiB
5 months ago
|
/*
|
||
|
* Copyright (c) 2006-2022, RT-Thread Development Team
|
||
|
*
|
||
|
* SPDX-License-Identifier: Apache-2.0
|
||
|
*
|
||
|
* Change Logs:
|
||
|
* Date Author Notes
|
||
|
* 2024-04-10 RealThread first version
|
||
|
*/
|
||
|
|
||
|
#ifndef __BOARD_H__
|
||
|
#define __BOARD_H__
|
||
|
|
||
|
#include <rtthread.h>
|
||
|
#include <stm32h7rsxx.h>
|
||
|
#include "drv_common.h"
|
||
|
#include "drv_gpio.h"
|
||
|
|
||
|
#ifdef __cplusplus
|
||
|
extern "C" {
|
||
|
#endif
|
||
|
|
||
|
/*-------------------------- CHIP CONFIG BEGIN --------------------------*/
|
||
|
|
||
|
#define CHIP_FAMILY_STM32
|
||
|
#define CHIP_SERIES_STM32H7RS
|
||
|
#define CHIP_NAME_STM32H750XBHX
|
||
|
|
||
|
/*-------------------------- CHIP CONFIG END --------------------------*/
|
||
|
|
||
|
/*-------------------------- ROM/RAM CONFIG BEGIN --------------------------*/
|
||
|
/**
|
||
|
* @brief H7RS7 SRAM MEMORY Layout
|
||
|
* 0x24060000 - 0x23071FFF AXI SRAM shared with ECC
|
||
|
* 0x24040000 - 0x2305FFFF AXI SRAM shared with DTCM
|
||
|
* 0x24020000 - 0x2403FFFF AXI SRAM
|
||
|
* 0x24000000 - 0x2401FFFF AXI SRAM shared with ITCM
|
||
|
*/
|
||
|
#define ROM_START ((uint32_t)0x70000000)
|
||
|
#define ROM_SIZE (131072)
|
||
|
#define ROM_END ((uint32_t)(ROM_START + ROM_SIZE * 1024))
|
||
|
|
||
|
#define RAM_START (0x24000000)
|
||
|
#define RAM_SIZE (456)
|
||
|
#define RAM_END (RAM_START + RAM_SIZE * 1024)
|
||
|
|
||
|
/*-------------------------- ROM/RAM CONFIG END --------------------------*/
|
||
|
|
||
|
/*-------------------------- CLOCK CONFIG BEGIN --------------------------*/
|
||
|
|
||
|
#define BSP_CLOCK_SOURCE ("HSE")
|
||
|
#define BSP_CLOCK_SOURCE_FREQ_MHZ ((int32_t)0)
|
||
|
#define BSP_CLOCK_SYSTEM_FREQ_MHZ ((int32_t)480)
|
||
|
|
||
|
/*-------------------------- 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 STM32_FLASH_START_ADRESS ROM_START
|
||
|
#define STM32_FLASH_SIZE ROM_SIZE
|
||
|
#define STM32_FLASH_END_ADDRESS ROM_END
|
||
|
|
||
|
#define STM32_SRAM1_SIZE RAM_SIZE
|
||
|
#define STM32_SRAM1_START RAM_START
|
||
|
#define STM32_SRAM1_END RAM_END
|
||
|
|
||
|
#if defined(__ARMCC_VERSION)
|
||
|
extern int Image$$RW_IRAM1$$ZI$$Limit;
|
||
|
#define HEAP_BEGIN (&Image$$RW_IRAM1$$ZI$$Limit)
|
||
|
#elif __ICCARM__
|
||
|
#pragma section="CSTACK"
|
||
|
#define HEAP_BEGIN (__segment_end("CSTACK"))
|
||
|
#else
|
||
|
extern int __bss_end;
|
||
|
#define HEAP_BEGIN (&__bss_end)
|
||
|
#endif
|
||
|
|
||
|
#define HEAP_END STM32_SRAM1_END
|
||
|
|
||
|
void SystemClock_Config(void);
|
||
|
|
||
|
#ifdef __cplusplus
|
||
|
}
|
||
|
#endif
|
||
|
|
||
|
#endif
|