Commit Graph

2657 Commits

Author SHA1 Message Date
Karl Palsson 64893177ed doc: stm32f3: rcc: add groupings for periph resets 2019-06-12 22:56:38 +00:00
Karl Palsson 5ba8d94b81 doc: stm32l4: rcc: add groupings for periph resets
As we did with f2, use a parent grouping to contain the different sets
of APB1 fields.
2019-06-12 22:56:38 +00:00
Karl Palsson e6e1c239e4 doc: stm32l0: rcc: add groupings for periph resets 2019-06-12 22:56:38 +00:00
Karl Palsson da3466057b doc: stm32f2: rcc: add groupings for periph resets
We use a parent grouping to make the generic "AHB" groups work, even
though F2 and many later families have AHB1, AHB2 and AHB3
2019-06-12 22:56:34 +00:00
Karl Palsson 21a0c1178c doc: stm32l1: rcc: add groupings for periph resets 2019-06-12 21:56:13 +00:00
Karl Palsson c7ce1ddd1a doc: stm32f0: rcc: add groupings for periph resets
As done earlier for other families, makes the doxygen linking working
properly.
2019-06-12 21:56:13 +00:00
Karl Palsson c9d45e0e2c doc: stm32: move RCC to peripheral api style
For f7, it was completely missing doc markers
2019-06-12 21:56:09 +00:00
Karl Palsson b4b2a2101c doc: nvic: generate a discoverable link name
The nvic_ functions all had a broken link to an f1 list of irqs.  Change
the header generator to generate a fixed name, and link to them.
Because of their scoping, this ok, they find the correct family's irq
definitions.
2019-06-10 11:17:41 +00:00
Karl Palsson ce5d1ca9a2 doc: restore targets as pages.
You can't have two mainpage items, and the second was just being
ignored.  This restores them, which makes the left side list longer,
which we may or may not like, but it's at least how it was documented to
be.
2019-06-10 11:10:34 +00:00
Karl Palsson d66c8677df doc: fix example syntax
@example is for including a file containing the example code.
2019-06-10 10:59:54 +00:00
Karl Palsson 9e42251d6f doc: properly define ARM_ARCH_xxx
Requires a little stub file per target, so we can neatly define the
architecture.  This properly includes all the cortex m core
documentation finally.
2019-06-10 10:33:34 +00:00
Karl Palsson d88d6fde12 cm3 systick: fix doxygen syntax
Makes links works, avoids warnings.
2019-06-08 11:46:30 +00:00
Guillaume Revaillot b7fc86c72d doc: oops, no need to call sed -s, unbreak make doc on os x
Not sure how/why i pushed thqt, absolutely no need to call sed with -s
parameter. Fix build on os x / systems running non gnu sed.
2019-06-08 11:36:56 +00:00
Karl Palsson 8183d4efa3 swm050: add back into doc generation?
Not sure where this went.  I was building docs for it to make the
doxygen work, but then, it's not here?!

Anyway, here now :)
2019-06-08 11:36:22 +00:00
Karl Palsson 7be50a5e75 make: use $(PREFIX)gcc instead of $(PREFIX)-gcc
The leading - makes it rather inconsistent with the majority of other
projects around the world.  Use the form everyone else uses.
To solve this, properly pass prefix to inner makes as was always
intended.

Fixes: https://github.com/libopencm3/libopencm3/issues/1058
2019-06-07 21:25:46 +00:00
Karl Palsson 795fe21860 usbd: document that only 8 eps are allowed.
The internal stack has a hard internal limit of 8, which is as many as
all supported devices support, but not as flexible as the arbitrary
addressing that USB actually allows.

At _least_ document this.

