Commit Graph

2806 Commits

Author SHA1 Message Date
Karl Palsson
9209bde784 devices.data: drop invalid TI board name part.
As pointed out, this is not an actual part number, but a board id.
2022-04-13 20:24:18 +00:00
Karl Palsson
c1e4107007 lm4f: fix more typos 2022-04-13 20:23:41 +00:00
Stefan Tauner
5bcf2a0c35 stm32l4: fix various problems with rcc_get* functions
- rcc_get_i2c_clk_freq: Add support by taking RCC_CCIPR2 into account for I2C4.
 - rcc_get_timer_clk_freq: Add support for LP timers
 - rcc_get_usart_clk_freq: Fix APB freq used for LPUART1 and UART1, respectively.
2022-04-13 20:22:47 +00:00
Stefan Tauner
a6927e410c treewide: Fix some typos 2022-04-13 20:22:24 +00:00
Stefan Tauner
93e0ccaf26 devices.data: add TI Cortex M4 chips except MSP432
Based on the following chip selection guides:
 - https://www.ti.com/lit/spmt285 (TM4C)
 - https://www.ti.com/lit/spmt273 (LM4F)
2022-04-13 20:22:24 +00:00
Stefan Tauner
778318c307 ld: add symbols for starts and ends of all regions
This makes the boundaries accessible from within the code,
e.g., to set up the MPU.
2022-04-07 02:35:19 +02:00
Stefan Tauner
20c0cfb650 ld: fix typo in ram5 definition 2022-04-07 02:35:19 +02:00
Eduard Drusa
66bf499e1b NRF5x: I2C EasyDMA support for NRF5x, extended API
This commit adds support for NRF52 TWI Master mode and slightly extends
existing I2C API. This is a breaking change, while mode selection needs to be
done during enabling I2C. There is one additional breaking change done because:
1) Unicore MX API design was PITA for writes
2) It is incompatible with EasyDMA

I strongly apologize to all two users who might be affected by this change.
2022-04-05 15:40:44 +00:00
Eduard Drusa
458766398f NRF5x: Enable generation of Doxygen docs
Add NRF51 and NRF52 into list of targets Doxygen docs are generated for.
Fixes missing documentation.
2022-03-31 11:24:59 +02:00
Karl Palsson
c78007338e stm32l: lptimer: stylecheck 2022-03-08 20:57:20 +00:00
Karl Palsson
bef7df02b0 stm32h7: rcc: stylecheck fixes 2022-03-08 20:57:20 +00:00
Karl Palsson
f92a52bef5 stm32g0: rcc: fix i2s1 clksel definition
Stylecheck uncovered a bad define.
2022-03-08 20:57:20 +00:00
Karl Palsson
c13ad2fce4 stm32g0:adc: stylecheck 2022-03-08 20:57:20 +00:00
Karl Palsson
bb31308bc7 stm32: hrtim: stylecheck cleanup 2022-03-08 20:57:20 +00:00
Karl Palsson
c08df942d7 msp432: replace spaces with tabs: stylecheck 2022-03-08 20:57:20 +00:00
Karl Palsson
b05865a854 pac55xx: fix stylecheck warning 2022-03-08 20:57:20 +00:00
Parth Panchal
192d7fec2e stm32f1:gpio: Added missing definitions for usart1
Add missing explicit gpio definitions for remainder of usart1 signals.

Fixes: https://github.com/libopencm3/libopencm3/issues/1326
2022-03-08 20:18:54 +00:00
Marek Koza
bd4a970de9 stm32:fdcan: Fix FDCAN_FIFO_XTD bit position 2022-03-08 20:07:43 +00:00
Eduard Drusa
5c65f0f653 STM32H7: Add support for RAM4 & RAM5, cleanup
* added: Linker script adds support for RAM4 and RAM5 memory regions, so
  that those are usable by code. This also fixes the fact that RAM4 was
  declared, but inaccessible previously
* changed: RAM1 is renamed to RAM2, shifting numbering of all regions.
  This is done in order to be in line with other STM32 definitions,
  similarly ROM1 became ROM2.
2022-03-03 09:45:03 +00:00
Eduard Drusa
af3b62cc18 STM32H7: Fix FP spec
* fixed: Use correct FP spec for H7
2022-03-03 09:45:03 +00:00
Eduard Drusa
96ae7ff38a STM32H7: Add linker support for STM32H7[2345] families
* added: device data for STM32H7[2345] MCUs. CPU spec prefers presence of
  Cortex-M7 core, where Cortex-M7 and Cortex-M4 are both present
