Jeff Epler
57ab4f1329
stm: SPI: revamp pin search code
...
I discussed with Hierophect on Discord about how to "de-nest" the code
for configuring SPI objects on STM, because the problems with one
nesting level per pin becomes unmanageable with the up to 10 pins of
SDIO.
This code (which is only compile-tested so far) demonstrates the concept
we discussed.
The SCK pin is always required. Loop over all possibilities of the SCK
pin. When we are considering a particular item in the mcu_spi_sck_list
we have now become committed to using a particular periph_index. If all
the other pins can be satisfied by that periph_index, then we have a
working combination. Once we have a working combination that is not
reserved, we can return that combination. On reaching the end, we have
checked all the possible possibilities and can give the same errors as
before: One if there was a possibility that worked but was reserved;
and another if no possibility worked.
2020-07-07 14:37:50 -05:00
Diego Elio Pettenò
34b4993d63
Add license to some obvious files.
2020-07-06 19:16:25 +01:00
Lucian Copeland
c72e3536f1
Merge remote-tracking branch 'upstream/main' into stm32-timer-allocator
2020-07-03 09:50:05 -04:00
Scott Shawcroft
4a21426377
Merge pull request #3103 from hierophect/stm32-simplex-spi-fix
...
STM32: add debug flags, fix hang in simplex SPI
2020-07-02 13:42:08 -07:00
Lucian Copeland
4b66483757
Update submodule, revert direction change
2020-07-02 15:38:37 -04:00
Jeff Epler
fcddfd0f39
Merge pull request #3083 from tannewt/esp32s2_busio
...
Add busio support for the ESP32-S2
2020-07-01 21:02:08 -05:00
Lucian Copeland
87d58b3b0a
STM32: add debug flags, fix hang in simplex SPI
2020-07-01 17:48:10 -04:00
Lucian Copeland
ab9a64eafa
Add timer allocator, adjust pulsio to use general purpose timers
2020-07-01 10:35:49 -04:00
jgillick
017c188ab5
Move NVM block to increase program size.
2020-06-25 21:46:15 -07:00
Lucian Copeland
6c91af7d56
WIP
2020-06-25 17:27:01 -04:00
Jeff Epler
1d2cc0b968
I2CPeripheral: Rename class and its module
...
This is an incompatible change.
2020-06-25 11:44:19 -05:00
Scott Shawcroft
c5fa9730a8
Compiles!
2020-06-24 12:47:59 -07:00
Scott Shawcroft
a26102607e
Add UART support
2020-06-24 12:47:58 -07:00
Jeff Epler
87835c77e8
Merge pull request #3038 from jepler/compute-usb-devices
...
Compute USB_DEVICES instead of requiring it to be specified
2020-06-24 13:31:56 -05:00
Jeff Epler
f232aef786
supervisor.mk: Compute USB_DEVICES; remove from boards and ports
...
Since Actions passed on the previous commit, where this computed value
was checked against the specified value (if any), this is no net change,
except that we no longer need to specify it for particular boards or
ports.
2020-06-23 12:59:01 -05:00
Scott Shawcroft
f67b307371
Merge pull request #3045 from k0d/stm32_alignment_issue
...
Fixes issue with memory alignment in STM32
2020-06-23 10:54:08 -07:00
Jeff Epler
93d3629da2
stm: Sort configuration options and make them all conditional
...
This makes them all overridable on the board level, tersely
2020-06-23 11:02:38 -05:00
Jeff Epler
0110463811
stm: Disable USB MIDI and most USB HID
...
.. it was not in the USB descriptors anyway (lack of enough endpoints?)
2020-06-23 11:01:36 -05:00
Jeff Epler
8a760b0657
stm: Pin.c: Compute GPIO_PORT_COUNT instead of specifying manually
2020-06-22 10:45:27 -05:00
Jeff Epler
5a3a0a5092
stm: Makefile: sort files in SRC_STM32
2020-06-22 10:45:23 -05:00
Mark Olsson
23da0fa99c
Fixes issue with memory alignment in STM32
...
When compiling with optimizations on, an issue occurs where the claimed_pins/never_reset_pins memory location is shared with another variable. This causes some bad memory read, so the USB pins ended up being reset. Setting these to have an alignment of 4 bytes resolves this.
Tested on nucleo_f746zg
2020-06-18 00:51:04 +02:00
Lucian Copeland
fd4aafacbe
Add port D to LQFP64
2020-06-16 12:33:15 -04:00
Lucian Copeland
2aac3cbdce
Revert I2C timing overrides, reduce scope to module only
2020-06-15 13:51:09 -04:00
Lucian Copeland
724637faa3
Move I2C speed to clock-style definition
2020-06-11 11:17:51 -04:00
Lucian Copeland
c08702414e
Add macros for setting correct F7 and H7 I2C timing
2020-06-10 16:36:44 -04:00
Lucian Copeland
c88a8e66c6
Minor comment fix
2020-06-10 13:22:21 -04:00
Lucian Copeland
7cc8b784c3
Add missing openmv definitions
2020-06-10 10:31:24 -04:00
Lucian Copeland
b414f82669
Add DTCM and ITCM support to F7 series
2020-06-09 18:01:52 -04:00
Lucian Copeland
ad0971fb25
Override HAL_Delay and HAL_GetTick
2020-06-05 13:56:32 -04:00
Lucian Copeland
a0977cac7b
Merge remote-tracking branch 'upstream/master' into stm32-LSE-startup-fix
2020-06-04 16:15:38 -04:00
Lucian Copeland
d14e34449b
Rework LSE clock init, allow clock overrides
2020-06-04 13:21:29 -04:00
Diego Elio Pettenò
dd5d7c86d2
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.
2020-06-03 10:56:35 +01:00
Scott Shawcroft
dd2cd6f002
Merge pull request #2979 from hierophect/stm32-remove-crystals
...
STM32: Set correct crystal settings on Discovery boards
2020-06-01 15:21:39 -07:00
Lucian Copeland
75eb44f234
Note temporary issue with Nucleo boards
2020-06-01 12:26:08 -04:00
Lucian Copeland
0fe7efdf36
Set correct crystal settings on Discovery boards
2020-05-29 14:01:34 -04:00
Scott Shawcroft
ddcae19254
Merge pull request #2964 from hierophect/mimxrt-busio-cleanup
...
mimxrt10xx: Busio cleanup and bugfixes
2020-05-29 10:42:16 -07:00
Lucian Copeland
fe75c7793c
Fix SWO/Analog overlap, style changes
2020-05-29 12:19:37 -04:00
Scott Shawcroft
796373b8be
A number of small ESP32S2 fixes:
...
* Fix flash writes that don't end on a sector boundary. Fixes #2944
* Fix enum incompatibility with IDF.
* Fix printf output so it goes out debug UART.
* Increase stack size to 8k.
* Fix sleep of less than a tick so it doesn't crash.
2020-05-28 15:43:55 -07:00
Lucian Copeland
a59798ed49
Merge branch 'mimxrt-uart-oneway' into mimxrt-busio-cleanup
2020-05-27 12:31:16 -04:00
Lucian Copeland
9f5520135c
translations
2020-05-27 11:54:52 -04:00
Lucian Copeland
53fb699436
Add pin resetting across boards, fix array size detection issue
2020-05-27 11:45:15 -04:00
Scott Shawcroft
ba724fffb4
Merge remote-tracking branch 'adafruit/master' into esp32s2_digitalio
2020-05-20 10:48:27 -07:00
Lucian Copeland
66c09efae2
Add UART one-way instance search, fix bugs in stm32 implementation
2020-05-20 12:48:01 -04:00
Scott Shawcroft
fd0420d432
Update digitalio api for other ports
2020-05-20 09:23:42 -07:00
Scott Shawcroft
916ca9f8a6
Merge pull request #2910 from tannewt/esp32s2
...
Add initial ESP32S2 support
2020-05-19 12:53:23 -07:00
Scott Shawcroft
2c2b53303d
Merge pull request #2837 from k0d/serial-debug
...
Add support for a debug console, such as ST-Link VCP.
2020-05-18 18:13:31 -07:00
Mark Olsson
007c92ee6a
Enable showing the console on a debug uart
2020-05-19 02:02:52 +02:00
Scott Shawcroft
3c1469b0a5
Add port_fixed_stack for more builds
2020-05-15 16:22:33 -07:00
Daniel Pollard
ee2cb703c8
merged master
2020-05-12 14:41:28 +10:00
Lucian Copeland
94949fb46f
Add recovery domain write access, adjust stack
2020-05-11 18:02:40 -04:00
Lucian Copeland
248704b262
Merge remote-tracking branch 'upstream/master' into stm32-lsetimeout
2020-05-11 14:18:37 -04:00
Lucian Copeland
5249a7b02c
Add timeout and adjustment to LSI
2020-05-08 12:36:39 -04:00
Jeff Epler
182ae10080
Fix build after #2831 (stm32f4xx rgbmatrix) broke it
2020-05-07 18:32:50 -05:00
Scott Shawcroft
c3b3eb4c21
Merge pull request #2831 from jepler/rgbmatrix-stm
...
stm: enable RGBMatrix
2020-05-06 08:35:25 -07:00
hierophect
c311b5c002
Merge pull request #2842 from hierophect/stm32-h7-displayio
...
STM32: Add displayio to F7/H7
2020-05-05 12:37:08 -04:00
Daniel Pollard
bfa5cd9c13
refactor countio based on feedback
2020-05-05 15:23:38 +10:00
Dan Halbert
bae7a5e433
make translate again
2020-05-04 17:26:59 -04:00
Lucian Copeland
61b0994631
Fix flag typo
2020-05-01 14:46:06 -04:00
Scott Shawcroft
a863b0a349
Fix openmv_h7 build
2020-04-30 13:46:12 -07:00
Scott Shawcroft
1ca90572f1
Merge remote-tracking branch 'adafruit/master' into lower_power
2020-04-30 13:25:31 -07:00
Lucian Copeland
06b62721b3
Increase H7 filesystem size
2020-04-30 15:49:17 -04:00
Lucian Copeland
435aa3d055
Add correct PID for the OpenMV
2020-04-30 14:49:47 -04:00
Lucian Copeland
4f71bd295d
Make PulseIO optional within DisplayIO
2020-04-30 14:47:50 -04:00
Lucian Copeland
89ff5589c4
Add the OpenMV-H7 R1 board
2020-04-30 12:39:20 -04:00
Jeff Epler
e5be728c1c
stm: enable protomatter
...
Testing performed: on stm32f405 feather, all pins change in plausible ways
on a logic probe. Didn't actually drive a display yet.
2020-04-30 08:58:58 -05:00
Dan Halbert
180f5c6a94
Merge remote-tracking branch 'adafruit/master' into ringbuf-fixes
2020-04-29 22:11:22 -04:00
Scott Shawcroft
a30ff70b4e
Merge remote-tracking branch 'adafruit/master' into lower_power
2020-04-29 10:51:21 -07:00
Scott Shawcroft
2d7cf4b792
Merge pull request #2819 from hierophect/stm32-readme
...
STM32: Add port readme, make flash
2020-04-28 12:32:03 -07:00
Scott Shawcroft
b7804f450b
Fix stm32746g_discovery
...
Also, rename it so that matches the other board names.
2020-04-27 20:34:42 -07:00
Scott Shawcroft
e45de39998
Fix nucleo_f746zg build
2020-04-27 20:28:05 -07:00
Lucian Copeland
2a0e176a77
Add readme and dfu-flashing
2020-04-27 20:51:47 -04:00
Scott Shawcroft
de42e4af02
Merge remote-tracking branch 'adafruit/master' into lower_power
2020-04-27 17:43:32 -07:00
Scott Shawcroft
40a1f3edbc
Merge pull request #2811 from jepler/update-ulab
...
ulab: actually update the submodule
2020-04-27 17:41:43 -07:00
Scott Shawcroft
755d404edf
Merge remote-tracking branch 'adafruit/master' into lower_power
2020-04-27 16:45:10 -07:00
Dan Halbert
faa50df05f
Merge pull request #2817 from jepler/stm-linker-scripts
...
Standardize on FLASH_FIRMWARE section name in linker scripts
2020-04-27 18:43:26 -04:00
Jeff Epler
7eff89e9f9
linker scripts: Re-align at ":"
...
With "git show -b" you can verify that this is a whitespace only change
because the diff will be empty.
2020-04-27 12:47:52 -05:00
hierophect
d9e4155815
Merge branch 'master' into stm32f7_os
2020-04-27 12:58:15 -04:00
Mark Olsson
31d8e46063
Enables os on STM32F7
...
os.uname() works
os.urandom() doesn't work yet, will enable in another PR
2020-04-27 18:18:43 +02:00
Mark Olsson
f9096d83ac
Enables PulseIO on STM32F7
...
Tested on nucleo_f746zg
2020-04-27 17:55:07 +02:00
Jeff Epler
aff42defda
stm: Use FLASH_FIRMWARE instead of FLASH_TEXT in linker scripts
...
for compatibility with the build_memory_info script
This change was scripted:
git grep -l FLASH_TEXT | xargs sed -i s/FLASH_TEXT/FLASH_FIRMWARE/
2020-04-27 08:07:28 -05:00
Jeff Epler
485f667141
ulab: disable on espruino pico
...
this non-"express" board is nearly full. Right now it's actually possible
just to disable the "compare" module, but as this leaves it packed
pretty full I prefer to fully disable it in order to avoid the topic
returning again soon.
2020-04-27 07:47:05 -05:00
Scott Shawcroft
9e4b94f466
Merge pull request #2805 from tannewt/update_tinyusb
...
Update tinyusb
2020-04-26 20:55:36 -07:00
hierophect
652a5de242
Merge pull request #2809 from k0d/stm32f767xx_fix
...
Adds missing declarations in periph.h for stm32f767xx
2020-04-25 14:16:34 -04:00
Mark Olsson
8814dd038e
Adds missing declarations in periph.h for stm32f767xx
2020-04-25 19:50:48 +02:00
Scott Shawcroft
5c7f6e6211
Remove empty #if and add missing includes.
2020-04-24 11:48:55 -07:00
Mark Olsson
91fbbcab19
adds support for the stm32f746g_disco board
2020-04-24 16:43:39 +02:00
Lucian Copeland
c6c77726e7
Merge remote-tracking branch 'upstream/master' into stm32-docfix
2020-04-23 13:39:48 -04:00
Lucian Copeland
8791ca6af3
implement requested changes
2020-04-23 13:33:41 -04:00
hierophect
ead7c6c887
Merge pull request #2785 from k0d/ports_nucleo_f746zg
...
STM32: adds support for stm32f746xx MCU and the nucleo_f746zg board
2020-04-23 12:32:44 -04:00
Mark Olsson
83cc9783cc
STM32: adds support for stm32f746xx MCU and the nucleo_f746zg board
2020-04-23 10:48:27 +02:00
Scott Shawcroft
f13de32208
Add HSE_VALUE for STM feather.
2020-04-22 14:37:24 -07:00
Lucian Copeland
d0a2106547
Remove old build flags, add fixes for shared_matrix
2020-04-22 16:06:08 -04:00
Scott Shawcroft
b277944cf0
Fix STM so it matches the correct RTC fields.
2020-04-22 11:10:51 -07:00
Dan Halbert
fbc8719fad
ringbuf tested
2020-04-21 22:40:12 -04:00
Dan Halbert
77cd93ac2d
merge from adafruit
2020-04-21 17:47:51 -04:00
Dan Halbert
38ec3bc574
further ringbuf cleanup
2020-04-21 17:38:20 -04:00
Scott Shawcroft
17d038830d
Use our own flag for board crystal config.
2020-04-21 14:14:30 -07:00
Scott Shawcroft
bebf27e733
Merge remote-tracking branch 'adafruit/master' into lower_power
...
This isn't perfect and needs a bit more testing.
2020-04-20 18:25:13 -07:00
Mark Olsson
506f340c7d
STM32: f767: Fixes linker settings.
2020-04-20 19:15:18 +02:00
Scott Shawcroft
7e3d4c61b5
Update TinyUSB and add interrupt hooks.
2020-04-17 14:16:49 -07:00
Lucian Copeland
9e49fc13f4
startup file crash fix, H7 bin fix
2020-04-16 17:33:48 -04:00
Lucian Copeland
54abfc2e8b
translations-merge
2020-04-15 10:29:05 -04:00
Lucian Copeland
6427994b14
Implement requested changes
2020-04-15 10:22:51 -04:00
Scott Shawcroft
b580b34cbf
Merge remote-tracking branch 'adafruit/master' into lower_power
2020-04-14 17:14:44 -07:00
Scott Shawcroft
7dfcae6067
Tweaks from jepler
2020-04-14 17:09:48 -07:00
Jeff Epler
09dc46a984
Add Protomatter and FramebufferDisplay
2020-04-14 18:24:54 -05:00
Lucian Copeland
83a55f65a4
Implement cache-based reads
2020-04-13 15:14:38 -04:00
Lucian Copeland
426d2afe28
Fix pin mapping for the H7 Nucleo
2020-04-13 14:36:49 -04:00
Lucian Copeland
5ac38c95cc
Various requested fixes
2020-04-13 12:03:05 -04:00
Lucian Copeland
92a0621e59
Add busio support, cleanup
2020-04-09 13:43:19 -04:00
Scott Shawcroft
01941c027b
Fix up STM
...
Enable the Alarm IRQ earlier and correct bit clearing.
2020-04-08 14:41:57 -07:00
Scott Shawcroft
d0a25ca9ac
Tweaks based on dhalberts feedback
2020-04-08 10:49:46 -07:00
Lucian Copeland
9761672d42
Linker file restructure, TCM and MPU additions
2020-04-03 16:33:18 -04:00
Lucian Copeland
47a5d83267
Implement F7 Nucleo
2020-04-02 11:47:16 -04:00
Lucian Copeland
2f764ded63
merge and docs
2020-04-01 13:52:53 -04:00
Lucian Copeland
a89928c13c
Implement requested changes
2020-04-01 13:02:05 -04:00
Scott Shawcroft
1071924701
Fix thunderpack build
2020-03-31 17:05:37 -07:00
Scott Shawcroft
8fe512c7e9
Merge remote-tracking branch 'adafruit/master' into lower_power
2020-03-31 15:13:58 -07:00
Scott Shawcroft
4b063aeb29
Hack up STM32 PulseIn so it builds
2020-03-31 15:12:11 -07:00
Lucian Copeland
e2be069686
Support cached internal flash on the H743
2020-03-28 18:30:46 -04:00
Jeff Epler
54e8c63b4f
Merge pull request #2730 from tannewt/fix_fourwire_phase_polarity
...
Add polarity and phase to FourWire.
2020-03-28 07:28:37 -05:00
Scott Shawcroft
798118b74f
Update board.c's to remove remaining tick.h
2020-03-27 14:52:35 -07:00
Scott Shawcroft
b043384949
Update built in display init
2020-03-27 14:35:29 -07:00
Lucian Copeland
7995bcac40
Flash additions
2020-03-27 14:15:33 -04:00
Lucian Copeland
348df4be2b
Merge remote-tracking branch 'upstream/master' into stm32x7-setup
2020-03-26 18:16:11 -04:00
Lucian Copeland
c4db8b87e2
Add F7 and H7 Support to the STM32 port
...
Restructures the STM port of Circuitpython to be more generic about the STM32 chip lines to support
the F7 and H7 series of chips. Adds the new Packages directory to organize different chip layouts
between lines. Makes general changes to the Makefile to condense board-level flags to the minimum
and support the new chip series. Adds the new chip line to the Peripherals directory, along with
new python tools used to generate peripheral text automatically in the tools/ directory.
2020-03-26 18:01:17 -04:00
siddacious
9e0c00dfd4
adding a backlight polarity flag to Display
2020-03-25 22:51:20 -07:00
Scott Shawcroft
ea0ce39962
Simplify STM a bit.
2020-03-24 15:49:24 -07:00
jgillick
8ed4deee9d
Rename pins
2020-03-23 23:06:55 -07:00
Scott Shawcroft
653b7619ec
Add back microsecond delay to STM32
2020-03-23 16:09:50 -07:00
Scott Shawcroft
c0c4c4403a
Factor out stm32f4xx_hal_conf.h
2020-03-23 14:46:25 -07:00
jgillick
29ce756709
PR feedback.
2020-03-22 18:41:19 -07:00
jgillick
a79ac35173
Rename NVM_BYTEARRAY_BUFFER_SIZE
2020-03-22 15:20:58 -07:00
jgillick
68195a8dfe
Update NVM_BYTEARRAY_BUFFER_LEN
2020-03-22 15:19:53 -07:00
jgillick
d76b76cb1d
Add non-volatile memory support to STM
2020-03-22 02:22:59 -07:00
jgillick
c62b724b24
Merge remote-tracking branch 'circuitpython/master' into jgillick/circuitpython/stm32f412c
2020-03-21 23:36:15 -07:00
Scott Shawcroft
2623022c84
Initial work for STM32. Need to fix us delay and PulseIn still.
2020-03-20 12:58:34 -07:00
jgillick
d9e491a9e8
Remove unnecessary change
2020-03-19 00:02:23 -07:00
jgillick
284073584a
Cleanup
2020-03-19 00:01:32 -07:00
jgillick
9be2ab6008
Change the board to use an STM32F411 chip.
2020-03-18 23:55:18 -07:00
jgillick
679314a22e
Fix disable VBUS sensing.
2020-03-18 00:35:20 -07:00
Jeff Epler
d6342af980
ulab: rename enable macro so it appears in the support matrix
2020-03-17 09:33:03 -05:00
jgillick
24d1fd2bf1
PR Cleanup.
2020-03-17 00:48:19 -07:00
jgillick
d41ef45a9b
Update clock.
2020-03-17 00:36:18 -07:00
jgillick
cbc0e0344d
Revert changes to system_stm32f4xx.c
2020-03-17 00:36:12 -07:00
jgillick
07549b7fd9
Bring back trimmed spaces.
2020-03-17 00:27:04 -07:00
Lucian Copeland
bb3ed3a827
Merge branch 'master' into stm32x7-setup
2020-03-16 12:37:53 -04:00
jgillick
8a93a81a26
Chip specific code.
2020-03-15 22:31:36 -07:00
jgillick
5dbdf72472
Fix LED port.
2020-03-15 19:36:16 -07:00
jgillick
f884c2b9b6
Incremental update
2020-03-15 19:34:41 -07:00
jgillick
6f153804da
Add initial thunderpack port files.
2020-03-14 00:03:14 -07:00
Lucian Copeland
ef7370d023
Change ST drivers submodule to match TinyUSB
2020-03-12 17:14:09 -04:00
Lucian Copeland
18442c5b00
Merge remote-tracking branch 'upstream/master' into stm32-port-namechange
2020-03-12 15:40:44 -04:00
Lucian Copeland
bb167f04fa
WIP
2020-03-12 14:54:43 -04:00
Lucian Copeland
be7def128a
submodule move and sync
2020-03-11 18:16:16 -04:00
Lucian Copeland
53b1544f41
create copy
2020-03-11 18:13:06 -04:00