Fixes: https://github.com/libopencm3/libopencm3/issues/666
2019-06-05 21:48:28 +00:00
Karl Palsson 1e3741cb20 swm050: doxygen fixups
* Include the doc-swm050.h core file that defines the base groups.
* Fix/tweak groupings to make things consistent with other targets.
* Drop redundant type information.  That's all included from the function
signatures automatically by doxygen.
* Added register descriptions from datasheet.
2019-06-05 21:31:56 +00:00
Icenowy Zheng 54eff24e7c swm050: new MCU family
SWM050 is a series of MCU made by Foshan Synwit Tech. It contains a
Cortex-M0 CPU core, 8KiB of Flash and 1KiB of SRAM. The only peripherals
are GPIO, Timer and WDT. There's only two parts in this series, with
either TSSOP-8 or SSOP-16 packages.

This commit introduces the interrupt vector and GPIO support for them.

Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
2019-06-05 20:25:43 +00:00
Guillaume Revaillot a652856533 stm32l0: rcc: add rcc_set_peripheral_clk_sel(periph, sel) 2019-06-03 22:29:45 +00:00
Guillaume Revaillot 8668f9198b stm32l0: rcc: add peripherals clock source selection helpers. 2019-06-03 22:29:45 +00:00
Guillaume Revaillot 6953138a28 stm32l0: add rcc_set_msi_range. 2019-06-03 22:29:45 +00:00
Karl Palsson 9051480e7f irq2nvic: support V=1 make style to see the actual commands. 2019-06-03 22:29:25 +00:00
Karl Palsson d0c3678f74 stm32l4: rcc: drop bad function prototype
This was introduced by a bad merge/rebase leaving a dangling header
definition.

Fixes: b8424263 stm32:l4: rcc: Add RTC clock functions
2019-06-02 22:27:15 +00:00
Sean Cross b805db0444 efm32: cmu: support switching HFCLK to USHFRCODIV2
Allow for the high frequency clock that controlls things such as the
main CPU to be switched over to USHFRCODIV2.  This is a 24 MHz PLL
that is trimmed using clock recovery from the USB signal, and is
accurate to within 1% of 24 MHz.

Signed-off-by: Sean Cross <sean@xobs.io>
2019-06-02 22:23:44 +00:00
Sean Cross 065e0412ec efm32hg: cmu: add USHFRCODIV2 clock definition
This clock is the USB High Frequency PLL that gets trimmed based
on clock recovery.  It is the most accurate PLL on the system,
assuming it is connected via USB.

Add the definition of this clock in preparation for being able
to switch to it.

Signed-off-by: Sean Cross <sean@xobs.io>
2019-06-02 22:23:44 +00:00
Bruno Randolf 53ce5aa3dd stm32:l4:flash: Fix option bytes programming
FLASH_CR_OPTSTRT needs to be written to FLASH_CR, and there is no reason
to mask the last two data bits.

Signed-off-by: Bruno Randolf <br1@einfach.org>
Reviewed-by: Karl Palsson <karlp@tweak.net.au>
(original code appeared to be badly copied from the flash_common_f24 codebase)
2019-06-02 22:18:14 +00:00
Bruno Randolf 833ddd9b0a stm32: rtc: clear wakeup clock selection
Clear wakeup clock selection before setting the desired bits, so no
old bits can stay set

Reviewed-by: Karl Palsson <karlp@tweak.net.au>
2019-06-02 22:18:05 +00:00
Bruno Randolf b8424263e8 stm32:l4: rcc: Add RTC clock functions 2019-06-02 22:18:05 +00:00
Bruno Randolf 2c1823f7bb stm32:l4: pwr: Add en/disable_backup_domain_write_protect() 2019-06-02 22:18:05 +00:00
Bruno Randolf a1f58ea8ae stm32:l4: Add interrupts for STM32L4x5/STM32L4x6
Add all interrups from RM0351
2019-06-02 22:18:05 +00:00
Bruno Randolf fe722d4643 stm32:l4: rcc: Add helper functions
Add functions for PLL output and 48MHz clock source selection
2019-06-02 22:18:05 +00:00
Bruno Randolf a1ffdc59f0 stm32:l4: flash: Program in double words
According to RM0351 and RM0394 flash needs to be programmed by double words.
Also fix flash_program() which was wrong anyways.

Reviewed-by: Karl Palsson <karlp@tweak.net.au>
2019-06-02 22:17:55 +00:00
Karl Palsson 49a3cddba0 stm32f4:rcc: add new api directly to deprecated message
This makes the compiler warnings more useful.
2019-06-02 20:36:57 +00:00
Karl Palsson f990030440 stm32f4: rcc: move deprecated attribute to header
This makes it actually generate deprecated warnings.  The deprecated
doxygen stays with the .c file as before.
2019-06-02 12:50:34 +00:00
Karl Palsson a9dde2832e stm32f4: rcc: drop 48 & 120 MHz configs
48Mhz has no purpose other than to be a naiive method of haivng working
USB.  120MHz never had any purpose, other than to match the f2 code it
was copied from.  Drop them both.  Remaining configs are all max speeds
for various F4 parts.  Lower speeds are all custom
2019-06-02 10:50:10 +00:00
Miguel Sánchez de León Peque 1d68c299e8 stm32f4: add HSI clock configurations 2019-06-02 10:39:18 +00:00
Miguel Sánchez de León Peque ca6dcfbea1 stm32f4: rcc: support hsi pll source 2019-06-02 10:38:43 +00:00
Matthew Lai eed780e2c1 stm32f7: irqs: Fix typo in i2c4*
This also unifies the whitespace in the file.

Reviewed-by: Karl Palsson <karlp@tweak.net.au>
2019-05-26 21:34:08 +00:00
Karl Palsson f700781975 genlinkk-config: fix missing .a suffix
Fixes: 96d094af13 mk/genlink-config: provide LIBNAME in devices autogeneration

The initial fix had fixed the examples repo, but broke the tests and the
template repo.  Restore the suffix properly.
2019-05-25 21:28:04 +00:00
Karl Palsson 96d094af13 mk/genlink-config: provide LIBNAME in devices autogeneration
This makes the generic rules workk happily regardless of whether the
linkerscript generation is being used or not.

Notably, in the examples repo, use of the linker script autogeneration
was retriggering library builds as LIBNAME was unset and therefore the
libraries lib<blank>.a couldn't be found.
2019-05-22 12:09:35 +00:00
Oliver Meier 5853678003 .gitignore: ignore autogenerated include/libopencmsis/gd32/ 2019-05-22 00:23:57 +00:00
Karl Palsson f2a9980638 stm32: doc: rtc: move to peripheral apis
Drop some dummy.c files, add some missing groupings and make sure all
specifics are included in the generated output.
2019-05-22 00:16:40 +00:00
Karl Palsson 0aef9c2ec6 stm32: doc: pwr: move to peripheral_api
Some families had partially moved to peripheral api, and others were
only documenting common code, but not specific code.  Delete dummy .c
files, and check that all specific apis are also being documented, not
just common apis.
2019-05-22 00:10:39 +00:00
Karl Palsson c557ef96f9 stm32f7: doc: adc: fix copypasta doxygen error
Was attempting to run add to the f4 docs, which aren't referenced from
the f7 doxygen build, obviously.
2019-05-21 23:45:47 +00:00
Karl Palsson 2bed518f09 stm32f7: doc: flash defines weren't grouped at all 2019-05-21 23:45:34 +00:00
Karl Palsson da76279bc6 stm32: flash: move to peripheral_apis
Change the groupings and headings to make them all consistent.
2019-05-21 23:41:21 +00:00
Karl Palsson 1001a9323b stm32: doc: dma: move to peripheral_apis
drops dummy .c files, and adds proper groupings to the shared files.
2019-05-21 23:27:21 +00:00
Karl Palsson 9382042180 stm32: doc: move timer to peripheral_apis
Drop all the dummy timer.c files, and _actually_ compile the L1 specific
file that was dropped by accident in 5b8953124e in 2013!
2019-05-21 23:17:04 +00:00
Karl Palsson 1e06c48201 stm32l1: timer: fix typo in option mask definition
Found while exploring documentation generation
2019-05-21 23:17:04 +00:00
Karl Palsson 508f8d9487 stm32: doc: gpio: move gpio to peripheral_apis
Drops dummy gpio.c files that weren't even being compiled in some cases.
2019-05-21 23:16:59 +00:00