Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,11 @@ stm32l433cc: clean
DEFINES='STM32L4 STM32L433xx USBD_SOF_DISABLED' \
CFLAGS='-mcpu=cortex-m4'

stm32l552xe: clean
@$(MAKE) demo STARTUP='$(CMSISDEV)/ST/STM32L5xx/Source/Templates/gcc/startup_stm32l55sxx.s' \
LDSCRIPT='demo/stm32l552xe.ld' \
DEFINES='STM32L5 STM32L552xx USBD_SOF_DISABLED' \
CFLAGS='-mcpu=cortex-m33'

stm32f070xb: clean
@$(MAKE) demo STARTUP='$(CMSISDEV)/ST/STM32F0xx/Source/Templates/gcc/startup_stm32f070xb.s' \
Expand Down
9 changes: 9 additions & 0 deletions demo/stm32l552xe.ld
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
ENTRY(Reset_Handler)
MEMORY
{
ROM (rx): ORIGIN = 0x08000000, LENGTH = 512K
RAM (rwx): ORIGIN = 0x30000000, LENGTH = 192K
SRAM (rwx): ORIGIN = 0x0A030000, LENGTH = 16K
}

INCLUDE sections.ld
14 changes: 14 additions & 0 deletions inc/usb.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,20 @@
#endif
#endif

#elif defined(STM32L552xx)

#define USBD_STM32L552

#if !defined(__ASSEMBLER__)
extern const struct usbd_driver usbd_devfs;
extern const struct usbd_driver usbd_devfs_asm;
#if defined(USBD_ASM_DRIVER)
#define usbd_hw usbd_devfs_asm
#else
#define usbd_hw usbd_devfs
#endif
#endif

#elif defined(STM32L1)

#define USBD_STM32L100
Expand Down
10 changes: 10 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,16 @@ All requirements can be downloaded into a directory specified in environment var
<td>usbd_otgfs</td>
<td>usbd_stm32l476_otgfs.c</td>
</tr>
<tr>
<td rowspan="2">STM32L552</td>
<td nowrap rowspan="2">Doublebuffered<sup>[2]</sup><br />8<sup>[1]</sup> endpoints<br /> BC1.2</td>
<td>usbd_devfs</td>
<td>usbd_stm32l552_devfs.c</td>
</tr>
<tr>
<td>usbd_devfs_asm</td>
<td>usbd_stm32l552_devfs_asm.S</td>
</tr>
<tr>
<td>STM32F401 STM32F411</td>
<td nowrap>Doublebuffered<br/>4 endpoints<br/>VBUS detection<br/>SOF output</td>
Expand Down
17 changes: 17 additions & 0 deletions src/memmap.inc
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,23 @@
#define UID_BASE 0x1FFF7590
#define RCC_USBEN 26

#elif defined(STM32L552xx)

#define USB_EPBASE 0x4000D400
#define USB_REGBASE 0x4000D440
#define USB_CNTR 0x00
#define USB_ISTR 0x04
#define USB_FNR 0x08
#define USB_DADDR 0x0C
#define USB_BTABLE 0x10
#define USB_BCDR 0x18
#define USB_PMABASE 0x4000D800
#define RCC_BASE 0x40021000
#define RCC_APB1RSTR2 0x3C
#define RCC_APB1ENR2 0x5C
#define UID_BASE 0x0BFA0590
#define RCC_USBEN 21

#elif defined(STM32G4)

#define USB_EPBASE 0x40005C00
Expand Down
Loading