summaryrefslogtreecommitdiff
path: root/ports/stm
diff options
context:
space:
mode:
authorDiego Elio Pettenò <flameeyes@flameeyes.com>2020-05-30 10:44:13 +0100
committerDiego Elio Pettenò <flameeyes@flameeyes.com>2020-06-03 10:56:35 +0100
commitdd5d7c86d22807c021dd1711eb7dd3daebc5cfcf (patch)
treedde417af2cae8cb1797582d6489eab9cb9caeddf /ports/stm
parent60df6170cc5d0e495fde9613c05c55b64189b425 (diff)
Fix up end of file and trailing whitespace.
This can be enforced by pre-commit, but correct it separately to make it easier to review.
Diffstat (limited to 'ports/stm')
-rw-r--r--ports/stm/.gitignore2
-rw-r--r--ports/stm/README.md20
-rw-r--r--ports/stm/boards/STM32F401xe_boot.ld3
-rw-r--r--ports/stm/boards/STM32F405_boot.ld1
-rw-r--r--ports/stm/boards/STM32F405_default.ld1
-rw-r--r--ports/stm/boards/STM32F405_fs.ld1
-rw-r--r--ports/stm/boards/STM32F407_fs.ld1
-rw-r--r--ports/stm/boards/STM32F411_fs.ld1
-rw-r--r--ports/stm/boards/STM32F412_fs.ld1
-rw-r--r--ports/stm/boards/STM32F746xG_fs.ld1
-rw-r--r--ports/stm/boards/STM32F767_fs.ld1
-rw-r--r--ports/stm/boards/STM32H743_fs.ld1
-rw-r--r--ports/stm/boards/common_default.ld3
-rw-r--r--ports/stm/boards/common_nvm.ld1
-rw-r--r--ports/stm/boards/common_tcm.ld2
-rw-r--r--ports/stm/boards/espruino_pico/README.md8
-rw-r--r--ports/stm/boards/espruino_pico/mpconfigboard.h1
-rw-r--r--ports/stm/boards/espruino_wifi/README.MD8
-rw-r--r--ports/stm/boards/espruino_wifi/mpconfigboard.mk3
-rw-r--r--ports/stm/boards/feather_stm32f405_express/mpconfigboard.mk5
-rw-r--r--ports/stm/boards/meowbit_v121/mpconfigboard.mk5
-rw-r--r--ports/stm/boards/nucleo_f746zg/mpconfigboard.mk2
-rw-r--r--ports/stm/boards/nucleo_f767zi/mpconfigboard.mk3
-rw-r--r--ports/stm/boards/nucleo_h743zi_2/mpconfigboard.mk3
-rw-r--r--ports/stm/boards/openmv_h7/mpconfigboard.h1
-rw-r--r--ports/stm/boards/openmv_h7/mpconfigboard.mk3
-rw-r--r--ports/stm/boards/openmv_h7/openmv.csv2
-rw-r--r--ports/stm/boards/pyb_nano_v2/mpconfigboard.mk3
-rw-r--r--ports/stm/boards/pyboard_v11/mpconfigboard.mk3
-rw-r--r--ports/stm/boards/stm32f411ce_blackpill/mpconfigboard.mk3
-rw-r--r--ports/stm/boards/stm32f411ce_blackpill/pins.c4
-rw-r--r--ports/stm/boards/stm32f411ve_discovery/mpconfigboard.mk1
-rw-r--r--ports/stm/boards/stm32f412zg_discovery/mpconfigboard.mk2
-rw-r--r--ports/stm/boards/stm32f4_discovery/mpconfigboard.mk1
-rw-r--r--ports/stm/boards/stm32f746g_discovery/mpconfigboard.mk2
-rw-r--r--ports/stm/boards/system_stm32f4xx.c298
-rw-r--r--ports/stm/boards/system_stm32f7xx.c60
-rw-r--r--ports/stm/boards/system_stm32h7xx.c2
-rw-r--r--ports/stm/boards/thunderpack/pins.c2
-rw-r--r--ports/stm/common-hal/busio/UART.c2
-rw-r--r--ports/stm/common-hal/nvm/ByteArray.c2
-rw-r--r--ports/stm/common-hal/os/__init__.c2
-rwxr-xr-xports/stm/common-hal/supervisor/Runtime.c1
-rwxr-xr-xports/stm/common-hal/supervisor/__init__.c2
-rw-r--r--ports/stm/packages/LQFP100_f4.c2
-rw-r--r--ports/stm/packages/LQFP100_x7.c2
-rw-r--r--ports/stm/packages/LQFP144.c4
-rw-r--r--ports/stm/packages/LQFP64.c2
-rw-r--r--ports/stm/packages/UFQFPN48.c4
-rw-r--r--ports/stm/peripherals/periph.h4
-rw-r--r--ports/stm/peripherals/pins.h8
-rw-r--r--ports/stm/peripherals/stm32f4/stm32f401xe/gpio.c1
-rw-r--r--ports/stm/peripherals/stm32f4/stm32f401xe/periph.h2
-rw-r--r--ports/stm/peripherals/stm32f4/stm32f401xe/pins.c2
-rw-r--r--ports/stm/peripherals/stm32f4/stm32f405xx/gpio.c4
-rw-r--r--ports/stm/peripherals/stm32f4/stm32f405xx/periph.h2
-rw-r--r--ports/stm/peripherals/stm32f4/stm32f405xx/pins.c38
-rw-r--r--ports/stm/peripherals/stm32f4/stm32f405xx/pins.h36
-rw-r--r--ports/stm/peripherals/stm32f4/stm32f407xx/gpio.c4
-rw-r--r--ports/stm/peripherals/stm32f4/stm32f407xx/periph.h2
-rw-r--r--ports/stm/peripherals/stm32f4/stm32f407xx/pins.c38
-rw-r--r--ports/stm/peripherals/stm32f4/stm32f407xx/pins.h36
-rw-r--r--ports/stm/peripherals/stm32f4/stm32f411xe/gpio.c2
-rw-r--r--ports/stm/peripherals/stm32f4/stm32f411xe/periph.h2
-rw-r--r--ports/stm/peripherals/stm32f4/stm32f411xe/pins.c2
-rw-r--r--ports/stm/peripherals/stm32f4/stm32f412zx/gpio.c2
-rw-r--r--ports/stm/peripherals/stm32f4/stm32f412zx/periph.h2
-rw-r--r--ports/stm/peripherals/stm32f4/stm32f412zx/pins.c36
-rw-r--r--ports/stm/peripherals/stm32f4/stm32f412zx/pins.h36
-rw-r--r--ports/stm/peripherals/stm32f7/stm32f746xx/gpio.c1
-rw-r--r--ports/stm/peripherals/stm32f7/stm32f746xx/pins.c2
-rw-r--r--ports/stm/peripherals/stm32f7/stm32f767xx/gpio.c2
-rw-r--r--ports/stm/peripherals/stm32f7/stm32f767xx/periph.h2
-rw-r--r--ports/stm/peripherals/stm32f7/stm32f767xx/pins.c2
-rw-r--r--ports/stm/peripherals/stm32h7/stm32h743xx/gpio.c2
-rw-r--r--ports/stm/peripherals/stm32h7/stm32h743xx/periph.h2
-rw-r--r--ports/stm/peripherals/stm32h7/stm32h743xx/pins.c2
-rw-r--r--ports/stm/supervisor/internal_flash.c1
-rw-r--r--ports/stm/supervisor/port.c1
-rw-r--r--ports/stm/supervisor/serial.c1
-rw-r--r--ports/stm/tools/examples/nucleo_h743.csv2
-rw-r--r--ports/stm/tools/parse_af_csv.py8
-rw-r--r--ports/stm/tools/parse_pins_csv.py8
83 files changed, 370 insertions, 413 deletions
diff --git a/ports/stm/.gitignore b/ports/stm/.gitignore
index 3080ece14..5d645392c 100644
--- a/ports/stm/.gitignore
+++ b/ports/stm/.gitignore
@@ -6,4 +6,4 @@ build-*/
#####################
ref/
-.gdb_history \ No newline at end of file
+.gdb_history
diff --git a/ports/stm/README.md b/ports/stm/README.md
index 95e9bd13f..5df9cedee 100644
--- a/ports/stm/README.md
+++ b/ports/stm/README.md
@@ -1,6 +1,6 @@
# Circuitpython on STM32 #
-This port brings the ST Microelectronics STM32 series of MCUs to Circuitpython. STM32 chips have a wide range of capability, from <$1 low power STM32F0s to dual-core STM32H7s running at 400+ MHz. Currently, only the F4, F7, and H7 families are supported, powered by the ARM Cortex M4 and M7 processors.
+This port brings the ST Microelectronics STM32 series of MCUs to Circuitpython. STM32 chips have a wide range of capability, from <$1 low power STM32F0s to dual-core STM32H7s running at 400+ MHz. Currently, only the F4, F7, and H7 families are supported, powered by the ARM Cortex M4 and M7 processors.
Refer to the ST Microelectronics website for more information on features sorted by family and individual chip lines: [st.com/en/microcontrollers-microprocessors/stm32-high-performance-mcus.html](https://www.st.com/en/microcontrollers-microprocessors/stm32-high-performance-mcus.html)
@@ -13,10 +13,10 @@ STM32 SoCs vary product-by-product in clock speed, peripheral capability, pin as
- **packages/** contains package-specific pin bindings (LQFP100, BGA216, etc)
- **peripherals/** contains peripheral setup files and peripheral mapping information, sorted by family and sub-variant. Most files in this directory can be generated with the python scripts in **tools/**.
- **st-driver/** submodule for ST HAL and LL files generated via CubeMX. Shared with TinyUSB.
-- **supervisor/** contains port-specific implementations of internal flash, serial and USB, as well as the **port.c** file, which initializes the port at startup.
-- **tools/** python scripts for generating peripheral and pin mapping files in **peripherals/** and **board/**.
+- **supervisor/** contains port-specific implementations of internal flash, serial and USB, as well as the **port.c** file, which initializes the port at startup.
+- **tools/** python scripts for generating peripheral and pin mapping files in **peripherals/** and **board/**.
-At the root level, refer to **mpconfigboard.h** and **mpconfigport.mk** for port specific settings and a list of enabled modules.
+At the root level, refer to **mpconfigboard.h** and **mpconfigport.mk** for port specific settings and a list of enabled modules.
## Build instructions ##
@@ -36,9 +36,9 @@ You may also build with certain flags available in the makefile, depending on yo
## USB connection ##
-Connect your development board of choice to the host PC via the USB cable. Note that for most ST development boards such as the Nucleo and Discovery series, you must use a secondary OTG USB connector to access circuitpython, as the primary USB connector will be connected to a built-in ST-Link debugger rather than the chip itself.
+Connect your development board of choice to the host PC via the USB cable. Note that for most ST development boards such as the Nucleo and Discovery series, you must use a secondary OTG USB connector to access circuitpython, as the primary USB connector will be connected to a built-in ST-Link debugger rather than the chip itself.
-In many cases, this ST-Link USB connector will **still need to be connected to power** for the chip to turn on - refer to your specific product manual for details.
+In many cases, this ST-Link USB connector will **still need to be connected to power** for the chip to turn on - refer to your specific product manual for details.
## Flash the bootloader ##
@@ -52,7 +52,7 @@ Windows users will need to install [stm32cubeprog](https://www.st.com/en/develop
## Flashing the circuitpython image with DFU-Util ##
-Ensure the board is in dfu mode by following the steps in the previous section. Then run:
+Ensure the board is in dfu mode by following the steps in the previous section. Then run:
$ make BOARD=feather_stm32F405_express flash
@@ -62,10 +62,10 @@ Alternatively, you can navigate to the build directory and run the raw `dfu-util
## Accessing the board ##
-Connecting the board to the PC via the USB cable will allow code to be uploaded to the `CIRCUITPY` volume.
+Connecting the board to the PC via the USB cable will allow code to be uploaded to the `CIRCUITPY` volume.
-Circuitpython exposes a CDC virtual serial connection for REPL access and debugging. Connecting to it from OSX will look something like this:
+Circuitpython exposes a CDC virtual serial connection for REPL access and debugging. Connecting to it from OSX will look something like this:
screen /dev/tty.usbmodem14111201 115200
-You may also use a program like [mu](https://codewith.mu/) to assist with REPL access.
+You may also use a program like [mu](https://codewith.mu/) to assist with REPL access.
diff --git a/ports/stm/boards/STM32F401xe_boot.ld b/ports/stm/boards/STM32F401xe_boot.ld
index 37827c330..4f3e6ea70 100644
--- a/ports/stm/boards/STM32F401xe_boot.ld
+++ b/ports/stm/boards/STM32F401xe_boot.ld
@@ -1,5 +1,5 @@
/*
- GNU linker script for STM32F401 with bootloader (such as the Meowbit). No internal fs.
+ GNU linker script for STM32F401 with bootloader (such as the Meowbit). No internal fs.
*/
/* Specify the memory areas */
@@ -23,4 +23,3 @@ _estack = ORIGIN(RAM) + LENGTH(RAM);
/* RAM extents for the garbage collector */
_ram_start = ORIGIN(RAM);
_ram_end = ORIGIN(RAM) + LENGTH(RAM);
-
diff --git a/ports/stm/boards/STM32F405_boot.ld b/ports/stm/boards/STM32F405_boot.ld
index 5768d1a01..0b0e1a5f3 100644
--- a/ports/stm/boards/STM32F405_boot.ld
+++ b/ports/stm/boards/STM32F405_boot.ld
@@ -24,4 +24,3 @@ _estack = ORIGIN(RAM) + LENGTH(RAM);
/* RAM extents for the garbage collector */
_ram_start = ORIGIN(RAM);
_ram_end = ORIGIN(RAM) + LENGTH(RAM);
-
diff --git a/ports/stm/boards/STM32F405_default.ld b/ports/stm/boards/STM32F405_default.ld
index 4c11fd7cf..39255ff7a 100644
--- a/ports/stm/boards/STM32F405_default.ld
+++ b/ports/stm/boards/STM32F405_default.ld
@@ -24,4 +24,3 @@ _estack = ORIGIN(RAM) + LENGTH(RAM);
/* RAM extents for the garbage collector */
_ram_start = ORIGIN(RAM);
_ram_end = ORIGIN(RAM) + LENGTH(RAM);
-
diff --git a/ports/stm/boards/STM32F405_fs.ld b/ports/stm/boards/STM32F405_fs.ld
index e6c66127f..d6de1a08b 100644
--- a/ports/stm/boards/STM32F405_fs.ld
+++ b/ports/stm/boards/STM32F405_fs.ld
@@ -25,4 +25,3 @@ _estack = ORIGIN(RAM) + LENGTH(RAM);
/* RAM extents for the garbage collector */
_ram_start = ORIGIN(RAM);
_ram_end = ORIGIN(RAM) + LENGTH(RAM);
-
diff --git a/ports/stm/boards/STM32F407_fs.ld b/ports/stm/boards/STM32F407_fs.ld
index f06c19d99..293ac6ff5 100644
--- a/ports/stm/boards/STM32F407_fs.ld
+++ b/ports/stm/boards/STM32F407_fs.ld
@@ -25,4 +25,3 @@ _estack = ORIGIN(RAM) + LENGTH(RAM);
/* RAM extents for the garbage collector */
_ram_start = ORIGIN(RAM);
_ram_end = ORIGIN(RAM) + LENGTH(RAM);
-
diff --git a/ports/stm/boards/STM32F411_fs.ld b/ports/stm/boards/STM32F411_fs.ld
index 1b45f235f..69b98cf82 100644
--- a/ports/stm/boards/STM32F411_fs.ld
+++ b/ports/stm/boards/STM32F411_fs.ld
@@ -24,4 +24,3 @@ _estack = ORIGIN(RAM) + LENGTH(RAM);
/* RAM extents for the garbage collector */
_ram_start = ORIGIN(RAM);
_ram_end = ORIGIN(RAM) + LENGTH(RAM);
-
diff --git a/ports/stm/boards/STM32F412_fs.ld b/ports/stm/boards/STM32F412_fs.ld
index 8837bd87d..d3ad291a2 100644
--- a/ports/stm/boards/STM32F412_fs.ld
+++ b/ports/stm/boards/STM32F412_fs.ld
@@ -24,4 +24,3 @@ _estack = ORIGIN(RAM) + LENGTH(RAM);
/* RAM extents for the garbage collector */
_ram_start = ORIGIN(RAM);
_ram_end = ORIGIN(RAM) + LENGTH(RAM);
-
diff --git a/ports/stm/boards/STM32F746xG_fs.ld b/ports/stm/boards/STM32F746xG_fs.ld
index be10a1429..6c9ea4de3 100644
--- a/ports/stm/boards/STM32F746xG_fs.ld
+++ b/ports/stm/boards/STM32F746xG_fs.ld
@@ -49,4 +49,3 @@ _estack = ORIGIN(RAM) + LENGTH(RAM);
/* RAM extents for the garbage collector */
_ram_start = ORIGIN(RAM);
_ram_end = ORIGIN(RAM) + LENGTH(RAM);
-
diff --git a/ports/stm/boards/STM32F767_fs.ld b/ports/stm/boards/STM32F767_fs.ld
index 25322b0b6..2feb42225 100644
--- a/ports/stm/boards/STM32F767_fs.ld
+++ b/ports/stm/boards/STM32F767_fs.ld
@@ -24,4 +24,3 @@ _estack = ORIGIN(RAM) + LENGTH(RAM);
/* RAM extents for the garbage collector */
_ram_start = ORIGIN(RAM);
_ram_end = ORIGIN(RAM) + LENGTH(RAM);
-
diff --git a/ports/stm/boards/STM32H743_fs.ld b/ports/stm/boards/STM32H743_fs.ld
index b6c3d5b62..ca69f0d8d 100644
--- a/ports/stm/boards/STM32H743_fs.ld
+++ b/ports/stm/boards/STM32H743_fs.ld
@@ -36,4 +36,3 @@ _estack = ORIGIN(DTCM) + LENGTH(DTCM);
/* RAM extents for the garbage collector */
_ram_start = ORIGIN(RAM);
_ram_end = ORIGIN(RAM) + LENGTH(RAM);
-
diff --git a/ports/stm/boards/common_default.ld b/ports/stm/boards/common_default.ld
index ade3571a5..0c7efd01d 100644
--- a/ports/stm/boards/common_default.ld
+++ b/ports/stm/boards/common_default.ld
@@ -1,4 +1,4 @@
-/* Memory layout for default case.
+/* Memory layout for default case.
FLASH_ISR .isr_vector
FLASH_FIRMWARE .text
@@ -96,4 +96,3 @@ SECTIONS
.ARM.attributes 0 : { *(.ARM.attributes) }
}
-
diff --git a/ports/stm/boards/common_nvm.ld b/ports/stm/boards/common_nvm.ld
index f948b94e1..91e453bfd 100644
--- a/ports/stm/boards/common_nvm.ld
+++ b/ports/stm/boards/common_nvm.ld
@@ -106,4 +106,3 @@ SECTIONS
.ARM.attributes 0 : { *(.ARM.attributes) }
}
-
diff --git a/ports/stm/boards/common_tcm.ld b/ports/stm/boards/common_tcm.ld
index 1a41853fe..9e677862d 100644
--- a/ports/stm/boards/common_tcm.ld
+++ b/ports/stm/boards/common_tcm.ld
@@ -133,7 +133,7 @@ SECTIONS
. += _ld_default_stack_size;
} > DTCM
_ld_stack_top = ORIGIN(DTCM) + LENGTH(DTCM);
-
+
.ARM.attributes 0 : { *(.ARM.attributes) }
}
diff --git a/ports/stm/boards/espruino_pico/README.md b/ports/stm/boards/espruino_pico/README.md
index 9f0321c47..86df1ad32 100644
--- a/ports/stm/boards/espruino_pico/README.md
+++ b/ports/stm/boards/espruino_pico/README.md
@@ -6,10 +6,10 @@ The Espruino Pico is normally updated via a bootloader activated by the Espruino
- Install ST's DFU utility on Windows, or dfu-util for Mac or Linux
- **Mac**: install with Homebrew: `brew install dfu-util`
- **Linux**: install with apt-get: `sudo apt-get install dfu-util`
- - **Windows**: download [ST's application](https://www.st.com/en/development-tools/stsw-stm32080.html) or install the Linux subsystem for Windows 10 and follow the linux instructions.
+ - **Windows**: download [ST's application](https://www.st.com/en/development-tools/stsw-stm32080.html) or install the Linux subsystem for Windows 10 and follow the linux instructions.
- Hold down the Pico's button while plugging it into USB (when overwriting Espruino's default firmware)
- - Navigate to the same directory as your firmware.bin file for Circuitpython and run the following command: `sudo dfu-util -a 0 -s 0x08000000 -D firmware.bin` or use the ST utility on Windows.
- - Restart the board.
+ - Navigate to the same directory as your firmware.bin file for Circuitpython and run the following command: `sudo dfu-util -a 0 -s 0x08000000 -D firmware.bin` or use the ST utility on Windows.
+ - Restart the board.
-To reinstall Espruino, follow the same steps with the latest Espruino Pico binary from espruino.com/binaries. This will reinstall the usual Espruino bootloader. You must un-short the BOOT0/BTN jumper to re-use the original Espruino Bootloader again. If you used a Pencil mark then you may need to use cleaning fluid and a small brush to totally clear out the graphite. \ No newline at end of file
+To reinstall Espruino, follow the same steps with the latest Espruino Pico binary from espruino.com/binaries. This will reinstall the usual Espruino bootloader. You must un-short the BOOT0/BTN jumper to re-use the original Espruino Bootloader again. If you used a Pencil mark then you may need to use cleaning fluid and a small brush to totally clear out the graphite.
diff --git a/ports/stm/boards/espruino_pico/mpconfigboard.h b/ports/stm/boards/espruino_pico/mpconfigboard.h
index 890b1b88e..5136fac22 100644
--- a/ports/stm/boards/espruino_pico/mpconfigboard.h
+++ b/ports/stm/boards/espruino_pico/mpconfigboard.h
@@ -37,4 +37,3 @@
#define BOARD_OSC_DIV (8)
#define BOARD_HAS_LOW_SPEED_CRYSTAL (1)
-
diff --git a/ports/stm/boards/espruino_wifi/README.MD b/ports/stm/boards/espruino_wifi/README.MD
index 8c2cd3be2..cc78811f1 100644
--- a/ports/stm/boards/espruino_wifi/README.MD
+++ b/ports/stm/boards/espruino_wifi/README.MD
@@ -6,10 +6,10 @@ The Espruino Wifi is normally updated via a bootloader activated by the Espruino
- Install ST's DFU utility on Windows, or dfu-util for Mac or Linux
- **Mac**: install with Homebrew: `brew install dfu-util`
- **Linux**: install with apt-get: `sudo apt-get install dfu-util`
- - **Windows**: download [ST's application](https://www.st.com/en/development-tools/stsw-stm32080.html) or install the Linux subsystem for Windows 10 and follow the linux instructions.
+ - **Windows**: download [ST's application](https://www.st.com/en/development-tools/stsw-stm32080.html) or install the Linux subsystem for Windows 10 and follow the linux instructions.
- Hold down the Wifi's button while plugging it into USB (when overwriting Espruino's default firmware)
- - Navigate to the same directory as your firmware.bin file for Circuitpython and run the following command: `sudo dfu-util -a 0 -s 0x08000000 -D firmware.bin` or use the ST utility on Windows.
- - Restart the board.
+ - Navigate to the same directory as your firmware.bin file for Circuitpython and run the following command: `sudo dfu-util -a 0 -s 0x08000000 -D firmware.bin` or use the ST utility on Windows.
+ - Restart the board.
-To reinstall Espruino, follow the same steps with the latest Espruino Wifi binary from espruino.com/binaries. This will reinstall the usual Espruino bootloader. You must un-short the BOOT0/BTN jumper to re-use the original Espruino Bootloader again. If you used a Pencil mark then you may need to use cleaning fluid and a small brush to totally clear out the graphite. \ No newline at end of file
+To reinstall Espruino, follow the same steps with the latest Espruino Wifi binary from espruino.com/binaries. This will reinstall the usual Espruino bootloader. You must un-short the BOOT0/BTN jumper to re-use the original Espruino Bootloader again. If you used a Pencil mark then you may need to use cleaning fluid and a small brush to totally clear out the graphite.
diff --git a/ports/stm/boards/espruino_wifi/mpconfigboard.mk b/ports/stm/boards/espruino_wifi/mpconfigboard.mk
index 70d0ea2bd..ee82095ff 100644
--- a/ports/stm/boards/espruino_wifi/mpconfigboard.mk
+++ b/ports/stm/boards/espruino_wifi/mpconfigboard.mk
@@ -10,6 +10,5 @@ MCU_SERIES = F4
MCU_VARIANT = STM32F411xE
MCU_PACKAGE = UFQFPN48
-LD_COMMON = boards/common_default.ld
+LD_COMMON = boards/common_default.ld
LD_FILE = boards/STM32F411_fs.ld
-
diff --git a/ports/stm/boards/feather_stm32f405_express/mpconfigboard.mk b/ports/stm/boards/feather_stm32f405_express/mpconfigboard.mk
index 85ed18f4f..d98bd29ec 100644
--- a/ports/stm/boards/feather_stm32f405_express/mpconfigboard.mk
+++ b/ports/stm/boards/feather_stm32f405_express/mpconfigboard.mk
@@ -12,8 +12,7 @@ MCU_SERIES = F4
MCU_VARIANT = STM32F405xx
MCU_PACKAGE = LQFP64
-LD_COMMON = boards/common_default.ld
-LD_DEFAULT = boards/STM32F405_default.ld
+LD_COMMON = boards/common_default.ld
+LD_DEFAULT = boards/STM32F405_default.ld
LD_BOOT = boards/STM32F405_boot.ld # UF2 boot option
UF2_OFFSET = 0x8010000
-
diff --git a/ports/stm/boards/meowbit_v121/mpconfigboard.mk b/ports/stm/boards/meowbit_v121/mpconfigboard.mk
index cd8d3b548..cf60c89c2 100644
--- a/ports/stm/boards/meowbit_v121/mpconfigboard.mk
+++ b/ports/stm/boards/meowbit_v121/mpconfigboard.mk
@@ -15,7 +15,6 @@ MCU_SERIES = F4
MCU_VARIANT = STM32F401xE
MCU_PACKAGE = LQFP64
-LD_COMMON = boards/common_default.ld
-LD_FILE = boards/STM32F401xe_boot.ld
+LD_COMMON = boards/common_default.ld
+LD_FILE = boards/STM32F401xe_boot.ld
# LD_FILE = boards/STM32F401xe_fs.ld # use for internal flash
-
diff --git a/ports/stm/boards/nucleo_f746zg/mpconfigboard.mk b/ports/stm/boards/nucleo_f746zg/mpconfigboard.mk
index 8a793d570..f23f642e7 100644
--- a/ports/stm/boards/nucleo_f746zg/mpconfigboard.mk
+++ b/ports/stm/boards/nucleo_f746zg/mpconfigboard.mk
@@ -10,5 +10,5 @@ MCU_SERIES = F7
MCU_VARIANT = STM32F746xx
MCU_PACKAGE = LQFP144
-LD_COMMON = boards/common_default.ld
+LD_COMMON = boards/common_default.ld
LD_FILE = boards/STM32F746xG_fs.ld
diff --git a/ports/stm/boards/nucleo_f767zi/mpconfigboard.mk b/ports/stm/boards/nucleo_f767zi/mpconfigboard.mk
index c8c2a3d2b..4e5e1bc7c 100644
--- a/ports/stm/boards/nucleo_f767zi/mpconfigboard.mk
+++ b/ports/stm/boards/nucleo_f767zi/mpconfigboard.mk
@@ -10,6 +10,5 @@ MCU_SERIES = F7
MCU_VARIANT = STM32F767xx
MCU_PACKAGE = LQFP144
-LD_COMMON = boards/common_default.ld
+LD_COMMON = boards/common_default.ld
LD_FILE = boards/STM32F767_fs.ld
-
diff --git a/ports/stm/boards/nucleo_h743zi_2/mpconfigboard.mk b/ports/stm/boards/nucleo_h743zi_2/mpconfigboard.mk
index 01ace06a2..ea99a1e10 100644
--- a/ports/stm/boards/nucleo_h743zi_2/mpconfigboard.mk
+++ b/ports/stm/boards/nucleo_h743zi_2/mpconfigboard.mk
@@ -10,6 +10,5 @@ MCU_SERIES = H7
MCU_VARIANT = STM32H743xx
MCU_PACKAGE = LQFP144
-LD_COMMON = boards/common_tcm.ld
+LD_COMMON = boards/common_tcm.ld
LD_FILE = boards/STM32H743_fs.ld
-
diff --git a/ports/stm/boards/openmv_h7/mpconfigboard.h b/ports/stm/boards/openmv_h7/mpconfigboard.h
index 9a049ed2c..2f26c6e71 100644
--- a/ports/stm/boards/openmv_h7/mpconfigboard.h
+++ b/ports/stm/boards/openmv_h7/mpconfigboard.h
@@ -34,4 +34,3 @@
#define BOARD_OSC_DIV (12)
#define HSE_VALUE ((uint32_t)12000000)
#define BOARD_HAS_LOW_SPEED_CRYSTAL (0)
-
diff --git a/ports/stm/boards/openmv_h7/mpconfigboard.mk b/ports/stm/boards/openmv_h7/mpconfigboard.mk
index 242dac52c..4ff0f18d5 100644
--- a/ports/stm/boards/openmv_h7/mpconfigboard.mk
+++ b/ports/stm/boards/openmv_h7/mpconfigboard.mk
@@ -10,6 +10,5 @@ MCU_SERIES = H7
MCU_VARIANT = STM32H743xx
MCU_PACKAGE = LQFP100_x7
-LD_COMMON = boards/common_tcm.ld
+LD_COMMON = boards/common_tcm.ld
LD_FILE = boards/STM32H743_fs.ld
-
diff --git a/ports/stm/boards/openmv_h7/openmv.csv b/ports/stm/boards/openmv_h7/openmv.csv
index 9045e1ea2..f9d4ebc40 100644
--- a/ports/stm/boards/openmv_h7/openmv.csv
+++ b/ports/stm/boards/openmv_h7/openmv.csv
@@ -23,4 +23,4 @@ I2C4_SDA,PD13
SPI2_NSS,PB12
SPI2_SCK,PB13
SPI2_MISO,PB14
-SPI2_MOSI,PB15 \ No newline at end of file
+SPI2_MOSI,PB15
diff --git a/ports/stm/boards/pyb_nano_v2/mpconfigboard.mk b/ports/stm/boards/pyb_nano_v2/mpconfigboard.mk
index 0a06852fb..08a266816 100644
--- a/ports/stm/boards/pyb_nano_v2/mpconfigboard.mk
+++ b/ports/stm/boards/pyb_nano_v2/mpconfigboard.mk
@@ -12,6 +12,5 @@ MCU_SERIES = F4
MCU_VARIANT = STM32F411xE
MCU_PACKAGE = UFQFPN48
-LD_COMMON = boards/common_default.ld
+LD_COMMON = boards/common_default.ld
LD_FILE = boards/STM32F411_fs.ld
-
diff --git a/ports/stm/boards/pyboard_v11/mpconfigboard.mk b/ports/stm/boards/pyboard_v11/mpconfigboard.mk
index 9d8b0f3f2..c0c0f5f6c 100644
--- a/ports/stm/boards/pyboard_v11/mpconfigboard.mk
+++ b/ports/stm/boards/pyboard_v11/mpconfigboard.mk
@@ -10,6 +10,5 @@ MCU_SERIES = F4
MCU_VARIANT = STM32F405xx
MCU_PACKAGE = LQFP64
-LD_COMMON = boards/common_default.ld
+LD_COMMON = boards/common_default.ld
LD_FILE = boards/STM32F405_fs.ld
-
diff --git a/ports/stm/boards/stm32f411ce_blackpill/mpconfigboard.mk b/ports/stm/boards/stm32f411ce_blackpill/mpconfigboard.mk
index 62887c028..0054232e1 100644
--- a/ports/stm/boards/stm32f411ce_blackpill/mpconfigboard.mk
+++ b/ports/stm/boards/stm32f411ce_blackpill/mpconfigboard.mk
@@ -15,6 +15,5 @@ MCU_SERIES = F4
MCU_VARIANT = STM32F411xE
MCU_PACKAGE = UFQFPN48
-LD_COMMON = boards/common_default.ld
+LD_COMMON = boards/common_default.ld
LD_FILE = boards/STM32F411_fs.ld
-
diff --git a/ports/stm/boards/stm32f411ce_blackpill/pins.c b/ports/stm/boards/stm32f411ce_blackpill/pins.c
index aa9736fc4..2f8aab6e8 100644
--- a/ports/stm/boards/stm32f411ce_blackpill/pins.c
+++ b/ports/stm/boards/stm32f411ce_blackpill/pins.c
@@ -33,7 +33,7 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = {
{ MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA00) },
{ MP_ROM_QSTR(MP_QSTR_C15), MP_ROM_PTR(&pin_PC15) },
{ MP_ROM_QSTR(MP_QSTR_C14), MP_ROM_PTR(&pin_PC14) },
- { MP_ROM_QSTR(MP_QSTR_C13), MP_ROM_PTR(&pin_PC13) },
- { MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_PC13) },
+ { MP_ROM_QSTR(MP_QSTR_C13), MP_ROM_PTR(&pin_PC13) },
+ { MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_PC13) },
};
MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table);
diff --git a/ports/stm/boards/stm32f411ve_discovery/mpconfigboard.mk b/ports/stm/boards/stm32f411ve_discovery/mpconfigboard.mk
index 761602acd..ca2f10ba3 100644
--- a/ports/stm/boards/stm32f411ve_discovery/mpconfigboard.mk
+++ b/ports/stm/boards/stm32f411ve_discovery/mpconfigboard.mk
@@ -12,4 +12,3 @@ MCU_PACKAGE = LQFP100_f4
LD_COMMON = boards/common_default.ld
LD_FILE = boards/STM32F411_fs.ld
-
diff --git a/ports/stm/boards/stm32f412zg_discovery/mpconfigboard.mk b/ports/stm/boards/stm32f412zg_discovery/mpconfigboard.mk
index 09e7bda85..04d2a9b0d 100644
--- a/ports/stm/boards/stm32f412zg_discovery/mpconfigboard.mk
+++ b/ports/stm/boards/stm32f412zg_discovery/mpconfigboard.mk
@@ -17,5 +17,3 @@ MCU_PACKAGE = LQFP144
LD_COMMON = boards/common_default.ld
LD_FILE = boards/STM32F412_fs.ld
-
-
diff --git a/ports/stm/boards/stm32f4_discovery/mpconfigboard.mk b/ports/stm/boards/stm32f4_discovery/mpconfigboard.mk
index 57a65f75a..09652d9ad 100644
--- a/ports/stm/boards/stm32f4_discovery/mpconfigboard.mk
+++ b/ports/stm/boards/stm32f4_discovery/mpconfigboard.mk
@@ -12,4 +12,3 @@ MCU_PACKAGE = LQFP100_f4
LD_COMMON = boards/common_default.ld
LD_FILE = boards/STM32F407_fs.ld
-
diff --git a/ports/stm/boards/stm32f746g_discovery/mpconfigboard.mk b/ports/stm/boards/stm32f746g_discovery/mpconfigboard.mk
index 0b4ccc760..ff8456df6 100644
--- a/ports/stm/boards/stm32f746g_discovery/mpconfigboard.mk
+++ b/ports/stm/boards/stm32f746g_discovery/mpconfigboard.mk
@@ -10,5 +10,5 @@ MCU_SERIES = F7
MCU_VARIANT = STM32F746xx
MCU_PACKAGE = TFBGA216
-LD_COMMON = boards/common_default.ld
+LD_COMMON = boards/common_default.ld
LD_FILE = boards/STM32F746xG_fs.ld
diff --git a/ports/stm/boards/system_stm32f4xx.c b/ports/stm/boards/system_stm32f4xx.c
index caa4f9caf..d8c745dbb 100644
--- a/ports/stm/boards/system_stm32f4xx.c
+++ b/ports/stm/boards/system_stm32f4xx.c
@@ -1,6 +1,6 @@
/*
* Taken from ST Cube library and modified. See below for original header.
- *
+ *
* Modifications copyright (c) 2019 Lucian Copeland for Adafruit Industries
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -28,16 +28,16 @@
* @author MCD Application Team
* @brief CMSIS Cortex-M4 Device Peripheral Access Layer System Source File.
*
- * This file provides two functions and one global variable to be called from
+ * This file provides two functions and one global variable to be called from
* user application:
- * - SystemInit(): This function is called at startup just after reset and
+ * - SystemInit(): This function is called at startup just after reset and
* before branch to main program. This call is made inside
* the "startup_stm32f4xx.s" file.
*
* - SystemCoreClock variable: Contains the core clock (HCLK), it can be used
- * by the user application to setup the SysTick
+ * by the user application to setup the SysTick
* timer or configure other parameters.
- *
+ *
* - SystemCoreClockUpdate(): Updates the variable SystemCoreClock and must
* be called whenever the core clock is changed
* during program execution.
@@ -79,8 +79,8 @@
/** @addtogroup stm32f4xx_system
* @{
- */
-
+ */
+
/** @addtogroup STM32F4xx_System_Private_Includes
* @{
*/
@@ -89,7 +89,7 @@
#include "stm32f4xx.h"
#include "py/mpconfig.h"
-#if !defined (HSE_VALUE)
+#if !defined (HSE_VALUE)
#define HSE_VALUE ((uint32_t)25000000) /*!< Default value of the External oscillator in Hz */
#endif /* HSE_VALUE */
@@ -121,7 +121,7 @@
/* #define DATA_IN_ExtSRAM */
#endif /* STM32F40xxx || STM32F41xxx || STM32F42xxx || STM32F43xxx || STM32F469xx || STM32F479xx ||\
STM32F412Zx || STM32F412Vx */
-
+
#if defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx)\
|| defined(STM32F446xx) || defined(STM32F469xx) || defined(STM32F479xx)
/* #define DATA_IN_ExtSDRAM */
@@ -131,7 +131,7 @@
/*!< Uncomment the following line if you need to relocate your vector Table in
Internal SRAM. */
/* #define VECT_TAB_SRAM */
-#define VECT_TAB_OFFSET 0x00 /*!< Vector Table base offset field.
+#define VECT_TAB_OFFSET 0x00 /*!< Vector Table base offset field.
This value must be a multiple of 0x200. */
/******************************************************************************/
@@ -153,7 +153,7 @@
/* This variable is updated in three ways:
1) by calling CMSIS function SystemCoreClockUpdate()
2) by calling HAL API function HAL_RCC_GetHCLKFreq()
- 3) each time HAL_RCC_ClockConfig() is called to configure the system clock frequency
+ 3) each time HAL_RCC_ClockConfig() is called to configure the system clock frequency
Note: If you use this function to configure the system clock; then there
is no need to call the 2 first functions listed above, since SystemCoreClock
variable is updated automatically.
@@ -170,7 +170,7 @@ const uint8_t APBPrescTable[8] = {0, 0, 0, 0, 1, 2, 3, 4};
*/
#if defined (DATA_IN_ExtSRAM) || defined (DATA_IN_ExtSDRAM)
- static void SystemInit_ExtMemCtl(void);
+ static void SystemInit_ExtMemCtl(void);
#endif /* DATA_IN_ExtSRAM || DATA_IN_ExtSDRAM */
/**
@@ -183,7 +183,7 @@ const uint8_t APBPrescTable[8] = {0, 0, 0, 0, 1, 2, 3, 4};
/**
* @brief Setup the microcontroller system
- * Initialize the FPU setting, vector table location and External memory
+ * Initialize the FPU setting, vector table location and External memory
* configuration.
* @param None
* @retval None
@@ -214,7 +214,7 @@ void SystemInit(void)
RCC->CIR = 0x00000000;
#if defined (DATA_IN_ExtSRAM) || defined (DATA_IN_ExtSDRAM)
- SystemInit_ExtMemCtl();
+ SystemInit_ExtMemCtl();
#endif /* DATA_IN_ExtSRAM || DATA_IN_ExtSDRAM */
/* Configure the Vector Table location add offset address ------------------*/
@@ -232,41 +232,41 @@ void SystemInit(void)
* The SystemCoreClock variable contains the core clock (HCLK), it can
* be used by the user application to setup the SysTick timer or configure
* other parameters.
- *
+ *
* @note Each time the core clock (HCLK) changes, this function must be called
* to update SystemCoreClock variable value. Otherwise, any configuration
- * based on this variable will be incorrect.
- *
- * @note - The system frequency computed by this function is not the real
- * frequency in the chip. It is calculated based on the predefined
+ * based on this variable will be incorrect.
+ *
+ * @note - The system frequency computed by this function is not the real
+ * frequency in the chip. It is calculated based on the predefined
* constant and the selected clock source:
- *
+ *
* - If SYSCLK source is HSI, SystemCoreClock will contain the HSI_VALUE(*)
- *
+ *
* - If SYSCLK source is HSE, SystemCoreClock will contain the HSE_VALUE(**)
- *
- * - If SYSCLK source is PLL, SystemCoreClock will contain the HSE_VALUE(**)
+ *
+ * - If SYSCLK source is PLL, SystemCoreClock will contain the HSE_VALUE(**)
* or HSI_VALUE(*) multiplied/divided by the PLL factors.
- *
+ *
* (*) HSI_VALUE is a constant defined in stm32f4xx_hal_conf.h file (default value
* 16 MHz) but the real value may vary depending on the variations
- * in voltage and temperature.
- *
+ * in voltage and temperature.
+ *
* (**) HSE_VALUE is a constant defined in stm32f4xx_hal_conf.h file (its value
* depends on the application requirements), user has to ensure that HSE_VALUE
* is same as the real frequency of the crystal used. Otherwise, this function
* may have wrong result.
- *
+ *
* - The result of this function could be not correct when using fractional
* value for HSE crystal.
- *
+ *
* @param None
* @retval None
*/
void SystemCoreClockUpdate(void)
{
uint32_t tmp = 0, pllvco = 0, pllp = 2, pllsource = 0, pllm = 2;
-
+
/* Get SYSCLK source -------------------------------------------------------*/
tmp = RCC->CFGR & RCC_CFGR_SWS;
@@ -282,10 +282,10 @@ void SystemCoreClockUpdate(void)
/* PLL_VCO = (HSE_VALUE or HSI_VALUE / PLL_M) * PLL_N
SYSCLK = PLL_VCO / PLL_P
- */
+ */
pllsource = (RCC->PLLCFGR & RCC_PLLCFGR_PLLSRC) >> 22;
pllm = RCC->PLLCFGR & RCC_PLLCFGR_PLLM;
-
+
if (pllsource != 0)
{
/* HSE used as PLL clock source */
@@ -334,79 +334,79 @@ void SystemInit_ExtMemCtl(void)
/* Delay after an RCC peripheral clock enabling */
tmp = READ_BIT(RCC->AHB1ENR, RCC_AHB1ENR_GPIOCEN);
-
+
/* Connect PDx pins to FMC Alternate function */
GPIOD->AFR[0] = 0x00CCC0CC;
GPIOD->AFR[1] = 0xCCCCCCCC;
- /* Configure PDx pins in Alternate function mode */
+ /* Configure PDx pins in Alternate function mode */
GPIOD->MODER = 0xAAAA0A8A;
- /* Configure PDx pins speed to 100 MHz */
+ /* Configure PDx pins speed to 100 MHz */
GPIOD->OSPEEDR = 0xFFFF0FCF;
- /* Configure PDx pins Output type to push-pull */
+ /* Configure PDx pins Output type to push-pull */
GPIOD->OTYPER = 0x00000000;
- /* No pull-up, pull-down for PDx pins */
+ /* No pull-up, pull-down for PDx pins */
GPIOD->PUPDR = 0x00000000;
/* Connect PEx pins to FMC Alternate function */
GPIOE->AFR[0] = 0xC00CC0CC;
GPIOE->AFR[1] = 0xCCCCCCCC;
- /* Configure PEx pins in Alternate function mode */
+ /* Configure PEx pins in Alternate function mode */
GPIOE->MODER = 0xAAAA828A;
- /* Configure PEx pins speed to 100 MHz */
+ /* Configure PEx pins speed to 100 MHz */
GPIOE->OSPEEDR = 0xFFFFC3CF;
- /* Configure PEx pins Output type to push-pull */
+ /* Configure PEx pins Output type to push-pull */
GPIOE->OTYPER = 0x00000000;
- /* No pull-up, pull-down for PEx pins */
+ /* No pull-up, pull-down for PEx pins */
GPIOE->PUPDR = 0x00000000;
-
+
/* Connect PFx pins to FMC Alternate function */
GPIOF->AFR[0] = 0xCCCCCCCC;
GPIOF->AFR[1] = 0xCCCCCCCC;
- /* Configure PFx pins in Alternate function mode */
+ /* Configure PFx pins in Alternate function mode */
GPIOF->MODER = 0xAA800AAA;
- /* Configure PFx pins speed to 50 MHz */
+ /* Configure PFx pins speed to 50 MHz */
GPIOF->OSPEEDR = 0xAA800AAA;
- /* Configure PFx pins Output type to push-pull */
+ /* Configure PFx pins Output type to push-pull */
GPIOF->OTYPER = 0x00000000;
- /* No pull-up, pull-down for PFx pins */
+ /* No pull-up, pull-down for PFx pins */
GPIOF->PUPDR = 0x00000000;
/* Connect PGx pins to FMC Alternate function */
GPIOG->AFR[0] = 0xCCCCCCCC;
GPIOG->AFR[1] = 0xCCCCCCCC;
- /* Configure PGx pins in Alternate function mode */
+ /* Configure PGx pins in Alternate function mode */
GPIOG->MODER = 0xAAAAAAAA;
- /* Configure PGx pins speed to 50 MHz */
+ /* Configure PGx pins speed to 50 MHz */
GPIOG->OSPEEDR = 0xAAAAAAAA;
- /* Configure PGx pins Output type to push-pull */
+ /* Configure PGx pins Output type to push-pull */
GPIOG->OTYPER = 0x00000000;
- /* No pull-up, pull-down for PGx pins */
+ /* No pull-up, pull-down for PGx pins */
GPIOG->PUPDR = 0x00000000;
-
+
/* Connect PHx pins to FMC Alternate function */
GPIOH->AFR[0] = 0x00C0CC00;
GPIOH->AFR[1] = 0xCCCCCCCC;
- /* Configure PHx pins in Alternate function mode */
+ /* Configure PHx pins in Alternate function mode */
GPIOH->MODER = 0xAAAA08A0;
- /* Configure PHx pins speed to 50 MHz */
+ /* Configure PHx pins speed to 50 MHz */
GPIOH->OSPEEDR = 0xAAAA08A0;
- /* Configure PHx pins Output type to push-pull */
+ /* Configure PHx pins Output type to push-pull */
GPIOH->OTYPER = 0x00000000;
- /* No pull-up, pull-down for PHx pins */
+ /* No pull-up, pull-down for PHx pins */
GPIOH->PUPDR = 0x00000000;
-
+
/* Connect PIx pins to FMC Alternate function */
GPIOI->AFR[0] = 0xCCCCCCCC;
GPIOI->AFR[1] = 0x00000CC0;
- /* Configure PIx pins in Alternate function mode */
+ /* Configure PIx pins in Alternate function mode */
GPIOI->MODER = 0x0028AAAA;
- /* Configure PIx pins speed to 50 MHz */
+ /* Configure PIx pins speed to 50 MHz */
GPIOI->OSPEEDR = 0x0028AAAA;
- /* Configure PIx pins Output type to push-pull */
+ /* Configure PIx pins Output type to push-pull */
GPIOI->OTYPER = 0x00000000;
- /* No pull-up, pull-down for PIx pins */
+ /* No pull-up, pull-down for PIx pins */
GPIOI->PUPDR = 0x00000000;
-
+
/*-- FMC Configuration -------------------------------------------------------*/
/* Enable the FMC interface clock */
RCC->AHB3ENR |= 0x00000001;
@@ -414,50 +414,50 @@ void SystemInit_ExtMemCtl(void)
tmp = READ_BIT(RCC->AHB3ENR, RCC_AHB3ENR_FMCEN);
FMC_Bank5_6->SDCR[0] = 0x000019E4;
- FMC_Bank5_6->SDTR[0] = 0x01115351;
-
+ FMC_Bank5_6->SDTR[0] = 0x01115351;
+
/* SDRAM initialization sequence */
/* Clock enable command */
- FMC_Bank5_6->SDCMR = 0x00000011;
- tmpreg = FMC_Bank5_6->SDSR & 0x00000020;
+ FMC_Bank5_6->SDCMR = 0x00000011;
+ tmpreg = FMC_Bank5_6->SDSR & 0x00000020;
while((tmpreg != 0) && (timeout-- > 0))
{
- tmpreg = FMC_Bank5_6->SDSR & 0x00000020;
+ tmpreg = FMC_Bank5_6->SDSR & 0x00000020;
}
/* Delay */
for (index = 0; index<1000; index++);
-
+
/* PALL command */
- FMC_Bank5_6->SDCMR = 0x00000012;
+ FMC_Bank5_6->SDCMR = 0x00000012;
timeout = 0xFFFF;
while((tmpreg != 0) && (timeout-- > 0))
{
- tmpreg = FMC_Bank5_6->SDSR & 0x00000020;
+ tmpreg = FMC_Bank5_6->SDSR & 0x00000020;
}
-
+
/* Auto refresh command */
FMC_Bank5_6->SDCMR = 0x00000073;
timeout = 0xFFFF;
while((tmpreg != 0) && (timeout-- > 0))
{
- tmpreg = FMC_Bank5_6->SDSR & 0x00000020;
+ tmpreg = FMC_Bank5_6->SDSR & 0x00000020;
}
-
+
/* MRD register program */
FMC_Bank5_6->SDCMR = 0x00046014;
timeout = 0xFFFF;
while((tmpreg != 0) && (timeout-- > 0))
{
- tmpreg = FMC_Bank5_6->SDSR & 0x00000020;
- }
-
+ tmpreg = FMC_Bank5_6->SDSR & 0x00000020;
+ }
+
/* Set refresh count */
tmpreg = FMC_Bank5_6->SDRTR;
FMC_Bank5_6->SDRTR = (tmpreg | (0x0000027C<<1));
-
+
/* Disable write protection */
- tmpreg = FMC_Bank5_6->SDCR[0];
+ tmpreg = FMC_Bank5_6->SDCR[0];
FMC_Bank5_6->SDCR[0] = (tmpreg & 0xFFFFFDFF);
#if defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx)
@@ -465,7 +465,7 @@ void SystemInit_ExtMemCtl(void)
FMC_Bank1->BTCR[2] = 0x00001011;
FMC_Bank1->BTCR[3] = 0x00000201;
FMC_Bank1E->BWTR[2] = 0x0fffffff;
-#endif /* STM32F427xx || STM32F437xx || STM32F429xx || STM32F439xx */
+#endif /* STM32F427xx || STM32F437xx || STM32F429xx || STM32F439xx */
#if defined(STM32F469xx) || defined(STM32F479xx)
/* Configure and enable Bank1_SRAM2 */
FMC_Bank1->BTCR[2] = 0x00001091;
@@ -473,7 +473,7 @@ void SystemInit_ExtMemCtl(void)
FMC_Bank1E->BWTR[2] = 0x0fffffff;
#endif /* STM32F469xx || STM32F479xx */
- (void)(tmp);
+ (void)(tmp);
}
#endif /* STM32F427xx || STM32F437xx || STM32F429xx || STM32F439xx || STM32F469xx || STM32F479xx */
#elif defined (DATA_IN_ExtSRAM) || defined (DATA_IN_ExtSDRAM)
@@ -499,13 +499,13 @@ void SystemInit_ExtMemCtl(void)
clock */
RCC->AHB1ENR |= 0x0000007D;
#else
- /* Enable GPIOC, GPIOD, GPIOE, GPIOF, GPIOG, GPIOH and GPIOI interface
+ /* Enable GPIOC, GPIOD, GPIOE, GPIOF, GPIOG, GPIOH and GPIOI interface
clock */
RCC->AHB1ENR |= 0x000001F8;
-#endif /* STM32F446xx */
+#endif /* STM32F446xx */
/* Delay after an RCC peripheral clock enabling */
tmp = READ_BIT(RCC->AHB1ENR, RCC_AHB1ENR_GPIOCEN);
-
+
#if defined(STM32F446xx)
/* Connect PAx pins to FMC Alternate function */
GPIOA->AFR[0] |= 0xC0000000;
@@ -535,78 +535,78 @@ void SystemInit_ExtMemCtl(void)
/* Connect PDx pins to FMC Alternate function */
GPIOD->AFR[0] = 0x000000CC;
GPIOD->AFR[1] = 0xCC000CCC;
- /* Configure PDx pins in Alternate function mode */
+ /* Configure PDx pins in Alternate function mode */
GPIOD->MODER = 0xA02A000A;
- /* Configure PDx pins speed to 50 MHz */
+ /* Configure PDx pins speed to 50 MHz */
GPIOD->OSPEEDR = 0xA02A000A;
- /* Configure PDx pins Output type to push-pull */
+ /* Configure PDx pins Output type to push-pull */
GPIOD->OTYPER = 0x00000000;
- /* No pull-up, pull-down for PDx pins */
+ /* No pull-up, pull-down for PDx pins */
GPIOD->PUPDR = 0x00000000;
/* Connect PEx pins to FMC Alternate function */
GPIOE->AFR[0] = 0xC00000CC;
GPIOE->AFR[1] = 0xCCCCCCCC;
- /* Configure PEx pins in Alternate function mode */
+ /* Configure PEx pins in Alternate function mode */
GPIOE->MODER = 0xAAAA800A;
- /* Configure PEx pins speed to 50 MHz */
+ /* Configure PEx pins speed to 50 MHz */
GPIOE->OSPEEDR = 0xAAAA800A;
- /* Configure PEx pins Output type to push-pull */
+ /* Configure PEx pins Output type to push-pull */
GPIOE->OTYPER = 0x00000000;
- /* No pull-up, pull-down for PEx pins */
+ /* No pull-up, pull-down for PEx pins */
GPIOE->PUPDR = 0x00000000;
/* Connect PFx pins to FMC Alternate function */
GPIOF->AFR[0] = 0xCCCCCCCC;
GPIOF->AFR[1] = 0xCCCCCCCC;
- /* Configure PFx pins in Alternate function mode */
+ /* Configure PFx pins in Alternate function mode */
GPIOF->MODER = 0xAA800AAA;
- /* Configure PFx pins speed to 50 MHz */
+ /* Configure PFx pins speed to 50 MHz */
GPIOF->OSPEEDR = 0xAA800AAA;
- /* Configure PFx pins Output type to push-pull */
+ /* Configure PFx pins Output type to push-pull */
GPIOF->OTYPER = 0x00000000;
- /* No pull-up, pull-down for PFx pins */
+ /* No pull-up, pull-down for PFx pins */
GPIOF->PUPDR = 0x00000000;
/* Connect PGx pins to FMC Alternate function */
GPIOG->AFR[0] = 0xCCCCCCCC;
GPIOG->AFR[1] = 0xCCCCCCCC;
- /* Configure PGx pins in Alternate function mode */
+ /* Configure PGx pins in Alternate function mode */
GPIOG->MODER = 0xAAAAAAAA;
- /* Configure PGx pins speed to 50 MHz */
+ /* Configure PGx pins speed to 50 MHz */
GPIOG->OSPEEDR = 0xAAAAAAAA;
- /* Configure PGx pins Output type to push-pull */
+ /* Configure PGx pins Output type to push-pull */
GPIOG->OTYPER = 0x00000000;
- /* No pull-up, pull-down for PGx pins */
+ /* No pull-up, pull-down for PGx pins */
GPIOG->PUPDR = 0x00000000;
#if defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx)\
- || defined(STM32F469xx) || defined(STM32F479xx)
+ || defined(STM32F469xx) || defined(STM32F479xx)
/* Connect PHx pins to FMC Alternate function */
GPIOH->AFR[0] = 0x00C0CC00;
GPIOH->AFR[1] = 0xCCCCCCCC;
- /* Configure PHx pins in Alternate function mode */
+ /* Configure PHx pins in Alternate function mode */
GPIOH->MODER = 0xAAAA08A0;
- /* Configure PHx pins speed to 50 MHz */
+ /* Configure PHx pins speed to 50 MHz */
GPIOH->OSPEEDR = 0xAAAA08A0;
- /* Configure PHx pins Output type to push-pull */
+ /* Configure PHx pins Output type to push-pull */
GPIOH->OTYPER = 0x00000000;
- /* No pull-up, pull-down for PHx pins */
+ /* No pull-up, pull-down for PHx pins */
GPIOH->PUPDR = 0x00000000;
-
+
/* Connect PIx pins to FMC Alternate function */
GPIOI->AFR[0] = 0xCCCCCCCC;
GPIOI->AFR[1] = 0x00000CC0;
- /* Configure PIx pins in Alternate function mode */
+ /* Configure PIx pins in Alternate function mode */
GPIOI->MODER = 0x0028AAAA;
- /* Configure PIx pins speed to 50 MHz */
+ /* Configure PIx pins speed to 50 MHz */
GPIOI->OSPEEDR = 0x0028AAAA;
- /* Configure PIx pins Output type to push-pull */
+ /* Configure PIx pins Output type to push-pull */
GPIOI->OTYPER = 0x00000000;
- /* No pull-up, pull-down for PIx pins */
+ /* No pull-up, pull-down for PIx pins */
GPIOI->PUPDR = 0x00000000;
#endif /* STM32F427xx || STM32F437xx || STM32F429xx || STM32F439xx || STM32F469xx || STM32F479xx */
-
+
/*-- FMC Configuration -------------------------------------------------------*/
/* Enable the FMC interface clock */
RCC->AHB3ENR |= 0x00000001;
@@ -616,65 +616,65 @@ void SystemInit_ExtMemCtl(void)
/* Configure and enable SDRAM bank1 */
#if defined(STM32F446xx)
FMC_Bank5_6->SDCR[0] = 0x00001954;
-#else
+#else
FMC_Bank5_6->SDCR[0] = 0x000019E4;
#endif /* STM32F446xx */
- FMC_Bank5_6->SDTR[0] = 0x01115351;
-
+ FMC_Bank5_6->SDTR[0] = 0x01115351;
+
/* SDRAM initialization sequence */
/* Clock enable command */
- FMC_Bank5_6->SDCMR = 0x00000011;
- tmpreg = FMC_Bank5_6->SDSR & 0x00000020;
+ FMC_Bank5_6->SDCMR = 0x00000011;
+ tmpreg = FMC_Bank5_6->SDSR & 0x00000020;
while((tmpreg != 0) && (timeout-- > 0))
{
- tmpreg = FMC_Bank5_6->SDSR & 0x00000020;
+ tmpreg = FMC_Bank5_6->SDSR & 0x00000020;
}
/* Delay */
for (index = 0; index<1000; index++);
-
+
/* PALL command */
- FMC_Bank5_6->SDCMR = 0x00000012;
+ FMC_Bank5_6->SDCMR = 0x00000012;
timeout = 0xFFFF;
while((tmpreg != 0) && (timeout-- > 0))
{
- tmpreg = FMC_Bank5_6->SDSR & 0x00000020;
+ tmpreg = FMC_Bank5_6->SDSR & 0x00000020;
}
-
+
/* Auto refresh command */
#if defined(STM32F446xx)
FMC_Bank5_6->SDCMR = 0x000000F3;
-#else
+#else
FMC_Bank5_6->SDCMR = 0x00000073;
#endif /* STM32F446xx */
timeout = 0xFFFF;
while((tmpreg != 0) && (timeout-- > 0))
{
- tmpreg = FMC_Bank5_6->SDSR & 0x00000020;
+ tmpreg = FMC_Bank5_6->SDSR & 0x00000020;
}
-
+
/* MRD register program */
#if defined(STM32F446xx)
FMC_Bank5_6->SDCMR = 0x00044014;
-#else
+#else
FMC_Bank5_6->SDCMR = 0x00046014;
#endif /* STM32F446xx */
timeout = 0xFFFF;
while((tmpreg != 0) && (timeout-- > 0))
{
- tmpreg = FMC_Bank5_6->SDSR & 0x00000020;
- }
-
+ tmpreg = FMC_Bank5_6->SDSR & 0x00000020;
+ }
+
/* Set refresh count */
tmpreg = FMC_Bank5_6->SDRTR;
#if defined(STM32F446xx)
FMC_Bank5_6->SDRTR = (tmpreg | (0x0000050C<<1));
-#else
+#else
FMC_Bank5_6->SDRTR = (tmpreg | (0x0000027C<<1));
#endif /* STM32F446xx */
-
+
/* Disable write protection */
- tmpreg = FMC_Bank5_6->SDCR[0];
+ tmpreg = FMC_Bank5_6->SDCR[0];
FMC_Bank5_6->SDCR[0] = (tmpreg & 0xFFFFFDFF);
#endif /* DATA_IN_ExtSDRAM */
#endif /* STM32F427xx || STM32F437xx || STM32F429xx || STM32F439xx || STM32F446xx || STM32F469xx || STM32F479xx */
@@ -689,55 +689,55 @@ void SystemInit_ExtMemCtl(void)
RCC->AHB1ENR |= 0x00000078;
/* Delay after an RCC peripheral clock enabling */
tmp = READ_BIT(RCC->AHB1ENR, RCC_AHB1ENR_GPIODEN);
-
+
/* Connect PDx pins to FMC Alternate function */
GPIOD->AFR[0] = 0x00CCC0CC;
GPIOD->AFR[1] = 0xCCCCCCCC;
- /* Configure PDx pins in Alternate function mode */
+ /* Configure PDx pins in Alternate function mode */
GPIOD->MODER = 0xAAAA0A8A;
- /* Configure PDx pins speed to 100 MHz */
+ /* Configure PDx pins speed to 100 MHz */
GPIOD->OSPEEDR = 0xFFFF0FCF;
- /* Configure PDx pins Output type to push-pull */
+ /* Configure PDx pins Output type to push-pull */
GPIOD->OTYPER = 0x00000000;
- /* No pull-up, pull-down for PDx pins */
+ /* No pull-up, pull-down for PDx pins */
GPIOD->PUPDR = 0x00000000;
/* Connect PEx pins to FMC Alternate function */
GPIOE->AFR[0] = 0xC00CC0CC;
GPIOE->AFR[1] = 0xCCCCCCCC;
- /* Configure PEx pins in Alternate function mode */
+ /* Configure PEx pins in Alternate function mode */
GPIOE->MODER = 0xAAAA828A;
- /* Configure PEx pins speed to 100 MHz */
+ /* Configure PEx pins speed to 100 MHz */
GPIOE->OSPEEDR = 0xFFFFC3CF;
- /* Configure PEx pins Output type to push-pull */
+ /* Configure PEx pins Output type to push-pull */
GPIOE->OTYPER = 0x00000000;
- /* No pull-up, pull-down for PEx pins */
+ /* No pull-up, pull-down for PEx pins */
GPIOE->PUPDR = 0x00000000;
/* Connect PFx pins to FMC Alternate function */
GPIOF->AFR[0] = 0x00CCCCCC;
GPIOF->AFR[1] = 0xCCCC0000;
- /* Configure PFx pins in Alternate function mode */
+ /* Configure PFx pins in Alternate function mode */
GPIOF->MODER = 0xAA000AAA;
- /* Configure PFx pins speed to 100 MHz */
+ /* Configure PFx pins speed to 100 MHz */
GPIOF->OSPEEDR = 0xFF000FFF;
- /* Configure PFx pins Output type to push-pull */
+ /* Configure PFx pins Output type to push-pull */
GPIOF->OTYPER = 0x00000000;
- /* No pull-up, pull-down for PFx pins */
+ /* No pull-up, pull-down for PFx pins */
GPIOF->PUPDR = 0x00000000;
/* Connect PGx pins to FMC Alternate function */
GPIOG->AFR[0] = 0x00CCCCCC;
GPIOG->AFR[1] = 0x000000C0;
- /* Configure PGx pins in Alternate function mode */
+ /* Configure PGx pins in Alternate function mode */
GPIOG->MODER = 0x00085AAA;
- /* Configure PGx pins speed to 100 MHz */
+ /* Configure PGx pins speed to 100 MHz */
GPIOG->OSPEEDR = 0x000CAFFF;
- /* Configure PGx pins Output type to push-pull */
+ /* Configure PGx pins Output type to push-pull */
GPIOG->OTYPER = 0x00000000;
- /* No pull-up, pull-down for PGx pins */
+ /* No pull-up, pull-down for PGx pins */
GPIOG->PUPDR = 0x00000000;
-
+
/*-- FMC/FSMC Configuration --------------------------------------------------*/
/* Enable the FMC/FSMC interface clock */
RCC->AHB3ENR |= 0x00000001;
@@ -749,7 +749,7 @@ void SystemInit_ExtMemCtl(void)
FMC_Bank1->BTCR[2] = 0x00001011;
FMC_Bank1->BTCR[3] = 0x00000201;
FMC_Bank1E->BWTR[2] = 0x0fffffff;
-#endif /* STM32F427xx || STM32F437xx || STM32F429xx || STM32F439xx */
+#endif /* STM32F427xx || STM32F437xx || STM32F429xx || STM32F439xx */
#if defined(STM32F469xx) || defined(STM32F479xx)
/* Delay after an RCC peripheral clock enabling */
tmp = READ_BIT(RCC->AHB3ENR, RCC_AHB3ENR_FMCEN);
@@ -770,8 +770,8 @@ void SystemInit_ExtMemCtl(void)
#endif /* DATA_IN_ExtSRAM */
#endif /* STM32F405xx || STM32F415xx || STM32F407xx || STM32F417xx || STM32F427xx || STM32F437xx ||\
- STM32F429xx || STM32F439xx || STM32F469xx || STM32F479xx || STM32F412Zx || STM32F412Vx */
- (void)(tmp);
+ STM32F429xx || STM32F439xx || STM32F469xx || STM32F479xx || STM32F412Zx || STM32F412Vx */
+ (void)(tmp);
}
#endif /* DATA_IN_ExtSRAM && DATA_IN_ExtSDRAM */
/**
diff --git a/ports/stm/boards/system_stm32f7xx.c b/ports/stm/boards/system_stm32f7xx.c
index 184fefb36..4aebc3d35 100644
--- a/ports/stm/boards/system_stm32f7xx.c
+++ b/ports/stm/boards/system_stm32f7xx.c
@@ -4,16 +4,16 @@
* @author MCD Application Team
* @brief CMSIS Cortex-M7 Device Peripheral Access Layer System Source File.
*
- * This file provides two functions and one global variable to be called from
+ * This file provides two functions and one global variable to be called from
* user application:
- * - SystemInit(): This function is called at startup just after reset and
+ * - SystemInit(): This function is called at startup just after reset and
* before branch to main program. This call is made inside
* the "startup_stm32f7xx.s" file.
*
* - SystemCoreClock variable: Contains the core clock (HCLK), it can be used
- * by the user application to setup the SysTick
+ * by the user application to setup the SysTick
* timer or configure other parameters.
- *
+ *
* - SystemCoreClockUpdate(): Updates the variable SystemCoreClock and must
* be called whenever the core clock is changed
* during program execution.
@@ -39,15 +39,15 @@
/** @addtogroup stm32f7xx_system
* @{
- */
-
+ */
+
/** @addtogroup STM32F7xx_System_Private_Includes
* @{
*/
#include "stm32f7xx.h"
-#if !defined (HSE_VALUE)
+#if !defined (HSE_VALUE)
#define HSE_VALUE ((uint32_t)25000000) /*!< Default value of the External oscillator in Hz */
#endif /* HSE_VALUE */
@@ -76,7 +76,7 @@
/*!< Uncomment the following line if you need to relocate your vector Table in
Internal SRAM. */
/* #define VECT_TAB_SRAM */
-#define VECT_TAB_OFFSET 0x00 /*!< Vector Table base offset field.
+#define VECT_TAB_OFFSET 0x00 /*!< Vector Table base offset field.
This value must be a multiple of 0x200. */
/******************************************************************************/
@@ -99,7 +99,7 @@
/* This variable is updated in three ways:
1) by calling CMSIS function SystemCoreClockUpdate()
2) by calling HAL API function HAL_RCC_GetHCLKFreq()
- 3) each time HAL_RCC_ClockConfig() is called to configure the system clock frequency
+ 3) each time HAL_RCC_ClockConfig() is called to configure the system clock frequency
Note: If you use this function to configure the system clock; then there
is no need to call the 2 first functions listed above, since SystemCoreClock
variable is updated automatically.
@@ -126,7 +126,7 @@
/**
* @brief Setup the microcontroller system
- * Initialize the Embedded Flash Interface, the PLL and update the
+ * Initialize the Embedded Flash Interface, the PLL and update the
* SystemFrequency variable.
* @param None
* @retval None
@@ -154,41 +154,41 @@ void SystemInit(void)
* The SystemCoreClock variable contains the core clock (HCLK), it can
* be used by the user application to setup the SysTick timer or configure
* other parameters.
- *
+ *
* @note Each time the core clock (HCLK) changes, this function must be called
* to update SystemCoreClock variable value. Otherwise, any configuration
- * based on this variable will be incorrect.
- *
- * @note - The system frequency computed by this function is not the real
- * frequency in the chip. It is calculated based on the predefined
+ * based on this variable will be incorrect.
+ *
+ * @note - The system frequency computed by this function is not the real
+ * frequency in the chip. It is calculated based on the predefined
* constant and the selected clock source:
- *
+ *
* - If SYSCLK source is HSI, SystemCoreClock will contain the HSI_VALUE(*)
- *
+ *
* - If SYSCLK source is HSE, SystemCoreClock will contain the HSE_VALUE(**)
- *
- * - If SYSCLK source is PLL, SystemCoreClock will contain the HSE_VALUE(**)
+ *
+ * - If SYSCLK source is PLL, SystemCoreClock will contain the HSE_VALUE(**)
* or HSI_VALUE(*) multiplied/divided by the PLL factors.
- *
+ *
* (*) HSI_VALUE is a constant defined in stm32f7xx_hal_conf.h file (default value
* 16 MHz) but the real value may vary depending on the variations
- * in voltage and temperature.
- *
+ * in voltage and temperature.
+ *
* (**) HSE_VALUE is a constant defined in stm32f7xx_hal_conf.h file (default value
* 25 MHz), user has to ensure that HSE_VALUE is same as the real
* frequency of the crystal used. Otherwise, this function may
* have wrong result.
- *
+ *
* - The result of this function could be not correct when using fractional
* value for HSE crystal.
- *
+ *
* @param None
* @retval None
*/
void SystemCoreClockUpdate(void)
{
uint32_t tmp = 0, pllvco = 0, pllp = 2, pllsource = 0, pllm = 2;
-
+
/* Get SYSCLK source -------------------------------------------------------*/
tmp = RCC->CFGR & RCC_CFGR_SWS;
@@ -204,10 +204,10 @@ void SystemCoreClockUpdate(void)
/* PLL_VCO = (HSE_VALUE or HSI_VALUE / PLL_M) * PLL_N
SYSCLK = PLL_VCO / PLL_P
- */
+ */
pllsource = (RCC->PLLCFGR & RCC_PLLCFGR_PLLSRC) >> 22;
pllm = RCC->PLLCFGR & RCC_PLLCFGR_PLLM;
-
+
if (pllsource != 0)
{
/* HSE used as PLL clock source */
@@ -216,7 +216,7 @@ void SystemCoreClockUpdate(void)
else
{
/* HSI used as PLL clock source */
- pllvco = (HSI_VALUE / pllm) * ((RCC->PLLCFGR & RCC_PLLCFGR_PLLN) >> 6);
+ pllvco = (HSI_VALUE / pllm) * ((RCC->PLLCFGR & RCC_PLLCFGR_PLLN) >> 6);
}
pllp = (((RCC->PLLCFGR & RCC_PLLCFGR_PLLP) >>16) + 1 ) *2;
@@ -240,8 +240,8 @@ void SystemCoreClockUpdate(void)
/**
* @}
*/
-
+
/**
* @}
- */
+ */
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
diff --git a/ports/stm/boards/system_stm32h7xx.c b/ports/stm/boards/system_stm32h7xx.c
index 2132f26a0..bbb0f821f 100644
--- a/ports/stm/boards/system_stm32h7xx.c
+++ b/ports/stm/boards/system_stm32h7xx.c
@@ -1,6 +1,6 @@
/*
* Taken from ST Cube library and modified. See below for original header.
- *
+ *
* Modifications copyright (c) 2020 Lucian Copeland for Adafruit Industries
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
diff --git a/ports/stm/boards/thunderpack/pins.c b/ports/stm/boards/thunderpack/pins.c
index 559d9658e..eed54eb3c 100644
--- a/ports/stm/boards/thunderpack/pins.c
+++ b/ports/stm/boards/thunderpack/pins.c
@@ -10,7 +10,7 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = {
{ MP_ROM_QSTR(MP_QSTR_PA6), MP_ROM_PTR(&pin_PA06) },
{ MP_ROM_QSTR(MP_QSTR_PA7), MP_ROM_PTR(&pin_PA07) },
{ MP_ROM_QSTR(MP_QSTR_PA8), MP_ROM_PTR(&pin_PA08) },
- { MP_ROM_QSTR(MP_QSTR_PA9), MP_ROM_PTR(&pin_PA09) },
+ { MP_ROM_QSTR(MP_QSTR_PA9), MP_ROM_PTR(&pin_PA09) },
{ MP_ROM_QSTR(MP_QSTR_PA10), MP_ROM_PTR(&pin_PA10) },
{ MP_ROM_QSTR(MP_QSTR_PA13), MP_ROM_PTR(&pin_PA13) },
{ MP_ROM_QSTR(MP_QSTR_PA14), MP_ROM_PTR(&pin_PA14) },
diff --git a/ports/stm/common-hal/busio/UART.c b/ports/stm/common-hal/busio/UART.c
index 0dc10c4e4..86a932290 100644
--- a/ports/stm/common-hal/busio/UART.c
+++ b/ports/stm/common-hal/busio/UART.c
@@ -280,7 +280,7 @@ void common_hal_busio_uart_deinit(busio_uart_obj_t *self) {
reset_pin_number(self->rx->pin->port,self->rx->pin->number);
self->rx = NULL;
}
-
+
ringbuf_free(&self->ringbuf);
}
diff --git a/ports/stm/common-hal/nvm/ByteArray.c b/ports/stm/common-hal/nvm/ByteArray.c
index 1aaf54653..462d3aa9d 100644
--- a/ports/stm/common-hal/nvm/ByteArray.c
+++ b/ports/stm/common-hal/nvm/ByteArray.c
@@ -60,7 +60,7 @@ bool common_hal_nvm_bytearray_set_bytes(nvm_bytearray_obj_t *self,
return false;
}
}
-
+
// Finish up
HAL_FLASH_Lock();
return true;
diff --git a/ports/stm/common-hal/os/__init__.c b/ports/stm/common-hal/os/__init__.c
index eef58bfe2..84deb8175 100644
--- a/ports/stm/common-hal/os/__init__.c
+++ b/ports/stm/common-hal/os/__init__.c
@@ -92,4 +92,4 @@ bool common_hal_os_urandom(uint8_t *buffer, uint32_t length) {
#else
return false;
#endif
-} \ No newline at end of file
+}
diff --git a/ports/stm/common-hal/supervisor/Runtime.c b/ports/stm/common-hal/supervisor/Runtime.c
index feab6987d..ea663f897 100755
--- a/ports/stm/common-hal/supervisor/Runtime.c
+++ b/ports/stm/common-hal/supervisor/Runtime.c
@@ -35,4 +35,3 @@ bool common_hal_get_serial_connected(void) {
bool common_hal_get_serial_bytes_available(void) {
return (bool) serial_bytes_available();
}
-
diff --git a/ports/stm/common-hal/supervisor/__init__.c b/ports/stm/common-hal/supervisor/__init__.c
index ac88556b4..6dca35fb5 100755
--- a/ports/stm/common-hal/supervisor/__init__.c
+++ b/ports/stm/common-hal/supervisor/__init__.c
@@ -37,4 +37,4 @@ const super_runtime_obj_t common_hal_supervisor_runtime_obj = {
.base = {
.type = &supervisor_runtime_type,
},
-}; \ No newline at end of file
+};
diff --git a/ports/stm/packages/LQFP100_f4.c b/ports/stm/packages/LQFP100_f4.c
index 5bc0a5158..9136b9495 100644
--- a/ports/stm/packages/LQFP100_f4.c
+++ b/ports/stm/packages/LQFP100_f4.c
@@ -114,4 +114,4 @@ STATIC const mp_rom_map_elem_t mcu_pin_globals_table[] = {
// VDD --------------------------------------------*/
};
-MP_DEFINE_CONST_DICT(mcu_pin_globals, mcu_pin_globals_table); \ No newline at end of file
+MP_DEFINE_CONST_DICT(mcu_pin_globals, mcu_pin_globals_table);
diff --git a/ports/stm/packages/LQFP100_x7.c b/ports/stm/packages/LQFP100_x7.c
index 23d89a826..4d3d5f45a 100644
--- a/ports/stm/packages/LQFP100_x7.c
+++ b/ports/stm/packages/LQFP100_x7.c
@@ -112,4 +112,4 @@ STATIC const mp_rom_map_elem_t mcu_pin_globals_table[] = {
// VDD --------------------------------------------*/
};
-MP_DEFINE_CONST_DICT(mcu_pin_globals, mcu_pin_globals_table); \ No newline at end of file
+MP_DEFINE_CONST_DICT(mcu_pin_globals, mcu_pin_globals_table);
diff --git a/ports/stm/packages/LQFP144.c b/ports/stm/packages/LQFP144.c
index 36683bb64..5e0d743d7 100644
--- a/ports/stm/packages/LQFP144.c
+++ b/ports/stm/packages/LQFP144.c
@@ -154,6 +154,6 @@ STATIC const mp_rom_map_elem_t mcu_pin_globals_table[] = {
{ MP_ROM_QSTR(MP_QSTR_PE01), MP_ROM_PTR(&pin_PE01) },
// PDR_ON -----------------------------------------*/
// VDD --------------------------------------------*/
-
+
};
-MP_DEFINE_CONST_DICT(mcu_pin_globals, mcu_pin_globals_table); \ No newline at end of file
+MP_DEFINE_CONST_DICT(mcu_pin_globals, mcu_pin_globals_table);
diff --git a/ports/stm/packages/LQFP64.c b/ports/stm/packages/LQFP64.c
index e6a492bc3..52ca27cd9 100644
--- a/ports/stm/packages/LQFP64.c
+++ b/ports/stm/packages/LQFP64.c
@@ -76,6 +76,6 @@ STATIC const mp_rom_map_elem_t mcu_pin_globals_table[] = {
{ MP_ROM_QSTR(MP_QSTR_PB09), MP_ROM_PTR(&pin_PB09) },
// VSS --------------------------------------------*/
// VDD --------------------------------------------*/
-
+
};
MP_DEFINE_CONST_DICT(mcu_pin_globals, mcu_pin_globals_table);
diff --git a/ports/stm/packages/UFQFPN48.c b/ports/stm/packages/UFQFPN48.c
index ae4bcf6cd..5304482ec 100644
--- a/ports/stm/packages/UFQFPN48.c
+++ b/ports/stm/packages/UFQFPN48.c
@@ -58,6 +58,6 @@ STATIC const mp_rom_map_elem_t mcu_pin_globals_table[] = {
{ MP_ROM_QSTR(MP_QSTR_PB09), MP_ROM_PTR(&pin_PB09) },
// VSS --------------------------------------------*/
// VDD --------------------------------------------*/
-
+
};
-MP_DEFINE_CONST_DICT(mcu_pin_globals, mcu_pin_globals_table); \ No newline at end of file
+MP_DEFINE_CONST_DICT(mcu_pin_globals, mcu_pin_globals_table);
diff --git a/ports/stm/peripherals/periph.h b/ports/stm/peripherals/periph.h
index 316dbbec5..34089c849 100644
--- a/ports/stm/peripherals/periph.h
+++ b/ports/stm/peripherals/periph.h
@@ -51,8 +51,8 @@ typedef struct {
// Timer Peripheral
typedef struct {
- uint8_t tim_index:4;
- uint8_t altfn_index:4;
+ uint8_t tim_index:4;
+ uint8_t altfn_index:4;
uint8_t channel_index:4;
const mcu_pin_obj_t * pin;
} mcu_tim_pin_obj_t;
diff --git a/ports/stm/peripherals/pins.h b/ports/stm/peripherals/pins.h
index 8f06d012e..358313f56 100644
--- a/ports/stm/peripherals/pins.h
+++ b/ports/stm/peripherals/pins.h
@@ -39,7 +39,7 @@ typedef struct {
mp_obj_base_t base;
uint8_t port:4;
uint8_t number:4;
- uint8_t adc_unit:3;
+ uint8_t adc_unit:3;
uint8_t adc_channel:5;
} mcu_pin_obj_t;
@@ -50,8 +50,8 @@ typedef struct {
#define ADC_3 4
//STM32 ADC pins can have a combination of 1, 2 or all 3 ADCs on a single pin,
-//but all 3 ADCs will share the same input number per pin.
-//F4 family has 3 ADC max, 24 channels max.
+//but all 3 ADCs will share the same input number per pin.
+//F4 family has 3 ADC max, 24 channels max.
#define ADC_INPUT(mask, number) \
.adc_unit = mask, \
.adc_channel = number,
@@ -63,7 +63,7 @@ typedef struct {
extern const mp_obj_type_t mcu_pin_type;
// STM32 can have up to 9 ports, each restricted to 16 pins
-// We split the pin/port evenly, in contrast to nrf.
+// We split the pin/port evenly, in contrast to nrf.
#define PIN(p_port, p_number, p_adc) \
{ \
{ &mcu_pin_type }, \
diff --git a/ports/stm/peripherals/stm32f4/stm32f401xe/gpio.c b/ports/stm/peripherals/stm32f4/stm32f401xe/gpio.c
index 514bcc506..d10fcbb6f 100644
--- a/ports/stm/peripherals/stm32f4/stm32f401xe/gpio.c
+++ b/ports/stm/peripherals/stm32f4/stm32f401xe/gpio.c
@@ -42,4 +42,3 @@ void stm32_peripherals_gpio_init(void) {
never_reset_pin_number(0,13); //PA13 SWDIO
never_reset_pin_number(0,14); //PA14 SWCLK
}
-
diff --git a/ports/stm/peripherals/stm32f4/stm32f401xe/periph.h b/ports/stm/peripherals/stm32f4/stm32f401xe/periph.h
index 334a14db5..ae416bda1 100644
--- a/ports/stm/peripherals/stm32f4/stm32f401xe/periph.h
+++ b/ports/stm/peripherals/stm32f4/stm32f401xe/periph.h
@@ -54,4 +54,4 @@ extern const mcu_periph_obj_t mcu_uart_rx_list[6];
TIM_TypeDef * mcu_tim_banks[TIM_BANK_ARRAY_LEN];
const mcu_tim_pin_obj_t mcu_tim_pin_list[TIM_PIN_ARRAY_LEN];
-#endif // MICROPY_INCLUDED_STM32_PERIPHERALS_STM32F401XE_PERIPH_H \ No newline at end of file
+#endif // MICROPY_INCLUDED_STM32_PERIPHERALS_STM32F401XE_PERIPH_H
diff --git a/ports/stm/peripherals/stm32f4/stm32f401xe/pins.c b/ports/stm/peripherals/stm32f4/stm32f401xe/pins.c
index eea2a1a1b..ed89f0de6 100644
--- a/ports/stm/peripherals/stm32f4/stm32f401xe/pins.c
+++ b/ports/stm/peripherals/stm32f4/stm32f401xe/pins.c
@@ -120,4 +120,4 @@ const mcu_pin_obj_t pin_PB08 = PIN(1, 8, NO_ADC);
const mcu_pin_obj_t pin_PB09 = PIN(1, 9, NO_ADC);
const mcu_pin_obj_t pin_PE00 = PIN(4, 0, NO_ADC);
-const mcu_pin_obj_t pin_PE01 = PIN(4, 1, NO_ADC); \ No newline at end of file
+const mcu_pin_obj_t pin_PE01 = PIN(4, 1, NO_ADC);
diff --git a/ports/stm/peripherals/stm32f4/stm32f405xx/gpio.c b/ports/stm/peripherals/stm32f4/stm32f405xx/gpio.c
index a5f4eae78..03fba6289 100644
--- a/ports/stm/peripherals/stm32f4/stm32f405xx/gpio.c
+++ b/ports/stm/peripherals/stm32f4/stm32f405xx/gpio.c
@@ -48,12 +48,10 @@ void stm32_peripherals_gpio_init(void) {
// never_reset_pin_number(1,4); //PB4 JTRST
// Port H is not included in GPIO port array
- // never_reset_pin_number(5,0); //PH0 JTDO
+ // never_reset_pin_number(5,0); //PH0 JTDO
// never_reset_pin_number(5,1); //PH1 JTRST
}
void stm32f4_peripherals_status_led(uint8_t led, uint8_t state) {
}
-
-
diff --git a/ports/stm/peripherals/stm32f4/stm32f405xx/periph.h b/ports/stm/peripherals/stm32f4/stm32f405xx/periph.h
index 98b4fab9c..df67a99d7 100644
--- a/ports/stm/peripherals/stm32f4/stm32f405xx/periph.h
+++ b/ports/stm/peripherals/stm32f4/stm32f405xx/periph.h
@@ -54,4 +54,4 @@ extern const mcu_periph_obj_t mcu_uart_rx_list[12];
TIM_TypeDef * mcu_tim_banks[TIM_BANK_ARRAY_LEN];
const mcu_tim_pin_obj_t mcu_tim_pin_list[TIM_PIN_ARRAY_LEN];
-#endif // MICROPY_INCLUDED_STM32_PERIPHERALS_STM32F405XX_PERIPH_H \ No newline at end of file
+#endif // MICROPY_INCLUDED_STM32_PERIPHERALS_STM32F405XX_PERIPH_H
diff --git a/ports/stm/peripherals/stm32f4/stm32f405xx/pins.c b/ports/stm/peripherals/stm32f4/stm32f405xx/pins.c
index 0f669f1c6..4282741a8 100644
--- a/ports/stm/peripherals/stm32f4/stm32f405xx/pins.c
+++ b/ports/stm/peripherals/stm32f4/stm32f405xx/pins.c
@@ -38,17 +38,17 @@ const mcu_pin_obj_t pin_PC13 = PIN(2, 13, NO_ADC); //anti-tamp
const mcu_pin_obj_t pin_PC14 = PIN(2, 14, NO_ADC); //OSC32_IN
const mcu_pin_obj_t pin_PC15 = PIN(2, 15, NO_ADC); //OSC32_OUT
-const mcu_pin_obj_t pin_PF00 = PIN(5, 0, NO_ADC); // 144 only
-const mcu_pin_obj_t pin_PF01 = PIN(5, 1, NO_ADC); // 144 only
-const mcu_pin_obj_t pin_PF02 = PIN(5, 2, NO_ADC); // 144 only
-const mcu_pin_obj_t pin_PF03 = PIN(5, 3, ADC_INPUT(ADC_3,9)); // 144 only
-const mcu_pin_obj_t pin_PF04 = PIN(5, 4, ADC_INPUT(ADC_3,14)); // 144 only
-const mcu_pin_obj_t pin_PF05 = PIN(5, 5, ADC_INPUT(ADC_3,15)); // 144 only
-const mcu_pin_obj_t pin_PF06 = PIN(5, 6, ADC_INPUT(ADC_3,4)); // 144 only
-const mcu_pin_obj_t pin_PF07 = PIN(5, 7, ADC_INPUT(ADC_3,5)); // 144 only
-const mcu_pin_obj_t pin_PF08 = PIN(5, 8, ADC_INPUT(ADC_3,6)); // 144 only
-const mcu_pin_obj_t pin_PF09 = PIN(5, 9, ADC_INPUT(ADC_3,7)); // 144 only
-const mcu_pin_obj_t pin_PF10 = PIN(5, 10, ADC_INPUT(ADC_3,8)); // 144 only
+const mcu_pin_obj_t pin_PF00 = PIN(5, 0, NO_ADC); // 144 only
+const mcu_pin_obj_t pin_PF01 = PIN(5, 1, NO_ADC); // 144 only
+const mcu_pin_obj_t pin_PF02 = PIN(5, 2, NO_ADC); // 144 only
+const mcu_pin_obj_t pin_PF03 = PIN(5, 3, ADC_INPUT(ADC_3,9)); // 144 only
+const mcu_pin_obj_t pin_PF04 = PIN(5, 4, ADC_INPUT(ADC_3,14)); // 144 only
+const mcu_pin_obj_t pin_PF05 = PIN(5, 5, ADC_INPUT(ADC_3,15)); // 144 only
+const mcu_pin_obj_t pin_PF06 = PIN(5, 6, ADC_INPUT(ADC_3,4)); // 144 only
+const mcu_pin_obj_t pin_PF07 = PIN(5, 7, ADC_INPUT(ADC_3,5)); // 144 only
+const mcu_pin_obj_t pin_PF08 = PIN(5, 8, ADC_INPUT(ADC_3,6)); // 144 only
+const mcu_pin_obj_t pin_PF09 = PIN(5, 9, ADC_INPUT(ADC_3,7)); // 144 only
+const mcu_pin_obj_t pin_PF10 = PIN(5, 10, ADC_INPUT(ADC_3,8)); // 144 only
const mcu_pin_obj_t pin_PC00 = PIN(2, 0, ADC_INPUT(ADC_123,10));
const mcu_pin_obj_t pin_PC01 = PIN(2, 1, ADC_INPUT(ADC_123,11));
@@ -71,14 +71,14 @@ const mcu_pin_obj_t pin_PB00 = PIN(1, 0, ADC_INPUT(ADC_12,8));
const mcu_pin_obj_t pin_PB01 = PIN(1, 1, ADC_INPUT(ADC_12,9));
const mcu_pin_obj_t pin_PB02 = PIN(1, 2, NO_ADC); //BOOT1
-const mcu_pin_obj_t pin_PF11 = PIN(5, 11, NO_ADC); // 144 only
-const mcu_pin_obj_t pin_PF12 = PIN(5, 12, NO_ADC); // 144 only
-const mcu_pin_obj_t pin_PF13 = PIN(5, 13, NO_ADC); // 144 only
-const mcu_pin_obj_t pin_PF14 = PIN(5, 14, NO_ADC); // 144 only
-const mcu_pin_obj_t pin_PF15 = PIN(5, 15, NO_ADC); // 144 only
+const mcu_pin_obj_t pin_PF11 = PIN(5, 11, NO_ADC); // 144 only
+const mcu_pin_obj_t pin_PF12 = PIN(5, 12, NO_ADC); // 144 only
+const mcu_pin_obj_t pin_PF13 = PIN(5, 13, NO_ADC); // 144 only
+const mcu_pin_obj_t pin_PF14 = PIN(5, 14, NO_ADC); // 144 only
+const mcu_pin_obj_t pin_PF15 = PIN(5, 15, NO_ADC); // 144 only
-const mcu_pin_obj_t pin_PG00 = PIN(6, 0, NO_ADC); // 144 only
-const mcu_pin_obj_t pin_PG01 = PIN(6, 1, NO_ADC); // 144 only
+const mcu_pin_obj_t pin_PG00 = PIN(6, 0, NO_ADC); // 144 only
+const mcu_pin_obj_t pin_PG01 = PIN(6, 1, NO_ADC); // 144 only
const mcu_pin_obj_t pin_PE07 = PIN(4, 7, NO_ADC);
const mcu_pin_obj_t pin_PE08 = PIN(4, 8, NO_ADC);
@@ -91,7 +91,7 @@ const mcu_pin_obj_t pin_PE14 = PIN(4, 14, NO_ADC);
const mcu_pin_obj_t pin_PE15 = PIN(4, 15, NO_ADC);
const mcu_pin_obj_t pin_PB10 = PIN(1, 10, NO_ADC);
-const mcu_pin_obj_t pin_PB11 = PIN(1, 11, NO_ADC);
+const mcu_pin_obj_t pin_PB11 = PIN(1, 11, NO_ADC);
const mcu_pin_obj_t pin_PB12 = PIN(1, 12, NO_ADC);
const mcu_pin_obj_t pin_PB13 = PIN(1, 13, NO_ADC);
const mcu_pin_obj_t pin_PB14 = PIN(1, 14, NO_ADC);
diff --git a/ports/stm/peripherals/stm32f4/stm32f405xx/pins.h b/ports/stm/peripherals/stm32f4/stm32f405xx/pins.h
index b3e5e3344..e722b6e5a 100644
--- a/ports/stm/peripherals/stm32f4/stm32f405xx/pins.h
+++ b/ports/stm/peripherals/stm32f4/stm32f405xx/pins.h
@@ -38,17 +38,17 @@ extern const mcu_pin_obj_t pin_PC13;
extern const mcu_pin_obj_t pin_PC14;
//pg 51
extern const mcu_pin_obj_t pin_PC15;
-extern const mcu_pin_obj_t pin_PF00; // 144 only
-extern const mcu_pin_obj_t pin_PF01; // 144 only
-extern const mcu_pin_obj_t pin_PF02; // 144 only
-extern const mcu_pin_obj_t pin_PF03; // 144 only
-extern const mcu_pin_obj_t pin_PF04; // 144 only
-extern const mcu_pin_obj_t pin_PF05; // 144 only
-extern const mcu_pin_obj_t pin_PF06; // 144 only
-extern const mcu_pin_obj_t pin_PF07; // 144 only
-extern const mcu_pin_obj_t pin_PF08; // 144 only
-extern const mcu_pin_obj_t pin_PF09; // 144 only
-extern const mcu_pin_obj_t pin_PF10; // 144 only
+extern const mcu_pin_obj_t pin_PF00; // 144 only
+extern const mcu_pin_obj_t pin_PF01; // 144 only
+extern const mcu_pin_obj_t pin_PF02; // 144 only
+extern const mcu_pin_obj_t pin_PF03; // 144 only
+extern const mcu_pin_obj_t pin_PF04; // 144 only
+extern const mcu_pin_obj_t pin_PF05; // 144 only
+extern const mcu_pin_obj_t pin_PF06; // 144 only
+extern const mcu_pin_obj_t pin_PF07; // 144 only
+extern const mcu_pin_obj_t pin_PF08; // 144 only
+extern const mcu_pin_obj_t pin_PF09; // 144 only
+extern const mcu_pin_obj_t pin_PF10; // 144 only
//pg 52
extern const mcu_pin_obj_t pin_PC00;
extern const mcu_pin_obj_t pin_PC01;
@@ -69,13 +69,13 @@ extern const mcu_pin_obj_t pin_PC05;
extern const mcu_pin_obj_t pin_PB00;
extern const mcu_pin_obj_t pin_PB01;
extern const mcu_pin_obj_t pin_PB02;
-extern const mcu_pin_obj_t pin_PF11; // 144 only
-extern const mcu_pin_obj_t pin_PF12; // 144 only
-extern const mcu_pin_obj_t pin_PF13; // 144 only
-extern const mcu_pin_obj_t pin_PF14; // 144 only
-extern const mcu_pin_obj_t pin_PF15; // 144 only
-extern const mcu_pin_obj_t pin_PG00; // 144 only
-extern const mcu_pin_obj_t pin_PG01; // 144 only
+extern const mcu_pin_obj_t pin_PF11; // 144 only
+extern const mcu_pin_obj_t pin_PF12; // 144 only
+extern const mcu_pin_obj_t pin_PF13; // 144 only
+extern const mcu_pin_obj_t pin_PF14; // 144 only
+extern const mcu_pin_obj_t pin_PF15; // 144 only
+extern const mcu_pin_obj_t pin_PG00; // 144 only
+extern const mcu_pin_obj_t pin_PG01; // 144 only
//pg 55
extern const mcu_pin_obj_t pin_PE07;
extern const mcu_pin_obj_t pin_PE08;
diff --git a/ports/stm/peripherals/stm32f4/stm32f407xx/gpio.c b/ports/stm/peripherals/stm32f4/stm32f407xx/gpio.c
index a5f4eae78..03fba6289 100644
--- a/ports/stm/peripherals/stm32f4/stm32f407xx/gpio.c
+++ b/ports/stm/peripherals/stm32f4/stm32f407xx/gpio.c
@@ -48,12 +48,10 @@ void stm32_peripherals_gpio_init(void) {
// never_reset_pin_number(1,4); //PB4 JTRST
// Port H is not included in GPIO port array
- // never_reset_pin_number(5,0); //PH0 JTDO
+ // never_reset_pin_number(5,0); //PH0 JTDO
// never_reset_pin_number(5,1); //PH1 JTRST
}
void stm32f4_peripherals_status_led(uint8_t led, uint8_t state) {
}
-
-
diff --git a/ports/stm/peripherals/stm32f4/stm32f407xx/periph.h b/ports/stm/peripherals/stm32f4/stm32f407xx/periph.h
index 15cbfb16d..55c00ee93 100644
--- a/ports/stm/peripherals/stm32f4/stm32f407xx/periph.h
+++ b/ports/stm/peripherals/stm32f4/stm32f407xx/periph.h
@@ -54,4 +54,4 @@ extern const mcu_periph_obj_t mcu_uart_rx_list[12];
TIM_TypeDef * mcu_tim_banks[TIM_BANK_ARRAY_LEN];
const mcu_tim_pin_obj_t mcu_tim_pin_list[TIM_PIN_ARRAY_LEN];
-#endif // MICROPY_INCLUDED_STM32_PERIPHERALS_STM32F407XX_PERIPH_H \ No newline at end of file
+#endif // MICROPY_INCLUDED_STM32_PERIPHERALS_STM32F407XX_PERIPH_H
diff --git a/ports/stm/peripherals/stm32f4/stm32f407xx/pins.c b/ports/stm/peripherals/stm32f4/stm32f407xx/pins.c
index 0f669f1c6..4282741a8 100644
--- a/ports/stm/peripherals/stm32f4/stm32f407xx/pins.c
+++ b/ports/stm/peripherals/stm32f4/stm32f407xx/pins.c
@@ -38,17 +38,17 @@ const mcu_pin_obj_t pin_PC13 = PIN(2, 13, NO_ADC); //anti-tamp
const mcu_pin_obj_t pin_PC14 = PIN(2, 14, NO_ADC); //OSC32_IN
const mcu_pin_obj_t pin_PC15 = PIN(2, 15, NO_ADC); //OSC32_OUT
-const mcu_pin_obj_t pin_PF00 = PIN(5, 0, NO_ADC); // 144 only
-const mcu_pin_obj_t pin_PF01 = PIN(5, 1, NO_ADC); // 144 only
-const mcu_pin_obj_t pin_PF02 = PIN(5, 2, NO_ADC); // 144 only
-const mcu_pin_obj_t pin_PF03 = PIN(5, 3, ADC_INPUT(ADC_3,9)); // 144 only
-const mcu_pin_obj_t pin_PF04 = PIN(5, 4, ADC_INPUT(ADC_3,14)); // 144 only
-const mcu_pin_obj_t pin_PF05 = PIN(5, 5, ADC_INPUT(ADC_3,15)); // 144 only
-const mcu_pin_obj_t pin_PF06 = PIN(5, 6, ADC_INPUT(ADC_3,4)); // 144 only
-const mcu_pin_obj_t pin_PF07 = PIN(5, 7, ADC_INPUT(ADC_3,5)); // 144 only
-const mcu_pin_obj_t pin_PF08 = PIN(5, 8, ADC_INPUT(ADC_3,6)); // 144 only
-const mcu_pin_obj_t pin_PF09 = PIN(5, 9, ADC_INPUT(ADC_3,7)); // 144 only
-const mcu_pin_obj_t pin_PF10 = PIN(5, 10, ADC_INPUT(ADC_3,8)); // 144 only
+const mcu_pin_obj_t pin_PF00 = PIN(5, 0, NO_ADC); // 144 only
+const mcu_pin_obj_t pin_PF01 = PIN(5, 1, NO_ADC); // 144 only
+const mcu_pin_obj_t pin_PF02 = PIN(5, 2, NO_ADC); // 144 only
+const mcu_pin_obj_t pin_PF03 = PIN(5, 3, ADC_INPUT(ADC_3,9)); // 144 only
+const mcu_pin_obj_t pin_PF04 = PIN(5, 4, ADC_INPUT(ADC_3,14)); // 144 only
+const mcu_pin_obj_t pin_PF05 = PIN(5, 5, ADC_INPUT(ADC_3,15)); // 144 only
+const mcu_pin_obj_t pin_PF06 = PIN(5, 6, ADC_INPUT(ADC_3,4)); // 144 only
+const mcu_pin_obj_t pin_PF07 = PIN(5, 7, ADC_INPUT(ADC_3,5)); // 144 only
+const mcu_pin_obj_t pin_PF08 = PIN(5, 8, ADC_INPUT(ADC_3,6)); // 144 only
+const mcu_pin_obj_t pin_PF09 = PIN(5, 9, ADC_INPUT(ADC_3,7)); // 144 only
+const mcu_pin_obj_t pin_PF10 = PIN(5, 10, ADC_INPUT(ADC_3,8)); // 144 only
const mcu_pin_obj_t pin_PC00 = PIN(2, 0, ADC_INPUT(ADC_123,10));
const mcu_pin_obj_t pin_PC01 = PIN(2, 1, ADC_INPUT(ADC_123,11));
@@ -71,14 +71,14 @@ const mcu_pin_obj_t pin_PB00 = PIN(1, 0, ADC_INPUT(ADC_12,8));
const mcu_pin_obj_t pin_PB01 = PIN(1, 1, ADC_INPUT(ADC_12,9));
const mcu_pin_obj_t pin_PB02 = PIN(1, 2, NO_ADC); //BOOT1
-const mcu_pin_obj_t pin_PF11 = PIN(5, 11, NO_ADC); // 144 only
-const mcu_pin_obj_t pin_PF12 = PIN(5, 12, NO_ADC); // 144 only
-const mcu_pin_obj_t pin_PF13 = PIN(5, 13, NO_ADC); // 144 only
-const mcu_pin_obj_t pin_PF14 = PIN(5, 14, NO_ADC); // 144 only
-const mcu_pin_obj_t pin_PF15 = PIN(5, 15, NO_ADC); // 144 only
+const mcu_pin_obj_t pin_PF11 = PIN(5, 11, NO_ADC); // 144 only
+const mcu_pin_obj_t pin_PF12 = PIN(5, 12, NO_ADC); // 144 only
+const mcu_pin_obj_t pin_PF13 = PIN(5, 13, NO_ADC); // 144 only
+const mcu_pin_obj_t pin_PF14 = PIN(5, 14, NO_ADC); // 144 only
+const mcu_pin_obj_t pin_PF15 = PIN(5, 15, NO_ADC); // 144 only
-const mcu_pin_obj_t pin_PG00 = PIN(6, 0, NO_ADC); // 144 only
-const mcu_pin_obj_t pin_PG01 = PIN(6, 1, NO_ADC); // 144 only
+const mcu_pin_obj_t pin_PG00 = PIN(6, 0, NO_ADC); // 144 only
+const mcu_pin_obj_t pin_PG01 = PIN(6, 1, NO_ADC); // 144 only
const mcu_pin_obj_t pin_PE07 = PIN(4, 7, NO_ADC);
const mcu_pin_obj_t pin_PE08 = PIN(4, 8, NO_ADC);
@@ -91,7 +91,7 @@ const mcu_pin_obj_t pin_PE14 = PIN(4, 14, NO_ADC);
const mcu_pin_obj_t pin_PE15 = PIN(4, 15, NO_ADC);
const mcu_pin_obj_t pin_PB10 = PIN(1, 10, NO_ADC);
-const mcu_pin_obj_t pin_PB11 = PIN(1, 11, NO_ADC);
+const mcu_pin_obj_t pin_PB11 = PIN(1, 11, NO_ADC);
const mcu_pin_obj_t pin_PB12 = PIN(1, 12, NO_ADC);
const mcu_pin_obj_t pin_PB13 = PIN(1, 13, NO_ADC);
const mcu_pin_obj_t pin_PB14 = PIN(1, 14, NO_ADC);
diff --git a/ports/stm/peripherals/stm32f4/stm32f407xx/pins.h b/ports/stm/peripherals/stm32f4/stm32f407xx/pins.h
index 109dcb922..a247fe631 100644
--- a/ports/stm/peripherals/stm32f4/stm32f407xx/pins.h
+++ b/ports/stm/peripherals/stm32f4/stm32f407xx/pins.h
@@ -38,17 +38,17 @@ extern const mcu_pin_obj_t pin_PC13;
extern const mcu_pin_obj_t pin_PC14;
//pg 51
extern const mcu_pin_obj_t pin_PC15;
-extern const mcu_pin_obj_t pin_PF00; // 144 only
-extern const mcu_pin_obj_t pin_PF01; // 144 only
-extern const mcu_pin_obj_t pin_PF02; // 144 only
-extern const mcu_pin_obj_t pin_PF03; // 144 only
-extern const mcu_pin_obj_t pin_PF04; // 144 only
-extern const mcu_pin_obj_t pin_PF05; // 144 only
-extern const mcu_pin_obj_t pin_PF06; // 144 only
-extern const mcu_pin_obj_t pin_PF07; // 144 only
-extern const mcu_pin_obj_t pin_PF08; // 144 only
-extern const mcu_pin_obj_t pin_PF09; // 144 only
-extern const mcu_pin_obj_t pin_PF10; // 144 only
+extern const mcu_pin_obj_t pin_PF00; // 144 only
+extern const mcu_pin_obj_t pin_PF01; // 144 only
+extern const mcu_pin_obj_t pin_PF02; // 144 only
+extern const mcu_pin_obj_t pin_PF03; // 144 only
+extern const mcu_pin_obj_t pin_PF04; // 144 only
+extern const mcu_pin_obj_t pin_PF05; // 144 only
+extern const mcu_pin_obj_t pin_PF06; // 144 only
+extern const mcu_pin_obj_t pin_PF07; // 144 only
+extern const mcu_pin_obj_t pin_PF08; // 144 only
+extern const mcu_pin_obj_t pin_PF09; // 144 only
+extern const mcu_pin_obj_t pin_PF10; // 144 only
//pg 52
extern const mcu_pin_obj_t pin_PC00;
extern const mcu_pin_obj_t pin_PC01;
@@ -69,13 +69,13 @@ extern const mcu_pin_obj_t pin_PC05;
extern const mcu_pin_obj_t pin_PB00;
extern const mcu_pin_obj_t pin_PB01;
extern const mcu_pin_obj_t pin_PB02;
-extern const mcu_pin_obj_t pin_PF11; // 144 only
-extern const mcu_pin_obj_t pin_PF12; // 144 only
-extern const mcu_pin_obj_t pin_PF13; // 144 only
-extern const mcu_pin_obj_t pin_PF14; // 144 only
-extern const mcu_pin_obj_t pin_PF15; // 144 only
-extern const mcu_pin_obj_t pin_PG00; // 144 only
-extern const mcu_pin_obj_t pin_PG01; // 144 only
+extern const mcu_pin_obj_t pin_PF11; // 144 only
+extern const mcu_pin_obj_t pin_PF12; // 144 only
+extern const mcu_pin_obj_t pin_PF13; // 144 only
+extern const mcu_pin_obj_t pin_PF14; // 144 only
+extern const mcu_pin_obj_t pin_PF15; // 144 only
+extern const mcu_pin_obj_t pin_PG00; // 144 only
+extern const mcu_pin_obj_t pin_PG01; // 144 only
//pg 55
extern const mcu_pin_obj_t pin_PE07;
extern const mcu_pin_obj_t pin_PE08;
diff --git a/ports/stm/peripherals/stm32f4/stm32f411xe/gpio.c b/ports/stm/peripherals/stm32f4/stm32f411xe/gpio.c
index 9aabffa9f..08c6b55cd 100644
--- a/ports/stm/peripherals/stm32f4/stm32f411xe/gpio.c
+++ b/ports/stm/peripherals/stm32f4/stm32f411xe/gpio.c
@@ -56,5 +56,3 @@ void stm32_peripherals_gpio_init(void) {
//LEDs are inverted on F411 DISCO
void stm32f4_peripherals_status_led(uint8_t led, uint8_t state) {
}
-
-
diff --git a/ports/stm/peripherals/stm32f4/stm32f411xe/periph.h b/ports/stm/peripherals/stm32f4/stm32f411xe/periph.h
index 2c5e5dd56..14a73d12f 100644
--- a/ports/stm/peripherals/stm32f4/stm32f411xe/periph.h
+++ b/ports/stm/peripherals/stm32f4/stm32f411xe/periph.h
@@ -54,4 +54,4 @@ extern const mcu_periph_obj_t mcu_uart_rx_list[7];
TIM_TypeDef * mcu_tim_banks[TIM_BANK_ARRAY_LEN];
const mcu_tim_pin_obj_t mcu_tim_pin_list[TIM_PIN_ARRAY_LEN];
-#endif // MICROPY_INCLUDED_STM32_PERIPHERALS_STM32F411XE_PERIPH_H \ No newline at end of file
+#endif // MICROPY_INCLUDED_STM32_PERIPHERALS_STM32F411XE_PERIPH_H
diff --git a/ports/stm/peripherals/stm32f4/stm32f411xe/pins.c b/ports/stm/peripherals/stm32f4/stm32f411xe/pins.c
index eea2a1a1b..ed89f0de6 100644
--- a/ports/stm/peripherals/stm32f4/stm32f411xe/pins.c
+++ b/ports/stm/peripherals/stm32f4/stm32f411xe/pins.c
@@ -120,4 +120,4 @@ const mcu_pin_obj_t pin_PB08 = PIN(1, 8, NO_ADC);
const mcu_pin_obj_t pin_PB09 = PIN(1, 9, NO_ADC);
const mcu_pin_obj_t pin_PE00 = PIN(4, 0, NO_ADC);
-const mcu_pin_obj_t pin_PE01 = PIN(4, 1, NO_ADC); \ No newline at end of file
+const mcu_pin_obj_t pin_PE01 = PIN(4, 1, NO_ADC);
diff --git a/ports/stm/peripherals/stm32f4/stm32f412zx/gpio.c b/ports/stm/peripherals/stm32f4/stm32f412zx/gpio.c
index 3ec1b5b79..5ca4667a4 100644
--- a/ports/stm/peripherals/stm32f4/stm32f412zx/gpio.c
+++ b/ports/stm/peripherals/stm32f4/stm32f412zx/gpio.c
@@ -49,6 +49,6 @@ void stm32_peripherals_gpio_init(void) {
//never_reset_pin_number(1,4); //PB4 JTRST
// Port H is not included in GPIO port array
- // never_reset_pin_number(5,0); //PH0 JTDO
+ // never_reset_pin_number(5,0); //PH0 JTDO
// never_reset_pin_number(5,1); //PH1 JTRST
}
diff --git a/ports/stm/peripherals/stm32f4/stm32f412zx/periph.h b/ports/stm/peripherals/stm32f4/stm32f412zx/periph.h
index f668ace75..f6b001a4e 100644
--- a/ports/stm/peripherals/stm32f4/stm32f412zx/periph.h
+++ b/ports/stm/peripherals/stm32f4/stm32f412zx/periph.h
@@ -55,4 +55,4 @@ extern const mcu_periph_obj_t mcu_uart_rx_list[12];
TIM_TypeDef * mcu_tim_banks[TIM_BANK_ARRAY_LEN];
const mcu_tim_pin_obj_t mcu_tim_pin_list[TIM_PIN_ARRAY_LEN];
-#endif // MICROPY_INCLUDED_STM32_PERIPHERALS_STM32F412ZX_PERIPH_H \ No newline at end of file
+#endif // MICROPY_INCLUDED_STM32_PERIPHERALS_STM32F412ZX_PERIPH_H
diff --git a/ports/stm/peripherals/stm32f4/stm32f412zx/pins.c b/ports/stm/peripherals/stm32f4/stm32f412zx/pins.c
index ef3ce6d0e..c1b624f4d 100644
--- a/ports/stm/peripherals/stm32f4/stm32f412zx/pins.c
+++ b/ports/stm/peripherals/stm32f4/stm32f412zx/pins.c
@@ -38,17 +38,17 @@ const mcu_pin_obj_t pin_PC13 = PIN(2, 13, NO_ADC); //anti-tamp
const mcu_pin_obj_t pin_PC14 = PIN(2, 14, NO_ADC); //OSC32_IN
const mcu_pin_obj_t pin_PC15 = PIN(2, 15, NO_ADC); //OSC32_OUT
-const mcu_pin_obj_t pin_PF00 = PIN(5, 0, NO_ADC); // 144 only
-const mcu_pin_obj_t pin_PF01 = PIN(5, 1, NO_ADC); // 144 only
-const mcu_pin_obj_t pin_PF02 = PIN(5, 2, NO_ADC); // 144 only
-const mcu_pin_obj_t pin_PF03 = PIN(5, 3, NO_ADC); // 144 only
-const mcu_pin_obj_t pin_PF04 = PIN(5, 4, NO_ADC); // 144 only
-const mcu_pin_obj_t pin_PF05 = PIN(5, 5, NO_ADC); // 144 only
-const mcu_pin_obj_t pin_PF06 = PIN(5, 6, NO_ADC); // 144 only
-const mcu_pin_obj_t pin_PF07 = PIN(5, 7, NO_ADC); // 144 only
-const mcu_pin_obj_t pin_PF08 = PIN(5, 8, NO_ADC); // 144 only
-const mcu_pin_obj_t pin_PF09 = PIN(5, 9, NO_ADC); // 144 only
-const mcu_pin_obj_t pin_PF10 = PIN(5, 10, NO_ADC); // 144 only
+const mcu_pin_obj_t pin_PF00 = PIN(5, 0, NO_ADC); // 144 only
+const mcu_pin_obj_t pin_PF01 = PIN(5, 1, NO_ADC); // 144 only
+const mcu_pin_obj_t pin_PF02 = PIN(5, 2, NO_ADC); // 144 only
+const mcu_pin_obj_t pin_PF03 = PIN(5, 3, NO_ADC); // 144 only
+const mcu_pin_obj_t pin_PF04 = PIN(5, 4, NO_ADC); // 144 only
+const mcu_pin_obj_t pin_PF05 = PIN(5, 5, NO_ADC); // 144 only
+const mcu_pin_obj_t pin_PF06 = PIN(5, 6, NO_ADC); // 144 only
+const mcu_pin_obj_t pin_PF07 = PIN(5, 7, NO_ADC); // 144 only
+const mcu_pin_obj_t pin_PF08 = PIN(5, 8, NO_ADC); // 144 only
+const mcu_pin_obj_t pin_PF09 = PIN(5, 9, NO_ADC); // 144 only
+const mcu_pin_obj_t pin_PF10 = PIN(5, 10, NO_ADC); // 144 only
const mcu_pin_obj_t pin_PC00 = PIN(2, 0, ADC_INPUT(ADC_1,10));
const mcu_pin_obj_t pin_PC01 = PIN(2, 1, ADC_INPUT(ADC_1,11));
@@ -71,14 +71,14 @@ const mcu_pin_obj_t pin_PB00 = PIN(1, 0, ADC_INPUT(ADC_1,8));
const mcu_pin_obj_t pin_PB01 = PIN(1, 1, ADC_INPUT(ADC_1,9));
const mcu_pin_obj_t pin_PB02 = PIN(1, 2, NO_ADC);
-const mcu_pin_obj_t pin_PF11 = PIN(5, 11, NO_ADC); // 144 only
-const mcu_pin_obj_t pin_PF12 = PIN(5, 12, NO_ADC); // 144 only
-const mcu_pin_obj_t pin_PF13 = PIN(5, 13, NO_ADC); // 144 only
-const mcu_pin_obj_t pin_PF14 = PIN(5, 14, NO_ADC); // 144 only
-const mcu_pin_obj_t pin_PF15 = PIN(5, 15, NO_ADC); // 144 only
+const mcu_pin_obj_t pin_PF11 = PIN(5, 11, NO_ADC); // 144 only
+const mcu_pin_obj_t pin_PF12 = PIN(5, 12, NO_ADC); // 144 only
+const mcu_pin_obj_t pin_PF13 = PIN(5, 13, NO_ADC); // 144 only
+const mcu_pin_obj_t pin_PF14 = PIN(5, 14, NO_ADC); // 144 only
+const mcu_pin_obj_t pin_PF15 = PIN(5, 15, NO_ADC); // 144 only
-const mcu_pin_obj_t pin_PG00 = PIN(6, 0, NO_ADC); // 144 only
-const mcu_pin_obj_t pin_PG01 = PIN(6, 1, NO_ADC); // 144 only
+const mcu_pin_obj_t pin_PG00 = PIN(6, 0, NO_ADC); // 144 only
+const mcu_pin_obj_t pin_PG01 = PIN(6, 1, NO_ADC); // 144 only
const mcu_pin_obj_t pin_PE07 = PIN(4, 7, NO_ADC);
const mcu_pin_obj_t pin_PE08 = PIN(4, 8, NO_ADC);
diff --git a/ports/stm/peripherals/stm32f4/stm32f412zx/pins.h b/ports/stm/peripherals/stm32f4/stm32f412zx/pins.h
index 5cf99345c..8914530d2 100644
--- a/ports/stm/peripherals/stm32f4/stm32f412zx/pins.h
+++ b/ports/stm/peripherals/stm32f4/stm32f412zx/pins.h
@@ -37,17 +37,17 @@ extern const mcu_pin_obj_t pin_PC13;
extern const mcu_pin_obj_t pin_PC14;
//pg 51
extern const mcu_pin_obj_t pin_PC15;
-extern const mcu_pin_obj_t pin_PF00; // 144 only
-extern const mcu_pin_obj_t pin_PF01; // 144 only
-extern const mcu_pin_obj_t pin_PF02; // 144 only
-extern const mcu_pin_obj_t pin_PF03; // 144 only
-extern const mcu_pin_obj_t pin_PF04; // 144 only
-extern const mcu_pin_obj_t pin_PF05; // 144 only
-extern const mcu_pin_obj_t pin_PF06; // 144 only
-extern const mcu_pin_obj_t pin_PF07; // 144 only
-extern const mcu_pin_obj_t pin_PF08; // 144 only
-extern const mcu_pin_obj_t pin_PF09; // 144 only
-extern const mcu_pin_obj_t pin_PF10; // 144 only
+extern const mcu_pin_obj_t pin_PF00; // 144 only
+extern const mcu_pin_obj_t pin_PF01; // 144 only
+extern const mcu_pin_obj_t pin_PF02; // 144 only
+extern const mcu_pin_obj_t pin_PF03; // 144 only
+extern const mcu_pin_obj_t pin_PF04; // 144 only
+extern const mcu_pin_obj_t pin_PF05; // 144 only
+extern const mcu_pin_obj_t pin_PF06; // 144 only
+extern const mcu_pin_obj_t pin_PF07; // 144 only
+extern const mcu_pin_obj_t pin_PF08; // 144 only
+extern const mcu_pin_obj_t pin_PF09; // 144 only
+extern const mcu_pin_obj_t pin_PF10; // 144 only
//pg 52
extern const mcu_pin_obj_t pin_PC00;
extern const mcu_pin_obj_t pin_PC01;
@@ -68,13 +68,13 @@ extern const mcu_pin_obj_t pin_PC05;
extern const mcu_pin_obj_t pin_PB00;
extern const mcu_pin_obj_t pin_PB01;
extern const mcu_pin_obj_t pin_PB02;
-extern const mcu_pin_obj_t pin_PF11; // 144 only
-extern const mcu_pin_obj_t pin_PF12; // 144 only
-extern const mcu_pin_obj_t pin_PF13; // 144 only
-extern const mcu_pin_obj_t pin_PF14; // 144 only
-extern const mcu_pin_obj_t pin_PF15; // 144 only
-extern const mcu_pin_obj_t pin_PG00; // 144 only
-extern const mcu_pin_obj_t pin_PG01; // 144 only
+extern const mcu_pin_obj_t pin_PF11; // 144 only
+extern const mcu_pin_obj_t pin_PF12; // 144 only
+extern const mcu_pin_obj_t pin_PF13; // 144 only
+extern const mcu_pin_obj_t pin_PF14; // 144 only
+extern const mcu_pin_obj_t pin_PF15; // 144 only
+extern const mcu_pin_obj_t pin_PG00; // 144 only
+extern const mcu_pin_obj_t pin_PG01; // 144 only
//pg 55
extern const mcu_pin_obj_t pin_PE07;
extern const mcu_pin_obj_t pin_PE08;
diff --git a/ports/stm/peripherals/stm32f7/stm32f746xx/gpio.c b/ports/stm/peripherals/stm32f7/stm32f746xx/gpio.c
index cee4b4f45..ca64428eb 100644
--- a/ports/stm/peripherals/stm32f7/stm32f746xx/gpio.c
+++ b/ports/stm/peripherals/stm32f7/stm32f746xx/gpio.c
@@ -50,4 +50,3 @@ void stm32_peripherals_gpio_init(void) {
never_reset_pin_number(7,0); //PH0 OSC_IN
never_reset_pin_number(7,1); //PH1 OSC_OUT
}
-
diff --git a/ports/stm/peripherals/stm32f7/stm32f746xx/pins.c b/ports/stm/peripherals/stm32f7/stm32f746xx/pins.c
index 895ad5ec0..ae940c1a0 100644
--- a/ports/stm/peripherals/stm32f7/stm32f746xx/pins.c
+++ b/ports/stm/peripherals/stm32f7/stm32f746xx/pins.c
@@ -28,7 +28,7 @@
#include "py/mphal.h"
#include "peripherals/pins.h"
-// Todo: some pins do have ADCs, but the module isn't set up yet.
+// Todo: some pins do have ADCs, but the module isn't set up yet.
const mcu_pin_obj_t pin_PA00 = PIN(0, 0, NO_ADC);
const mcu_pin_obj_t pin_PA01 = PIN(0, 1, NO_ADC);
diff --git a/ports/stm/peripherals/stm32f7/stm32f767xx/gpio.c b/ports/stm/peripherals/stm32f7/stm32f767xx/gpio.c
index d51ff53c1..1189948c7 100644
--- a/ports/stm/peripherals/stm32f7/stm32f767xx/gpio.c
+++ b/ports/stm/peripherals/stm32f7/stm32f767xx/gpio.c
@@ -44,5 +44,3 @@ void stm32_peripherals_gpio_init(void) {
never_reset_pin_number(0,13); //PA13 SWDIO
never_reset_pin_number(0,14); //PA14 SWCLK
}
-
-
diff --git a/ports/stm/peripherals/stm32f7/stm32f767xx/periph.h b/ports/stm/peripherals/stm32f7/stm32f767xx/periph.h
index 98aa5782a..438964c3e 100644
--- a/ports/stm/peripherals/stm32f7/stm32f767xx/periph.h
+++ b/ports/stm/peripherals/stm32f7/stm32f767xx/periph.h
@@ -54,4 +54,4 @@ TIM_TypeDef * mcu_tim_banks[TIM_BANK_ARRAY_LEN];
const mcu_tim_pin_obj_t mcu_tim_pin_list[TIM_PIN_ARRAY_LEN];
-#endif // MICROPY_INCLUDED_STM32_PERIPHERALS_STM32F767XX_PERIPH_H \ No newline at end of file
+#endif // MICROPY_INCLUDED_STM32_PERIPHERALS_STM32F767XX_PERIPH_H
diff --git a/ports/stm/peripherals/stm32f7/stm32f767xx/pins.c b/ports/stm/peripherals/stm32f7/stm32f767xx/pins.c
index 870545f99..5c9daea98 100644
--- a/ports/stm/peripherals/stm32f7/stm32f767xx/pins.c
+++ b/ports/stm/peripherals/stm32f7/stm32f767xx/pins.c
@@ -28,7 +28,7 @@
#include "py/mphal.h"
#include "peripherals/pins.h"
-// Todo: some pins do have ADCs, but the module isn't set up yet.
+// Todo: some pins do have ADCs, but the module isn't set up yet.
const mcu_pin_obj_t pin_PA00 = PIN(0, 0, NO_ADC);
const mcu_pin_obj_t pin_PA01 = PIN(0, 1, NO_ADC);
diff --git a/ports/stm/peripherals/stm32h7/stm32h743xx/gpio.c b/ports/stm/peripherals/stm32h7/stm32h743xx/gpio.c
index d51ff53c1..1189948c7 100644
--- a/ports/stm/peripherals/stm32h7/stm32h743xx/gpio.c
+++ b/ports/stm/peripherals/stm32h7/stm32h743xx/gpio.c
@@ -44,5 +44,3 @@ void stm32_peripherals_gpio_init(void) {
never_reset_pin_number(0,13); //PA13 SWDIO
never_reset_pin_number(0,14); //PA14 SWCLK
}
-
-
diff --git a/ports/stm/peripherals/stm32h7/stm32h743xx/periph.h b/ports/stm/peripherals/stm32h7/stm32h743xx/periph.h
index 4b852413b..9aa2f7366 100644
--- a/ports/stm/peripherals/stm32h7/stm32h743xx/periph.h
+++ b/ports/stm/peripherals/stm32h7/stm32h743xx/periph.h
@@ -52,4 +52,4 @@ const mcu_periph_obj_t mcu_uart_rx_list[26];
#define TIM_PIN_ARRAY_LEN 58
TIM_TypeDef * mcu_tim_banks[TIM_BANK_ARRAY_LEN];
-#endif // MICROPY_INCLUDED_STM32_PERIPHERALS_STM32H743XX_PERIPH_H \ No newline at end of file
+#endif // MICROPY_INCLUDED_STM32_PERIPHERALS_STM32H743XX_PERIPH_H
diff --git a/ports/stm/peripherals/stm32h7/stm32h743xx/pins.c b/ports/stm/peripherals/stm32h7/stm32h743xx/pins.c
index 491fe6938..7484781c2 100644
--- a/ports/stm/peripherals/stm32h7/stm32h743xx/pins.c
+++ b/ports/stm/peripherals/stm32h7/stm32h743xx/pins.c
@@ -28,7 +28,7 @@
#include "py/mphal.h"
#include "peripherals/pins.h"
-// Todo: some pins do have ADCs, but the module isn't set up yet.
+// Todo: some pins do have ADCs, but the module isn't set up yet.
const mcu_pin_obj_t pin_PA00 = PIN(0, 0, NO_ADC);
const mcu_pin_obj_t pin_PA01 = PIN(0, 1, NO_ADC);
diff --git a/ports/stm/supervisor/internal_flash.c b/ports/stm/supervisor/internal_flash.c
index 060eadecb..d37a54f60 100644
--- a/ports/stm/supervisor/internal_flash.c
+++ b/ports/stm/supervisor/internal_flash.c
@@ -321,4 +321,3 @@ mp_uint_t supervisor_flash_write_blocks(const uint8_t *src, uint32_t block_num,
void supervisor_flash_release_cache(void) {
}
-
diff --git a/ports/stm/supervisor/port.c b/ports/stm/supervisor/port.c
index 9b62fa2eb..dfe4c5ba2 100644
--- a/ports/stm/supervisor/port.c
+++ b/ports/stm/supervisor/port.c
@@ -453,4 +453,3 @@ void _init(void)
{
}
-
diff --git a/ports/stm/supervisor/serial.c b/ports/stm/supervisor/serial.c
index ce1366000..3a058ed2e 100644
--- a/ports/stm/supervisor/serial.c
+++ b/ports/stm/supervisor/serial.c
@@ -72,4 +72,3 @@ void serial_write_substring(const char *text, uint32_t len) {
}
HAL_UART_Transmit(&huart2, (uint8_t*)text, len, 5000);
}
-
diff --git a/ports/stm/tools/examples/nucleo_h743.csv b/ports/stm/tools/examples/nucleo_h743.csv
index 2481415b3..d3647ca42 100644
--- a/ports/stm/tools/examples/nucleo_h743.csv
+++ b/ports/stm/tools/examples/nucleo_h743.csv
@@ -127,4 +127,4 @@ ETH_RMII_RXD0,PC4
ETH_RMII_RXD1,PC5
ETH_RMII_TX_EN,PG11
ETH_RMII_TXD0,PG13
-ETH_RMII_TXD1,PB13 \ No newline at end of file
+ETH_RMII_TXD1,PB13
diff --git a/ports/stm/tools/parse_af_csv.py b/ports/stm/tools/parse_af_csv.py
index b257a450c..4e9725260 100644
--- a/ports/stm/tools/parse_af_csv.py
+++ b/ports/stm/tools/parse_af_csv.py
@@ -28,8 +28,8 @@ import sys
# Use: parse_af_csf.py Filename.csv -pins-only
# Designed for use with .csv files from Micropython, or in identical format
# created via Datasheet peripheral tables with a Sheets program.
-#
-# See examples/stm32f405.csv for example formatting.
+#
+# See examples/stm32f405.csv for example formatting.
# Most peripherals (SPI, I2C) output 3 values:
# peripheral index, alt function, pin string
@@ -52,7 +52,7 @@ def evaluate_tim(inper, inlist, altfn, pin):
if inper[:3] == "TIM" and inper[5:7] == "CH" and inper[-1:] != 'N':
inlist.append([inper[3:4],altfn,inper[-1:],pin])
-
+
# Open target file
with open(sys.argv[1]) as csv_file:
csv_reader = csv.reader(csv_file, delimiter=',')
@@ -107,7 +107,7 @@ with open(sys.argv[1]) as csv_file:
print(" PERIPH(" + row[0] + ", " + str(row[1]) + ", &pin_" + row[2] + "),")
print("};")
- # Timer special case:
+ # Timer special case:
print("const mcu_tim_pin_obj_t mcu_tim_pin_list[" + str(len(outlist[-1])) + "] = {")
for row in outlist[-1]:
print(" TIM(" + row[0] + ", " + str(row[1]) + ", " + str(row[2]) + ", &pin_" + row[3] + "),")
diff --git a/ports/stm/tools/parse_pins_csv.py b/ports/stm/tools/parse_pins_csv.py
index b69b4791b..4ab3fc25c 100644
--- a/ports/stm/tools/parse_pins_csv.py
+++ b/ports/stm/tools/parse_pins_csv.py
@@ -25,12 +25,12 @@
import csv
import sys
-# Use: parse_pins_csv.py Filename.csv
+# Use: parse_pins_csv.py Filename.csv
# Designed for use with .csv files from Micropython, or in identical format
# created via Datasheet peripheral tables with a Sheets program.
-#
-# See examples/nucleo_h743.csv for example formatting.
-
+#
+# See examples/nucleo_h743.csv for example formatting.
+
# Open target file
with open(sys.argv[1]) as csv_file:
csv_reader = csv.reader(csv_file, delimiter=',')