Commit Graph

1545 Commits

Author SHA1 Message Date
Karl Palsson
ed2aada3e8 doc:stm32f4:pwr: link more doxygen
f4 extensions weren't being included in generated documentation.
2021-11-10 20:36:29 +00:00
Dima Barsky
3e480eecae stm32f4: pwr: add missing bits
Extra bits have these names per RM0430 at least.
Reviewed-by: Karl Palsson <karlp@tweak.net.au>
2021-11-10 20:21:21 +00:00
Luna Gräfje
9fb39ed743 stm32l4: define CAN2 address and RCC bits 2021-11-03 16:04:29 +01:00
Tim Børresen
f5813a547a stm32f4: rcc: F411: support Full speed with usb.
F411 parts, found on "black pill" boards support 100MHz operation,
but only 96MHz with USB.  Provide default clock structures for this
common max speed.

Reviewed-by: Karl Palsson <karlp@tweak.net.au>
2021-09-27 10:42:24 +00:00
Bastian de Byl
6763681c26 STM32: Fixed ltdc_setup_windowing helper 2021-08-14 21:44:10 +00:00
Karl Palsson
2483e2e358 stm32f1:gpio: docs: clarify more AF remaps 2021-07-17 23:06:09 +00:00
Mikael Lövqvist
eb52a1a1fb stm32f1: gpio: Fixed misleading comments on AFIO remaps
Added some explantory text to some of the remap options.
2021-07-17 23:05:22 +00:00
Stephen Holdaway
3ab83bc078 stm32g0: Support DAC
Nothing extra needed to be defined here - this might've just been missed
when adding STM32G0 support. Tested and works well on an STM32G051. Registers
in `stm32/common/dac_common_v1.h` match the STM32G0x1 reference manual.
2021-07-01 22:05:41 +00:00
Eduard Drusa
e9c68ff9e8 Fix STM32H7 FDCAN FIFO acknowledgment process
Fix FDCAN FIFO acknowledge register definition to make it correct for H7
MCUs. Previous definition contained hardcoded offset instead of using
MCU-specific macro.

Fix incorrect decoding of buffer element size. During decoding, value
returned was erratically set to 7 instead of setting 4th LSB. Buffer
element size was then always reported as 15 bytes.
2021-07-01 22:02:44 +00:00
Eduard Drusa
1033131eb7 Fix #1328: Make error return codes negative values
Fix the bug where certain functions were returning meaningful return
and/or error code, where positive values of error codes were interfering
with meaningful return value. Error codes now have negative values as it
was originally intended but never implemented.
2021-07-01 21:45:52 +00:00
Karl Palsson
777505a9b4 stm32f3: rtc: fix missing top level include.
Fixes: https://github.com/libopencm3/libopencm3/issues/1341
2021-05-26 09:56:22 +00:00
Karl Palsson
44928416ea include: opencmsis: fix typo, add missing entries
libopencmsis is effectively unmaintained, but we can fix little things I
guess.

