summaryrefslogtreecommitdiffstats
path: root/firmware/target/arm/stm32/cpu-stm32h743.h
blob: fc10fdb954865b7e2ece2b1ecd20a333f84e9249 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
/***************************************************************************
 *             __________               __   ___.
 *   Open      \______   \ ____   ____ |  | _\_ |__   _______  ___
 *   Source     |       _//  _ \_/ ___\|  |/ /| __ \ /  _ \  \/  /
 *   Jukebox    |    |   (  <_> )  \___|    < | \_\ (  <_> > <  <
 *   Firmware   |____|_  /\____/ \___  >__|_ \|___  /\____/__/\_ \
 *                     \/            \/     \/    \/            \/
 * $Id$
 *
 * Copyright (C) 2025 Aidan MacDonald
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.
 *
 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
 * KIND, either express or implied.
 *
 ****************************************************************************/
#ifndef __CPU_STM32H743_H__
#define __CPU_STM32H743_H__

#define CACHE_SIZE              (16 * 1024)
#define CACHEALIGN_BITS         5

#define DCACHE_SIZE             CACHE_SIZE
#define DCACHE_WAYS             0x4
#define DCACHE_SETS             0x80
#define DCACHE_LINESIZE         (1 << CACHEALIGN_BITS)

#define STM32_LSI_FREQ          32000
#define STM32_HSI_FREQ          64000000
#define STM32_CSI_FREQ          4000000
#define STM32_HSI48_FREQ        48000000

#define OTGBASE                 0x40080000
#define USB_NUM_ENDPOINTS       9

#define STM32_ITCM_BASE         0x00000000
#define STM32_ITCM_SIZE         (64 * 1024)

#define STM32_DTCM_BASE         0x20000000
#define STM32_DTCM_SIZE         (128 * 1024)

#define STM32_SRAM_AXI_BASE     0x24000000
#define STM32_SRAM_AXI_SIZE     (512 * 1024)

#define STM32_SRAM1_BASE        0x30000000
#define STM32_SRAM1_SIZE        (128 * 1024)

#define STM32_SRAM2_BASE        0x30020000
#define STM32_SRAM2_SIZE        (128 * 1024)

#define STM32_SRAM3_BASE        0x30040000
#define STM32_SRAM3_SIZE        (128 * 1024)

#define STM32_SRAM4_BASE        0x38000000
#define STM32_SRAM4_SIZE        (64 * 1024)

#define STM32_SRAM_BKP_BASE     0x38800000
#define STM32_SRAM_BKP_SIZE     (4 * 1024)

#define STM32_FLASH_BANK1_BASE  0x08000000
#define STM32_FLASH_BANK1_SIZE  (1024 * 1024)

#define STM32_FLASH_BANK2_BASE  0x08100000
#define STM32_FLASH_BANK2_SIZE  (1024 * 1024)

/* FIXME: this changes depending on target settings */
#define STM32_SDRAM1_BASE       0x70000000

#endif /* __CPU_STM32H743_H__ */