Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
micropython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
xpstem
micropython
Commits
fd13ce5e
Commit
fd13ce5e
authored
Apr 08, 2019
by
Damien George
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
stm32/mboot: Add support for H7 MCUs, with H743 flash layout.
parent
ae1e18a3
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
202 additions
and
11 deletions
+202
-11
ports/stm32/mboot/Makefile
ports/stm32/mboot/Makefile
+1
-0
ports/stm32/mboot/main.c
ports/stm32/mboot/main.c
+196
-11
ports/stm32/mboot/mphalport.h
ports/stm32/mboot/mphalport.h
+5
-0
No files found.
ports/stm32/mboot/Makefile
View file @
fd13ce5e
...
...
@@ -48,6 +48,7 @@ CFLAGS_CORTEX_M = -mthumb
# Options for particular MCU series
CFLAGS_MCU_f4
=
$(CFLAGS_CORTEX_M)
-mtune
=
cortex-m4
-mcpu
=
cortex-m4
CFLAGS_MCU_f7
=
$(CFLAGS_CORTEX_M)
-mtune
=
cortex-m7
-mcpu
=
cortex-m7
CFLAGS_MCU_h7
=
$(CFLAGS_CORTEX_M)
-mtune
=
cortex-m7
-mcpu
=
cortex-m7
CFLAGS_MCU_l4
=
$(CFLAGS_CORTEX_M)
-mtune
=
cortex-m4
-mcpu
=
cortex-m4
CFLAGS
=
$(INC)
-Wall
-Wpointer-arith
-Werror
-std
=
gnu99
-nostdlib
$(CFLAGS_MOD)
$(CFLAGS_EXTRA)
...
...
ports/stm32/mboot/main.c
View file @
fd13ce5e
This diff is collapsed.
Click to expand it.
ports/stm32/mboot/mphalport.h
View file @
fd13ce5e
...
...
@@ -48,8 +48,13 @@
#define mp_hal_pin_input(p) mp_hal_pin_config((p), MP_HAL_PIN_MODE_INPUT, MP_HAL_PIN_PULL_NONE, 0)
#define mp_hal_pin_output(p) mp_hal_pin_config((p), MP_HAL_PIN_MODE_OUTPUT, MP_HAL_PIN_PULL_NONE, 0)
#define mp_hal_pin_open_drain(p) mp_hal_pin_config((p), MP_HAL_PIN_MODE_OPEN_DRAIN, MP_HAL_PIN_PULL_NONE, 0)
#if defined(STM32H7)
#define mp_hal_pin_low(p) (((GPIO_TypeDef*)((p) & ~0xf))->BSRRH = 1 << ((p) & 0xf))
#define mp_hal_pin_high(p) (((GPIO_TypeDef*)((p) & ~0xf))->BSRRL = 1 << ((p) & 0xf))
#else
#define mp_hal_pin_low(p) (((GPIO_TypeDef*)((p) & ~0xf))->BSRR = 0x10000 << ((p) & 0xf))
#define mp_hal_pin_high(p) (((GPIO_TypeDef*)((p) & ~0xf))->BSRR = 1 << ((p) & 0xf))
#endif
#define mp_hal_pin_od_low(p) mp_hal_pin_low(p)
#define mp_hal_pin_od_high(p) mp_hal_pin_high(p)
#define mp_hal_pin_read(p) ((((GPIO_TypeDef*)((p) & ~0xf))->IDR >> ((p) & 0xf)) & 1)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment