Skip to content

Commit 6e83fe1

Browse files
authored
add F7 (dmitrystu#84)
1 parent ae25924 commit 6e83fe1

File tree

6 files changed

+42
-7
lines changed

6 files changed

+42
-7
lines changed

Makefile

+13-2
Original file line numberDiff line numberDiff line change
@@ -242,9 +242,20 @@ stm32f405xg_hs: clean
242242
DEFINES='STM32F4 STM32F405xx USBD_SOF_DISABLED USBD_PRIMARY_OTGHS' \
243243
CFLAGS='-mcpu=cortex-m4'
244244

245-
246245
stm32f401xc: clean
247246
@$(MAKE) demo STARTUP='$(CMSISDEV)/ST/STM32F4xx/Source/Templates/gcc/startup_stm32f401xc.s' \
248247
LDSCRIPT='demo/stm32f401xc.ld' \
249248
DEFINES='STM32F4 STM32F401xC USBD_SOF_DISABLED' \
250-
CFLAGS='-mcpu=cortex-m4'
249+
CFLAGS='-mcpu=cortex-m4'
250+
251+
stm32f745xe: clean
252+
@$(MAKE) demo STARTUP='$(CMSISDEV)/ST/STM32F7xx/Source/Templates/gcc/startup_stm32f745xx.s' \
253+
LDSCRIPT='demo/stm32f745xe.ld' \
254+
DEFINES='STM32F7 STM32F745xx USBD_SOF_DISABLED' \
255+
CFLAGS='-mcpu=cortex-m7'
256+
257+
stm32f745xe_hs: clean
258+
@$(MAKE) demo STARTUP='$(CMSISDEV)/ST/STM32F7xx/Source/Templates/gcc/startup_stm32f745xx.s' \
259+
LDSCRIPT='demo/stm32f745xe.ld' \
260+
DEFINES='STM32F7 STM32F745xx USBD_SOF_DISABLED USBD_PRIMARY_OTGHS' \
261+
CFLAGS='-mcpu=cortex-m7'

demo/cdc_startup.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ static void cdc_init_rcc (void) {
114114

115115

116116
#elif defined(STM32F429xx) || defined(STM32F405xx) \
117-
|| defined(STM32F401xC) || defined(STM32F401xE) || defined(STM32F411xE)
117+
|| defined(STM32F401xC) || defined(STM32F401xE) || defined(STM32F411xE)
118118
/* set flash latency 2WS */
119119
_BMD(FLASH->ACR, FLASH_ACR_LATENCY, FLASH_ACR_LATENCY_2WS);
120120
/* setting up PLL 16MHz HSI, VCO=144MHz, PLLP = 72MHz PLLQ = 48MHz */
@@ -144,7 +144,7 @@ static void cdc_init_rcc (void) {
144144
_BMD(GPIOA->MODER, (0x03 << 22) | (0x03 << 24), (0x02 << 22) | (0x02 << 24));
145145
#endif //defined(USBD_PRIMARY_OTGHS)
146146

147-
#elif defined(STM32F446xx)
147+
#elif defined(STM32F446xx) || defined(STM32F745xx)
148148
/* set flash latency 2WS */
149149
_BMD(FLASH->ACR, FLASH_ACR_LATENCY, FLASH_ACR_LATENCY_2WS);
150150
/* setting up PLL 16MHz HSI, VCO=144MHz, PLLP = 72MHz PLLQ = 48MHz */

demo/stm32f745xe.ld

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
ENTRY(Reset_Handler)
2+
MEMORY
3+
{
4+
ROM (rx): ORIGIN = 0x08000000, LENGTH = 512K
5+
ITCM (rwx): ORIGIN = 0x00000000, LENGTH = 16K
6+
DTCM (rw): ORIGIN = 0x20000000, LENGTH = 64K
7+
RAM (rwx): ORIGIN = 0x20010000, LENGTH = 240K
8+
RAM2 (rwx): ORIGIN = 0x2004C000, LENGTH = 16K
9+
}
10+
11+
INCLUDE sections.ld

hardware.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
| stm32l053x8 | NUCLEO-L053R8 + NUCLEO2USB | |
2121
| stm32f405xg | NUCLEO-F405RG + NUCLEO2USB | based on NUCLEO-F103RE, 0.1uF at SB33, SB38 |
2222
| stm32f405xg_hs | NUCLEO-F405RG + NUCLEO2USB | based on NUCLEO-F103RE, 0.1uF at SB33, SB38 |
23-
23+
| stm32f745xe | NUCO-V-F745VE + NUCLEO2USB | |
2424

2525
[NUCLEO2USB SHIELD](https://github.com/dmitrystu/Nucleo2USB)
26+
[NUCO-V](https://github.com/dmitrystu/nuco-v)

inc/usb.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@
110110
#endif
111111
#define usbd_hw usbd_otgfs
112112

113-
#elif defined(STM32F446xx)
113+
#elif defined(STM32F446xx) || defined(STM32F722xx) || defined (STM32F745xx)
114114
#define USBD_STM32F446FS
115115
#define USBD_STM32F446HS
116116

readme.md

+13-1
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,17 @@ All requirements can be downloaded into a directory specified in environment var
8282
<td>usbd_otgfs</td>
8383
<td>usbd_stm32f105_otgfs.c</td>
8484
</tr>
85+
<tr>
86+
<td rowspan="2">STM32F4x6 STM32F7</td>
87+
<td nowrap>Doublebuffered<br/>6 endpoints<br/>VBUS detection<br/>SOF output</td>
88+
<td>usbd_otgfs</td>
89+
<td>usbd_stm32f446_otgfs.c</td>
90+
</tr>
91+
<tr>
92+
<td nowrap>Doublebuffered<br/>9 endpoints<br/>VBUS detection<br/>SOF output</td>
93+
<td>usbd_otghs</td>
94+
<td>usbd_stm32f446_otghs.c</td>
95+
</tr>
8596
</table>
8697

8798
1. Single physical endpoint can be used to implement
@@ -93,7 +104,8 @@ All requirements can be downloaded into a directory specified in environment var
93104

94105
3. Tested with STM32L052K8, STM32L100RC, STM32L476RG, STM32F072C8, STM32F103C8, STM32F103CB,
95106
STM32F303CC, STM32F303RE, STM32F429ZI, STM32F105RBT6, STM32F107VCT6, STM32L433CCT6, STM32F070CBT6,
96-
STM32G431RB, STM32F411CEUx, STM32F405RG, STM32F446RE, STM32F373CC, STM32L053R8, GD32F103C8T6.
107+
STM32G431RB, STM32F411CEUx, STM32F405RG, STM32F446RE, STM32F373CC, STM32L053R8, GD32F103C8T6,
108+
STM32F745VE.
97109
See [hardware.md](hardware.md) for details.
98110

99111
### Implemented definitions for classes ###

0 commit comments

Comments
 (0)