Commit Graph

8762 Commits (fa86c2b73c3c357a3bd82296d958efca509b7d85)

Author SHA1 Message Date
JohnK1987 fa86c2b73c
Add support of SPI API for STM32H5 family (#324)
* fix PWM pin map in context of Timer change

* Note about DAC on Nucleo-H503RB

* Add ADC and DAC for STM32H5

* Copyright fix

* Add I2C for STM32H5

* fix I2C related code

* ADC/DAC fix

* Enable I2C API

* Copyright fix

* Add SPI for STM32H5

* Modification of stm spi API for h5 family

* fix I2C device

* fix I2C ASYNCH macro

* fix revert back the stop variable position

* Fix clock for SPI

* fix some details

* Rename startup_stm32h563xx.s to startup_stm32h563xx.S

* Rename startup_stm32h503xx.s to startup_stm32h503xx.S

---------

Co-authored-by: Jan Kamidra <odiin@windowslive.com>
2024-09-08 12:58:45 -07:00
Jamie Smith d1dbb405c8
Fixes for SPI slave implementation (#336)
* Start on SPI slave comms test

* Free pins in SPI and SPISlave destructor

* Improve LPC1768 readable()
2024-09-03 19:34:13 -07:00
Jamie Smith e6043218fd
Fix NUCLEO_L452RE_P arduino pins (#335) 2024-09-02 14:52:58 -07:00
Jamie Smith 975e6b2fa5
Fix some DMA SPI issues with DMA IP v3 and/or word size > 8 bits (#332)
* Fix some DMA SPI issues with DMA IP v3 and/or word size > 8 bits

* Fix typo

* oops fix naming
2024-08-29 01:22:44 -07:00
ccli8 88de6a1070
M2354: Fix compile error with TF-M integration (#325)
* M2354: Fix compile error with TF-M

In CMake, mbed-psa moves out of mbed-core, its library type changing to
STATIC from INTERFACE. Following this modification, the platform TF-M
code relying on mbed-psa needs to explicitly specify the dependency
through target_link_libraries().

* M2354: Enable OUTPUT_EXT set to either bin or hex

Update post-build script to enable OUTPUT_EXT can be set to "bin" or
"hex" in targets.json5.

* NUVOTON: Locate correct python3 command path across platforms

shutil.which("python3") can locate incorrect path when there are multiple
python3 installations. Instead, follow the link below, use sys.executable.
https://docs.python.org/3/library/sys.html#sys.executable
2024-08-22 19:40:30 -07:00
JohnK1987 3f239c6201
Add support of I2C API for STM32H5 family (#323)
* fix PWM pin map in context of Timer change

* Note about DAC on Nucleo-H503RB

* Add ADC and DAC for STM32H5

* Copyright fix

* Add I2C for STM32H5

* fix I2C related code

* ADC/DAC fix

* Enable I2C API

* Copyright fix

* fix I2C device

* fix I2C ASYNCH macro

* fix revert back the stop variable position

---------

Co-authored-by: Jan Kamidra <odiin@windowslive.com>
2024-08-19 00:29:35 -07:00
ccli8 047bbc3bd3
M467: Replace PlatformMutex with rtos::Mutex (#322)
PlatformMutex becomes unsupported. rtos::Mutex now replaces it,
supporting both mbed-baremetal and mbed-os.
2024-08-16 06:23:32 +02:00
JohnK1987 8d2ede6498
Add AnalogIn and AnalogOut APIs support for STM32H5 (#314)
* fix PWM pin map in context of Timer change

* Note about DAC on Nucleo-H503RB

* Add ADC and DAC for STM32H5

* Copyright fix

* ADC/DAC fix

---------

Co-authored-by: Jan Kamidra <odiin@windowslive.com>
2024-08-11 22:21:53 -07:00
Jamie Smith c1e3c86a4d
A few minor H5 fixes (#318) 2024-08-04 23:12:53 -07:00
Jamie Smith 5354079bfb
Lots of K64F SPI fixes (#315)
* Update DSPI driver to latest version from NXP

* Other updates to SDK files

* Fix double DMA transactions, improve dummy byte support

* Simplify dummy byte setting

* Also fix SPI driver bug

* Fix infinite hang with interrupt SPI

* Better fix for SPI hang

* Remove earlier fix
2024-07-28 13:32:42 -07:00
Jamie Smith de0c404983
Synchronize changes with Mbed upstream: July 2024 edition (#309)
* remove stdio checks in serial init if no console is available

* STM32WL fix set preamble length to 8

* Add target support for XDOT_MAX32670

* TARGET_STM: only mask CAN rx interrupt after rx interrupt, not all CAN interrupts

* Sleep Radio in between DC scheduled

* Nuvoton HUSBD support endpoint write ZLP

* USBCDC: support ZLP

* Don't overlap STM32 FDCAN RAM sections

* allow to override antenna gain

* TFM: Fix undeclared function tfm_ns_interface_init

ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]

* NUVOTON: CAN: Fix filter mask

NOTE: This fix only targets CAN (M453/M487), not CAN-FD (M467).
NOTE: NUC472 CAN doesn't support filter.

* NUVOTON: CAN: Fix Rx interrupt doesn't work

Major modifications:
1. Handle Rx interrupt based on Message Object interrupt (CAN_IIDR=0x0001~0x0020) instead of CAN_STATUS.RxOK
2. Also handle Tx interrupt following above for consistency

Other related modifications:
1. Fix signature type error in CAN_CLR_INT_PENDING_BIT()
2. Add CAN_CLR_INT_PENDING_ONLY_BIT() which doesn't clear NewDat flag so that user can fetch received message in thread context

NOTE: This fix only targets CAN (NUC472/M453/M487), not CAN-FD (M467).

* NUVOTON: CAN: Fix Message Object number for Tx and recognition of Rx interrupt

1.  The same Message Object number cannot use for both Tx and Rx simultaneously.
    For Tx, Message Object number 31 is reserved instead of 0.
    For Rx, Message Object numbers 0~30 are used and for filters.
2.  NewDat bit (CAN_IsNewDataReceived()) isn't exclusive to Rx.
    Recognize Rx interrupt by Message Object number other than 31.

NOTE: This fix only targets CAN (NUC472/M453/M487), not CAN-FD (M467).

* NUVOTON: CAN: Fix filter mask being zero

On mask being zero, it means any match, not exact match.

NOTE: This fix only targets CAN (M453/M487), not CAN-FD (M467).
NOTE: NUC472 CAN doesn't support filter.

* Allow custom TCXO control parameter

Allow custom TCXO control parameter

* NUVOTON: EMAC: Fix undeclared function mbed_error_printf

ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]

* NUVOTON: AnalogIn: Fix undeclared function gpio_set

ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]

* NUVOTON: CAN: Fix undeclared function gpio_set

ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]

* NUVOTON: AnalogOut: Fix undeclared function gpio_set

ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]

* NUVOTON: SPI: Fix undeclared function gpio_set

ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]

* NUVOTON: I2C: Fix undeclared function gpio_set

ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]

* NUVOTON: Serial: Fix undeclared function gpio_set

ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]

* Add separate flags for I2C slave transfer in progress

Fixes ARMmbed/mbed-os#15498

Adds 2 boolean flags to the STM32 `i2c_s` object
to indicate whether a transfer is in progress,
separate from the existing "transfer pending" flags.

`i2c_slave_write`, `i2c_slave_read` and their associated callbacks
are modified to use these flags in addition to the pending flags.
The original behavior of the pending flags is preserved.

* ESP8266: Fix accessing uninitialized variable

* Added missing delete

* Add ability to change number of status registers for macronix QSPIF devices

* correct scan parameters types

* skip CRC when initializing TDBStore

Problem: The build_ram_table() function of TDBStore loops over every entry, calculates the checksum and compares them to the stored checksum in the entry header to ensure integrity. For larger TDBStores (e.g. 8 MiB or more) in external single-SPI flash devices this check can take very long, thus rendering it unusable in some cases.

Solution: The suggested solution skips the time consuming CRC of the data. After reading the key and calculating its CRC, it sets next_offset to the beginning of the next entry, thereby skipping the data. While this skips the integrity check, it significantly reduces the initial building of the RAM table.

The data CRC can be enabled or disabled with a compiler flag.

Contribution is provided on behalf of BIOTRONIK.

* Added missing check for replay protection pointer before allocating new variable

Problem: If a key with write-once flag is being set in a SecureStore without rollback-protection store (i.e. _rbp_kv == NULL), additional memory will be allocated for the variable _ih->key. The memory will not be deleted, though, as the delete in line 434 only happens if a rollback-protection store exists (i.e. _rbp_kv != NULL)

Solution: Only allocate the memory if _rbp_kv != NULL

Contribution is provided on behalf of BIOTRONIK.

* Increase AT timeout to 10s in AT_CellularSMS::send_sms

For some devices sending can be slow (as an example see SIM800, it can be up to 60s), command is being run properly but default timeout is returning an invalid error.
See https://www.elecrow.com/wiki/images/2/20/SIM800_Series_AT_Command_Manual_V1.09.pdf

* Increase AT timeout to 10s in AT_CellularSMS::get_sms

When SMS list is big and baudrate is not fast enough, with default timeout we can suffer from timeout error while getting a sms because method is parsing the full list and this takes long.

* Fix AT_CellularSMS::list_messages breaking in text mode when CRLF is contained in SMS payload text

When parsing SMS, it can happen that we receive CRLF in the SMS payload (happened to me when receiving provider texts).
As an example, we can receive:

"""
Hello <CR><LF>
World!
"""

With previous implementation, second consume_to_stop_tag was stopping in <CR><LF> and rest of the code was failing for obvious reasons.
With this commit we consume the full payload as bytes.

* Add missing SPDX identifier to a bajillion Nuvoton source files + some others

* More license fixes, upgrade M451 legacy PinNames.h, add MCU description

* Fix some more legacy pin names

---------

Co-authored-by: Jost, Chris <79271064+chrJost@users.noreply.github.com>
Co-authored-by: Charles <hallard04@free.fr>
Co-authored-by: Leon Lindenfelser <llindenfelser@multitech.com>
Co-authored-by: Pavel Sorejs <sorejs@gmail.com>
Co-authored-by: cyliang tw <cyliang@nuvoton.com>
Co-authored-by: jmcloud <jmcloud@tesla.com>
Co-authored-by: Chun-Chieh Li <ccli8@nuvoton.com>
Co-authored-by: Adam Gausmann <adamg@esdemc.com>
Co-authored-by: Mingjie Shen <shen497@purdue.edu>
Co-authored-by: Matthias Goebel <matthias.goebel@biotronik.com>
Co-authored-by: danielzhang <danielzhang@mxic.com.cn>
Co-authored-by: Mathieu Camélique <mathieu.camelique@edu.hefr.ch>
Co-authored-by: David Alonso de la Torre <davidalto97@gmail.com>
2024-07-21 00:16:51 -07:00
JohnK1987 6b946d4c4f
Add PwmOut API support for STM32H5 (#299)
* Enable PwmOut API

* remove pins with LpTimer

* Prepare for H563

* Change source of us ticker from TIM2 to TIM3

---------

Co-authored-by: Jan Kamidra <odiin@windowslive.com>
2024-07-20 09:10:44 -07:00
JohnK1987 eb0012983a
Add basic source files for MCU H503xB+H563xI + configuration for Nucleo H503RB+H563ZI (#294)
* add targets H503xB and H563xI

* add STM32H5 basic stettings and drivers

* Necessary modification in STM32 family drivers for STM32H5 family

* targets.json5 modified for STM32H503xB and STM32H563xI

* Prototype Upload methods for Nucleo boards of STM32H5 family

* fix typo

* typo fix

* Add images for H5 targets

* cmsis_mcu_desc fix

* targets.json fix

* merge all clock files to one

* Enable Mbed upload method

* fix mcu_family_target

* fix for clock settings

* move - device remove list to family level

* fix targets.json

---------

Co-authored-by: Jan Kamidra <odiin@windowslive.com>
2024-07-10 21:06:28 -07:00
Jamie Smith 25dbf7c5fd
Refactor CYW43xxx wi-fi driver to better work with CMake and move code out of the Portenta target folder (#292)
* Refactor Cypress WHD wifi & bluetooth drivers to work better with CMake and be vendor agnostic

* Fix some missed changes that belong in the other branch

* Fix build of Cypress targets that use the RTOS adapter.  Make it possible to build Cypress targets in baremetal mode via CMake.

* Try and fix check failures

* Fix a couple unintentional changes
2024-07-05 01:12:21 -07:00
Jamie Smith de882e6e09
Move SPINAND flash out of the Mbed source tree (#295)
* Move SPINAND flash out of the Mbed source tree

* Also remove from drivers.json5

* Fix comment
2024-06-30 15:36:45 -07:00
Jamie Smith 02623ff442
Remove unavailable and EOLed target boards - Ambiq (#290) 2024-06-21 01:16:10 -07:00
Jamie Smith 65519018b0
Remove unavailable and EOLed target boards - Samsung (#289) 2024-06-21 00:59:59 -07:00
Jamie Smith caaafee2e7
Remove unavailable and EOLed target boards - Cypress/Infineon (#288)
* Remove unavailable and EOLed target boards - Cypress/Infineon

* Oops also update json files
2024-06-20 23:06:04 -07:00
Jamie Smith 8956a75bd9
Remove unavailable and EOLed target boards - STM32 (#287)
* Remove unavailable and EOLed target boards - STM32

* Make CI detect any missing MCU descriptions

* Oops fix CI syntax

* Aaand add those MCUs

* Also remove "orphaned" cellular modem COMPONENTs
2024-06-20 21:35:53 -07:00
Jamie Smith dfac17ba38
Reorganize targets.json5, add image URLs to all targets (#286)
* Start adding images to each target in targets.json5

* Fix a few errors

* Assign images to lots more stm32 MCUs

* Moar image URLs

* Reorganize EFM32 targets

* Add images for nrf devices

* Images for Cypress and (most) Nuvoton targets

* Fix incorrect property name

* All images added!
2024-06-19 22:47:46 -07:00
Jamie Smith 687a94b0d9
STMicro: Improve PWM resolution (#283)
* STMicro: Improve PWM resolution

* Update all objects.h, rename counts -> top_count

* Revert pin mode change, seems to be not needed
2024-06-19 17:50:31 -07:00
Jamie Smith 47ee2ce2bb
Re-add CMSIS MCU description file and a utility to manage it (#282)
* Start adding CMSIS MCU description tool

* Add 'add-missing'

* Switch MCU descriptions to JSON5

* Add new MCU after rebase

* Use virtualenv instead of APT for installing packages

* Also remove apt requirements files

* Wrong command!

* Check if index file exists before checking update time

* Respond to comments

* Make must_exist keyword only

---------

Co-authored-by: Victor Tang <me@victorwtang.dev>
2024-06-09 20:43:27 -07:00
Jamie Smith b64b6e6186
LPC1768: Rewrite I2CSlave HAL to match datasheet way of doing it (#280)
* LPC1768: Rewrite I2CSlave HAL to match datasheet way of doing it

* Style and doc fixes
2024-05-23 23:12:10 -07:00
Jamie Smith 87bc6de65a
Add Arduino Nicla Sense ME support (#271)
* Port over Nicla Sense ME arduino target

* Re-add button1

* Fix missing licenses, fix I2C assignment, fix LoRa module descriptions
2024-05-16 01:12:55 -07:00
timIdeaTech 9711f6fb03
Update NUCLEO_H743ZI2.cmake (#279)
stlink-gdb-server failing to connect, add "Initializes the device while under reset condition" --initialize-reset option
2024-05-14 20:54:41 -07:00
Jamie Smith 1b60ddad31
LPC1768: Fix SPI 16-bit transfers (#277)
* LPC1768: Fix I2C pins not being open drain, fix destroying and recreating I2C making transactions fail

* bus -> peripheral

* LPC1768: Support static pinmaps

* Update ARCH_PRO pin names header to pass muster

* LPC1768: Fix SPI 16-bit transfers

* Fix merge mistake
2024-05-07 01:00:10 -07:00
Jamie Smith 94a7fbca0b
LPC1768: Support static pinmaps (#276)
* LPC1768: Fix I2C pins not being open drain, fix destroying and recreating I2C making transactions fail

* bus -> peripheral

* LPC1768: Support static pinmaps

* Update ARCH_PRO pin names header to pass muster
2024-05-07 00:25:22 -07:00
Jamie Smith 6ae571d0f0
LPC1768: Fix I2C pins not being open drain, fix destroying and recreating I2C making transactions fail (#275)
* LPC1768: Fix I2C pins not being open drain, fix destroying and recreating I2C making transactions fail

* bus -> peripheral
2024-05-07 00:13:20 -07:00
Jamie Smith a40e8198d0
Fix PWM API for reading period and pulsewidth on LPC1768 (#274)
* Fix PWM API for reading microseconds on LPC1768

* Fix semihosting related compile errors, fix pwm deinit

* Fix some mistakes, fix PWM frequency adjustment

* Fix a few more issues
2024-05-03 00:40:48 -07:00
Wang Xu cd37bf47d5
Adding NUCLEO-U545RE-Q and NUCLEO-U5A5ZJ-Q support, with some changes to stm_dma_utils (#273)
* added an option "QSPI_OSPIM_IOPORT_HIGH=1" to allow using the high IO ports (IO 4~7) of an OSPI peripheral to drive a QSPI device
updated STM32U5 firmware package to support STM32U5F/G devices
STM DMA Utils: added stm_get_dma_instance, stm_set_dma_link, stm_get_dma_link for working with DMA code in external libraries

* added NUCLEO-U545RE-Q and NUCLEO-U5A5ZJ-Q
USB is not supported yet

* added missing USART6 handlers for STM32U5

* changed PA_2_ALT0/PA_3_ALT0 in UART pinmap back to PA_2/PA_3 for NUCLEO-U545RE-Q

* renamed stm_get_dma_link to stm_get_dma_handle_for_link
renamed stm_set_dma_link to stm_set_dma_handle_for_link
added option "qspi_ospim_ioport_high" for MCU_STM32U5
implemented SetSysClock_PLL_HSI for NUCLEO-U545RE-Q and NUCLEO-U5A5ZJ-Q
made PLL_HSI the default clock source for NUCLEO-U545RE-Q and NUCLEO-U5A5ZJ-Q

* changed clock sources of NUCLEO-U545RE-Q and NUCLEO-U5A5ZJ-Q back to PLL+MSI
embedded LICENSE file into every source file in the STM32U5 firmware package
2024-05-03 00:39:59 -07:00
Jamie Smith e8b6238672
Some fixes for Teensy4 (#272)
* Fix teensy4 build

* Try and fix SCLK clock period issue for MIMXRT, add additional SPI pinmappings

* Add full UART pinmapping

* Make more robust to calling spi_format() after spi_frequency()

* Fix style

---------

Co-authored-by: Jamie Smith <jsmith@relativityspace.com>
2024-04-27 10:10:28 -07:00
Jamie Smith 3fcfbbdb57
Fix some issues with building on K64F, add K64F upload methods (#267)
* Fix some issues with building on K64F, add K64F upload methods

* Add Mbed upload method

* Fix pin validate test

* Also install json5

* Fix incorrect COMPONENT_SD config
2024-04-16 19:44:02 -07:00
Jamie Smith acfd341a16
Updates to targets JSON and related stuff for the website generator (#265)
* Various updates to support targets & drivers site generation

* Add regression test for python code, add links to README

* Don't need to duplicate device_name

* Fix typo and some extra commas

* Rephrase docs
2024-04-09 18:37:39 -07:00
Jamie Smith fbaec0c739
Fix STM32H7 LPUART clock source being incorrect for higher baudrates (#263)
* Fix STM32H7 LPUART clock source incorrect for higher baudrates

* Add comment
2024-04-04 21:04:24 -07:00
Jamie Smith 8926deb711
Fix clocking configuration issues on STM32H7x processors (#262)
* Fix NUCLEO_H743ZI clock config not enabling overdrive mode

* Update most STM32H7 devices to new clocking configuration

* Fix ADC clock for old chip revs

* Fix CAN clock, finish clocking for 280MHz devices

* Fix a few typos and such

* A few more targets.json tweaks

* Fix comma
2024-03-28 09:36:36 -07:00
Jamie Smith 2deef5a681
Bugfix: Only link mbed-wifi if it exists for this target (#252) 2024-02-20 20:56:10 -08:00
Jamie Smith e6a63d9623
Document remaining features and components (#249) 2024-02-18 12:20:55 -08:00
Jamie Smith 7501ee7fc9
Document and clean up wifi and LoRa modules, add ability in Python to get non-public targets (#247)
* Add a way to get target attributes for non public targets

* Document all WiFi and LoRa modules

* Fix some errors

* Fix another CMake error
2024-02-11 14:19:17 -08:00
Jamie Smith f19273aa7a
Begin documenting Mbed OS target features and components (#240)
* Start on documenting features and components

* Missed some renames

* Go through all cellular and 802.15.4 modules

* Fix build

* Fix style

* Update copyright year
2024-02-08 22:46:20 -08:00
Jamie Smith 031d274c62
Fix some upload and test issues, especially for LPC1768 (#231)
* Fix USB instructions for Ubuntu, fix greentea compile failure for devices without TRNG

* Don't compile device key without COMPONENT_FLASHIAP

* Fix some upload issues for LPC1768

* Oops don't commit cmake variants

* Don't build connectivity-netsocket-tls without TRNG support
2024-01-30 09:41:32 -08:00
Sam Lefebvre 033058a085
Add target hse u575xg (#218)
* Definition added for hse and msi pll

* Updating rom and ram size

* Adding target MCU_STM32U575xG
2024-01-21 01:06:28 +01:00
Jamie Smith f42c322425
[draft] Don't reset the RTC time from gettimeofday(), plus other RTC cleanups (#210)
* RTC related cleanups, including not resetting the RTC time from gettimeofday()

* Update readme about STM32 clocking

* Oops, fix git issue
2024-01-19 14:57:58 -08:00
JohnK1987 ca8b6cb609
Update STM32_gen_PeripheralPins.py (#217)
Protection against using python version older than python3+
2024-01-19 12:50:13 -08:00
Jamie Smith 7edab2d1ce
Add upload methods for NUCLEO_H723ZG (#209)
* Add upload methods for NUCLEO_H723ZG

* Oops fix comment

* Also fix another comment
2024-01-17 01:22:09 -08:00
Jamie Smith 73b0306230
Increase RPi Pico PWM range and resolution to the max supported by HW (#203)
* Attempt to increase RPi Pico PWM range and resolution to the max supported

* Fix copyright for pwmout_api.c

* Fix ADC implementation so it works!  Fixes incorrect return type, adds +1 to top_count, fixes missing pwm_config_set_wrap() call.

* Revert printf change in this PR
2024-01-16 08:33:59 -08:00
Jamie Smith 699437ecf9
Allow Mbed CE to be built as an Arduino core (#206)
* Various changes for Arduino core support

* Apply Arduino Mbed TLS patches

* Apply linker script patch, add missing CXX standard

* Fix SDBlockDevice compile error, fix "no rule to make mbed-target-config.h"

* Fix missing source file for RPi Pico

* Fix missing licenses
2024-01-13 10:01:45 -08:00
Jamie Smith c1effb15ec
Enable RPi Pico's optimized ROM floating point routines (#202)
* Enable RPi Pico's optimized ROM floating point routines

* Add license header
2024-01-06 00:16:01 -08:00
Jamie Smith 69d95b598a
Make DMA SPI driver aware of CPU cache, fix data corruption and other SPI issues on STM32H7 (#199)
* Handle cache alignment in DMA SPI driver

* Fix build on cache-less devices

* Fix a couple things I missed

* Run formatter, improve CacheAlignedBuffer docs

* Add missing license identifiers to source files

* Make CacheAlignedBuffer heap-allocatable, try and add exclusion for Nordic license in scancode_evaluate.py

* Formatting, docs, revert accidental change

* Update code blocks to pass spell checker
2023-12-19 10:21:47 -08:00
Jamie Smith d9676cccca
Fix STM32 I2C v2 async transfer not doing a repeated start (#197)
* Fix STM32 I2C v2 async transfer not doing a repeated start

* Clarify docs
2023-11-21 20:38:36 -08:00
Jamie Smith 28815b13d3
DMA SPI support for STM32 devices (#162)
* Start on STM32 DMA SPI

* Update all objects.hs, add interrupt function

* Initial DMA code should be ready to test out...

* Fix SPI interrupt-mode IRQ handlers, add SPI::transfer_and_wait

* Fix CMake error when building for STM32WL processors

* Now builds on all STM devices!

* Properly support STM32U5 / DMA IP v3

* Start on STM32F4 support, fix hardfault on IP v1 and v3 due to incorrect indexing

* Fix Rx-only transfers, add abort code, fix incorrect channel assignments for DMA IP v1 devices

* Start on STM32H7 SPI DMA

* Fixes for H7: Correctly manage data cache, keep SPI ISR enabled

* Implement DMA SPI header constants for all remaining STM32 families.  Also add support for freeing DMA channels

* Try and fix build on STM32G0

* Fix build on STM32G0

* Add SPI_32BIT_WORDS label, start on fixing SPI docs

* SPI: Implement reference counting so that DMA channels get freed properly

* Fix issue where SPI data could get corrupted (by TI mode turning on) depending on memory layout (if your spis pointer & 0x10 was nonzero)

* Mark DMA channels as unallocated when SPI bus is freed

* Simplify spi_abort_asynch()

* Fix some rebase issues, fix failing to allocate DMA channel on STM32U5

* Fix DMA getting stuck on STM32F4, F7, and F2
2023-11-02 20:16:45 -07:00