Reported-by: https://github.com/libopencm3/libopencm3/pull/1332
2021-04-28 14:55:03 +00:00
Karl Palsson
4f71527881 stm32l0: add missing base addresses for usart4/5, gpioe
Reported-by: massic@irc
Fixes: 623fabca5f when we initially added these extra periphs
2021-04-28 10:35:27 +00:00
Matthijs Kooijman
fe52fcdb1a stm32: Define FLASH_BASE and PERIPH_BASE for all families
FLASH_BASE was already defined for some and PERIPH_BASE for all but one,
but this makes these available for all families. Note that the value is
identical for all familes (I doublechecked the more exotic ones such
STM32H7), but it is still useful to have these defines to make code more
readable and so that libopencm3 users can write portable code without
having to check that these are identical on all STM32 families.
2021-04-24 19:09:33 +02:00
Karl Palsson
504dc95d9b stm32:fdcan: fix doxygen warnings
Added some descriptions for missing parameters, (hopefully) clarified
some along the way.  Fixed all can related warnings in doxygen logs.
Added doxgen tags where meaningful comments had been provided.  Dropped
redundant comment separators.
2021-04-16 12:38:31 +00:00
Eduard Drusa
32354846bd STM32H7: Implement basic FDCAN support
Add stm32h7 support for FDCAN peripheral. Source level compatibility is
provided with stm32g4. Additional features of stm32h7 such as
configurable buffers are supported. Implementation offers feature parity
with stm32g4 implementation.
2021-04-16 11:47:02 +00:00
Bastian de Byl
0d72e6739c stm32 added better RTC periph API functions
Originally tracked at https://github.com/libopencm3/libopencm3/pull/1319
2021-03-25 21:11:07 +00:00
Karl Palsson
dc6ebac841 stm32h7: fix typo in fdcan2_it1 irq definition
reported by Ventyl on irc.
2021-03-25 21:05:02 +00:00
Eduard Drusa
458250dc61 STM32G4: Add support for FDCAN
Add stm32g4 support for FDCAN peripheral. Normal / FDCAN operation
supported, bitrate switching and filtering supported via API.
Timestamping and transmit event buffer support in API are TBD.

Originally tracked as: https://github.com/libopencm3/libopencm3/pull/1317
Reviewed-by: Karl Palsson <karlp@tweak.net.au>
2021-03-16 20:46:15 +00:00
Jean THOMAS
a9cc695381 stm32: i2c: Use const qualifier for read-only pointer in i2c_transfer7 2021-02-26 13:07:20 +00:00
Marek Koza
b4c03a840d stm32: rtc-v2: Fix ADD1S bit definition in the RTC SHIFTR register 2021-02-23 09:27:16 +00:00
Karl Palsson
aeb3cee023 stm32h7: document optional parameters
Provide linking and explanations of optional values
2021-02-04 10:02:06 +00:00
Brian Viele
c2dbea012b stm32h7: Updated pwr and rcc configs to support devices with SMPS.
Worked in nuances for differences between versions of STM32H7 devices, such as
handling of ODEN, explicit SCUEN bit, and different VOS mappings. This has
been validated on the STM32H7A3 and STM32H743 MCUs.
2021-02-04 09:43:47 +00:00
Karl Palsson
7b88c2d9d2 samd: doc: links and spelling
Fixes all doxygen warnings for samd. yay
2021-02-03 23:23:30 +00:00
Karl Palsson
458a0553a8 samd: overhaul doxygen 2021-02-03 23:23:28 +00:00
Gwenhael Goavec-Merou
d11680638b sam:d: port: complete port (define, configuration and access) 2021-02-03 22:30:07 +00:00
Jacob Potter
5b9b784b30 cm3: scb: add Cortex-M7 cache registers and bits
Cortex-M7 supports a D-cache and I-cache on the AXI bus, controlled by these bits in SCB.
2021-02-03 22:17:21 +00:00
Karl Palsson
8722a03e2f stm32: enable quadspi for f7/g4/l4
Seeing as we'd started it, might as well finish enabling all the common
platforms.
2021-01-29 14:03:46 +00:00
Karl Palsson
ca479ad7d2 stm32: quadspi overhaul documentation
Provide all doxygen framework boilerplate.
Provide a very initial stub .c file to ensure that heirarchical headers
are pulled in properly.
2021-01-29 13:00:53 +00:00
Karl Palsson
2daef7c3ec stm32h7: enable quadspi includes
Fixes: fcb030cc883ca14 which left off the include header.
2021-01-29 13:00:49 +00:00
Karl Palsson
c02ccfe47e stm32: quadspi: restore copyright after file move
The f4 quadspi implementation was moved to the -v1 file, so the
copyright should have moved with it.
2021-01-29 13:00:49 +00:00
Matt Walker
0cf8a47d88 STM32H7: Add QSPI Defines
Move the STM32F4 QuadSPI peripheral defines to the common folder as the
F4 and H7 variants of the IP share almost all the same bits. For those
bits that are separate put them into their own headers.
2021-01-29 13:00:49 +00:00
Karl Palsson
7df670b6aa stm32: usart: fix doxygen for h7 at least
The usart_common_fifos uses a very nice style of docs in the headers, so
inline help works in some editors, without having to have the source of
the library available as well.  However, it means that the group
definition with the name doesn't appear until later, and then the title
is ignored.  Move the description to the header definition instead.
2021-01-29 13:00:49 +00:00
Karl Palsson
bcccfc4a63 stm32h7:doc: eliminate some doxygen warnings. 2021-01-28 00:32:47 +00:00
Karl Palsson
7f74d92e34 stm32:dac:doc: clarify availability on part families 2021-01-27 23:50:22 +00:00
Karl Palsson
0f1f1ebd1a stm32:dac: Fix waveform generation apis
These were broken earlier, with no sane way of passing in correctly shifted
values, and didn't match examples.