2022-03-03 09:45:03 +00:00
Keenan Tims
9a5a6a2bfd LM4F: Make SYSCTL enum definitions C++ compliant
Refactor definitions to remove pointer-to-int casts
2022-03-03 09:18:27 +00:00
Evgenii Iarkov
72d4064744 stm32/g0: rcc: Correct RCC_CCIPR_TIM1SEL_SHIFT value (20 -> 22)
Reviewed-by: Karl Palsson <karlp@tweak.net.au>
2022-02-02 12:47:18 +00:00
Karl Palsson
3f52b7784c stm32/timers: clarify "advanced timers" restriction
by making it vaguer.  These days, there's extra timers that support the
BDTR register, so the simple "advanced" timer description is no longer
sufficiently clear.  You have to check your particular reference manual.

Fixes: https://github.com/libopencm3/libopencm3/issues/1378
2022-02-01 13:15:13 +00:00
Karl Palsson
1b83a3ce47 stm32g4: pwr: Fix CR3 USB PD option bits
Presumably copy/paste error in original submission.
Verified in RM0440rev1 and rev5.

Fixes: c26eab251
Reported-by: qyx on the internet
Signed-off-by: Karl Palsson <karlp@tweak.net.au>
2022-01-22 00:06:32 +00:00
Eduard Drusa
d030a66475 NRF: fix missing .gitignore 2021-12-11 17:35:43 +00:00
mikisama
25b1e4aad9 stm32: fix typo 2021-12-07 09:41:16 +08:00
Eduard Drusa
213a6b4244 Initial merge of Nordic Semi nRF51/52 from Unicore MX back into Libopencm3
* merged: nrf tree from unicore-mx
* fixed: small changes to make merged code play with rest of locm3 again
* added: linker script generator defines for nRF51/52 stubs
* added: doxygen support

This removes code and changes names and styles where relevant to be more
inline with normal libopencm3.

NRF52x library is built for hardfloat, M4F by default.  The M4 no float
variants are less common, and if needed, the library can be built
manually for those variants.  Unless some very common boards show up
using those parts, we don't need an extra library build.

Reviewed-by: Karl Palsson <karlp@tweak.net.au>
Tested-by: Karl Palsson <karlp@tweak.net.au>
2021-12-05 16:52:36 +00:00
Will Gallia
c36a4538b0 stm32: fix typo for auto baud rate request bit in USART_RQR 2021-12-01 22:38:30 +00:00
Voronov Alexander
8f016208ea README: remove white space at end of line 2021-11-29 23:51:16 +01:00
Voronov Alexander
34eb368b29 README: added info about partial build 2021-11-29 23:51:16 +01:00
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
Karl Palsson
aab1a67344 devices.data: add more samd10 / samd20 / samd21 devices
Fill out the product lines more fully.
2021-11-09 10:12:53 +00:00
Chris Chronopoulos
474ca02a60 devices.data: add samd09?13* and samd21?18* 2021-11-09 00:25:20 -08: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
470a1394a8 doc: stm32: timer: switch f1/other example
Reported in: https://github.com/libopencm3/libopencm3/issues/1353
Fixes: d8d63b3184  (wrongly assumed existing example was for f1)

Signed-off-by: Karl Palsson <karlp@tweak.net.au>
2021-07-31 21:45:53 +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
weycen76
12da5bbd9e stm32:iwdg: reset counter after changing period.
Fix the bug that the iwdg counter is not refreshed after the configurationis complete, if this counter is not refreshed after the configuration is completed, the first iwdg counting period will be as long as 26 seconds.

Fixes: https://github.com/libopencm3/libopencm3/pull/1333
Reviewed-by: Karl Palsson <karlp@tweak.net.au>
2021-07-01 22:15:23 +00:00
Stephen Holdaway
6f9f40a7e4 devices.data: add STM32G05x and STM32G06x parts with 18K RAM 2021-07-01 22:05:52 +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
9478931d69 Fix FDCAN incorrect FIFO acknowledgment
Fix incorrect way of acknowledging FIFO processing. Old code ORed old
value of register with index of FIFO buffer just processed, which
generated invalid value for acknowledge. This caused FIFO to repeatedly
returning same content. Both fdcan_receive() and fdcan_release_fifo were
affected.
2021-07-01 21:48:12 +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
Piotr Esden-Tempski
3b89fc5999 Updated IRC channel info to libera.chat.
The IRC channel moved networks to libera.chat. See you there! :)
2021-05-27 15:50:45 -07: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