Noticed while merging: https://github.com/libopencm3/libopencm3/pull/1281
2021-01-27 23:50:22 +00:00
Karl Palsson
8295d248e0 stm32:dac: new api for waveform characteristics
Old API required users to manually construct bit maps frm opaquely named
defines, with little help.  It also was a pure OR operation, with no way
to ever clear bits.

Signed-off-by: Karl Palsson <karlp@tweak.net.au>
2021-01-27 23:50:15 +00:00
Karl Palsson
da9db7f1f5 stm32:dac: fix doxygen tags on v2
Trivial copy paste error.
2021-01-26 22:33:33 +00:00
Stijn Martens
f9d5fb738e stm32: usart: add idle interrupt enable/disable 2021-01-26 10:43:23 +01:00
Karl Palsson
4fe5103851 stm32: dac: doxygenize the registers and values
Not 100% complete, but far closer, mostly just tagging the existing
information properly to get it included.
2021-01-24 22:08:20 +00:00
Karl Palsson
03cfd6b1ac stm32: dac: doxygen grouping for register bases 2021-01-24 21:38:50 +00:00
Karl Palsson
fda0282b43 stm32f0: dac: drop redundant definitions
we're breaking the DAC api already, so don't bother keeping f0 specific
aliases for some of the t1 triggers.
2021-01-24 21:36:21 +00:00
Ben Brewer
1ebf172bcb stm32/dac: Update API to support multiple DACs and add v2 support 2021-01-07 15:30:51 +00:00
Kejia Hu
52781dee56 stm32g4: add SPI
The SPI peripheral on G4 is identical to F3, this patch copies the
header files directly from F3
2020-12-11 11:15:02 +00:00
Karl Palsson
a499ea3480 stm32: timer/dmamux: fix broken includes
bad Karl, you can't just _start_ using pragma on common files, and
expect it to keep working.  Just finish, convert them fully to pragma.

pros: no more weird @cond boilerplate mess and trailing #endifs. easier
to follow
cons: no warning for people who deliberately try and include things in
bad orders.
2020-12-10 23:00:11 +00:00
Karl Palsson
1abb945dcd stm32f7: flash: doxygenize existing comments.
Just putting it in a different place and it all gets included in the
output nicely.
2020-12-10 22:26:05 +00:00
Karl Palsson
97d5e9a403 doxygen: fix more broken groupings 2020-12-10 22:25:51 +00:00
Karl Palsson
992a4d3753 stm32: rtc: doxygenize existing docs
Might as well show the information we have!
2020-12-10 22:00:03 +00:00
Karl Palsson
e07f23bb70 doxygen: fix many warnings on "end of file while in group" 2020-12-10 21:51:48 +00:00
Karl Palsson
6f81e49290 stm32:crc: simplify doxygen and fix groupings
The @cond stuff has always been a lot of work for the rare cases of
people trying to include things by hand.  Just drop it
2020-12-10 21:34:49 +00:00