Commit Graph

1530 Commits

Author SHA1 Message Date
Karl Palsson 8c37e5cea0 stm32: crc: merge duplicate documentation
Avoids warnings from doxygen.  Leaves it purely in the headers so it's
accessible in code completion as well.
2020-01-28 22:41:14 +00:00
Karl Palsson 26d6f8f77e swm050: timer: use more standard bit definitions
We normally use periph_reg_field naming, and most of this file was
already consistent. Switch the stragglers.
2020-01-28 22:31:38 +00:00
Karl Palsson a6aecf8ccd swm050: simplify doxygen
We don't need groupings around each enum, they format nicely into a
section already.  Likewise, the doxygen _is_ documentation, so we don't
need extra versions of it in places. Also fix a few warnings generated.
2020-01-28 22:31:24 +00:00
Caleb Szalacinski f06a1ca958 SWM050: Adds the timer peripheral and updates the README. 2020-01-28 20:58:50 +00:00
Fabio Pugliese Ornellas 7daa6f15bf usb: define USB_CLASS_DFU 2020-01-12 20:31:26 +00:00
Guillaume Revaillot 64baacfbbf rng: add irq enable/disable helper. 2020-01-05 00:24:43 +00:00
Jacob Walser e2ac1a6358 stm32f3: bugfix + adjust wwdg threshold signatures to support 12 bit resolution
- these registers are 12 bits wide
- bugfix clearing thresholds so that both upper and lower thresholds can be
  configured on the **window** watchdog
2020-01-05 00:10:12 +00:00
Jacob Walser 854da9635e stm32f0: adjust wwdg threshold signatures to support 12 bit resolution 2020-01-05 00:08:48 +00:00
Jacob Walser 5409ce73bd adc_common_v2: bugfix ADC_xT1_VAL(x)
mask out bits that must not be written
2020-01-05 00:08:48 +00:00
Karl Palsson 18f4d7c1b7 stm32f3: rtc: include correct shared header
rtc_common_all never existed, and f3 has the same "v2" peripheral used
by ~all parts other than the f1.  We don't have any f3 rtc test code,
but the existing code was clearly wrong, and this is at least including
the correct basic defines.

Fixes: https://github.com/libopencm3/libopencm3/issues/1106
2020-01-04 23:13:08 +00:00
Guillaume Revaillot 9d15ac7ae7 cortex: FAULTMASK does not exist on armv6m. 2020-01-04 21:53:34 +00:00
Guillaume Revaillot db6237cd1e stm32: extract g0 exti stuff to exti_common_v2.
stm32l5 basically uses the same stuff.
2020-01-01 19:47:13 +01:00
Karl Palsson df15b263d2 usb: hid: add a stub file for doxygen
Unlike with the doxygen source generation, we can't autoguess which of
the class files are eligible automatically.  Instead, make a stub hid
file, (which we can now start adding to, if desired) and include it in
all builds that include other class stubs.
2019-12-25 21:04:17 +00:00
Fabio Pugliese Ornellas f2f5083761 usb: Add more HID Class constants 2019-12-25 20:44:46 +00:00
Karl Palsson aabd4da3c0 stm32g0: syscfg: doc: fix missing grouping 2019-12-25 20:43:02 +00:00
Guillaume Revaillot 87dbf40cde stm32g0: rcc: group rcc_registers and registers values 2019-12-25 20:34:11 +00:00
Guillaume Revaillot 48afe3ca67 stm32g0: flash: fix wrong comment. 2019-12-25 20:34:11 +00:00
Guillaume Revaillot ebd265ce42 stm32g0: rng: typo in header. 2019-12-25 20:34:11 +00:00
Guillaume Revaillot 070058f80c stm32: adc: doc fix
declare chselr group in v2 single header, where adc_chselr reg is declared
2019-12-25 20:34:11 +00:00
Guillaume Revaillot e7c8f18f7c stm32: adc: group adc_registers 2019-12-25 20:34:11 +00:00
Karl Palsson 86b4cf6787 stm32h7: fix typo in doxygen description 2019-12-25 20:30:17 +00:00
Brian Viele aabefeac92 stm32h7: usart: support new fifo features
Supported by H7 and G4 varieties at present.
2019-12-25 20:29:24 +00:00
Karl Palsson fa3c1df6f5 pac55xx: fix up and simplify some doxygen 2019-12-25 13:44:49 +00:00
Brian Viele a3406f100b pac55xx: gpio: Initial Implementation of PAC55xx GPIO Driver
* Conforms mostly to the STM32 GPIO API where possible.
* Supports pin configuration (direction, pull-up/down, etc.) as well
  as pinmux configuration.
* Supports set/clear/get operations to the GPIO port/pins.
* Created base doxy header and groups to align with existing formatting.
2019-12-25 13:44:35 +00:00
Mathias Nord 9af9a1dbfa stm32g0: use spi v2 2019-12-03 14:45:47 +01:00
Karl Palsson af384dbc7c doc: fix some broken groups uncovered while reviewing h7 code 2019-11-28 22:16:54 +00:00
Karl Palsson af8a1773b7 stm32h7: doc: fix some missing group definitions 2019-11-28 22:16:34 +00:00
Brian Viele 53302439df stm32h7: Initial introduction into libopencm3.
Updates to a base set of includes to map to the h7 include files which are
mainly based on the f7 versions for simple devices (e.g. SPI, USART, GPIO).

Custom files that have been implemented from the datasheet/ref manual include
the memory map, RCC, PWR definitions, and irq.json file for generation of
nvic files for interrupt mapping.

Additional functionality, especially PLL and tweaks for non-F7 compatible
implementations coming in future commits.

Added documentation tree configuration.

Reviewed-by: Karl Palsson <karlp@tweak.net.au>
Changed dmaX_streamX to dmaX_strX in a few places for consistency
2019-11-28 22:15:24 +00:00
Karl Palsson da0c6a6724 swm050: wdt: doxygen polish 2019-11-28 11:43:01 +00:00
Caleb Szalacinski 47b59e2df4 swm050: Adds WDT peripheral
Reviewed-by: Karl Palsson <karlp@tweak.net.au> (Fixed an &| in
wdt_set_time)
2019-11-28 11:42:31 +00:00
Brian Viele dd18b9fdbc Qorvo pac55xx: initial support
Qorvo (Nee Active Semi) PAC55xx "Intelligent Motor Control" parts,
cortex-m4 SoCs
2019-11-26 23:28:02 +00:00
Guillaume Revaillot bcfdcc09ac stm32g0: add syscfg header. 2019-11-25 20:49:20 +00:00
larchuto 0a68b012a1 stm32l4: Fix typo impacting uart4 and uart5 2019-11-21 18:59:32 +01:00
Guillaume Revaillot 38b45c8786 stm32g0: add adc.
v2 "single" peripheral with a couple of tweaks :
 - added registers to configure two additionnal advanced analog watchdog.
 - different adc sampling time time based on channel groups.
 - 8 steps adc sequence injection, using chselr/chselrmode.

And a note on the rm explaining that after every configuration change to ADC_CFGR1's
SCANDIR or CHSELRMOD or CHSELR register, user need to check that configuration
is applied before any other modification / adc conversion start.. making adc_set_reqular
a bit painfull to read..
2019-11-08 14:19:17 +00:00
Guillaume Revaillot a34da53c30 stm32g0: add dmamux
DMAMUX peripheral is a dma request router/trigger, present on g0, wb, h7 and l4+.

Basically it allows to easily map peripheral requests to whatever dma channel we
want to use (similarily to the DMA_CSELR register, but without limitation) but,
it also also adds some clever dma request synchronization and even some dma request
generation logic via internal request generator "channels", allowing some requests
chaining, or triggering reqs from non dma capable peripherals.

nb: g0 only features 1 dmamux bloc, supports 7 irq and 4 generators, l4+ supports 13
dma channels and 3 generators and h7 has two dmamuxes, with support for the 15 dma
channels and 7 generators - so as much CxCR and RGxCR register - but they are bit
to bit compatible - excluding of course the sync/sig and dma requests id mappings.
btw, currently, request generator channels are defined in common header, but maybe
we should define them in device header ? or we dont care (like for dma channels,
only defined in dma_f24 but not for other devices ?).

See ST AN5224 for more information
2019-11-08 13:47:41 +01:00
Guillaume Revaillot b9f183bf1e stm32g0: add dma.
same same, bit for bit, except not ;) - Channel request mapping now
depends on a new DMAMUX peripheral, and there's no default preset.
So, before enabling dma channel after its configuration, request
must be configured by :

dmamux_set_dma_channel_request(DMAMUX1, DMA_CHANNELx, request_number_from_datasheet);
2019-11-08 13:47:41 +01:00
Karl Palsson 7a27397b9e stm32: rtcv2: don't shift the "month tens" bit
None of the other masks are shifted, don't shift this field either.

Fixes: https://github.com/libopencm3/libopencm3/issues/1123
2019-11-06 19:45:20 +00:00
Karl Palsson 2b54119b78 cm3: scs: drop all duplicate information
Keeps the best version of the documentation.

Fixes: https://github.com/libopencm3/libopencm3/pull/269
2019-10-18 22:38:16 +00:00
Karl Palsson 833da4b672 cm3: extract SCB SHPR to the SCB world it belongs to
Pull out the duplicate into the right file, keeping the newly fixed
version.
2019-10-18 22:33:23 +00:00
Karl Palsson 3ebd71b464 cm3: extract Coresight LSR/LAR definitions
Use a single point of definition for the offset, and add it where it was
missing.
2019-10-18 22:29:13 +00:00
Matt Anderson d8579dde95 CortexM0: IPR and SHPR are only word addressable
For ARMv6M, the IPR and SHPR registers are accessible only when
adddressed with a 32bit word read or write.

Currently in libopencm3 all NVIC interrupt priority register accesses
are made using an 8bit read or write, which results in the hardware
ignoring the write or always returning 0 on read.

Address this by introducing NVIC_IPR32() and SCS_SHPR32() macro and
conditional implementation of nvic_set_priority when building for
cortex-m0.

See ARMv6M developer documentation:
IPR: http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0497a/Cihgjeed.html
SHPR: http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0497a/CIAGECDD.html
2019-10-17 21:26:13 +00:00
Caleb Szalacinski 3c4ee6f4c0 SWM050: Finishes GPIO, IAP flash, sysclock, sleep/stop, and the sysctl memory map.
Updates the main memory map and the makefile.
Adds the SWM050 to devices.data, so that a linker script can be automatically generated.

Reviewed-by: Karl Palsson <karlp@tweak.net.au>
2019-10-17 11:41:33 +00:00
Bryan PEREIRA 1fbfdecb17 stm32f3: Add SPI4 BASE 2019-10-16 14:41:00 +00:00
Nicholas Rossomando 77d96a3430 stm32l0: crc: enable common code 2019-10-12 14:11:39 +00:00
Jonathan Halmen ec2d96433f stm32f4: rcc: add plli2s config function 2019-09-27 13:55:56 +00:00
Jonathan Halmen 203d0ca295 stm32f4: rcc: remove unnecessary pllsai functions
existing standard functions for these are
 * rcc_osc_on(RCC_PLLSAI);
 * rcc_is_osc_ready(RCC_PLLSAI);
2019-09-27 13:43:06 +00:00
Guillaume Revaillot 8a1cfa8ceb stm32g0: use proper register for gpio peripheral clock sleep enable.
Reviewed-by: Karl Palsson <karlp@tweak.net.au>
2019-08-28 20:54:35 +00:00
Guillaume Revaillot 998e647dde stm32g0: memorymap: get rid of apb1/apb2 reference, device only has one apb.
I apparently based memorymap.h on previously written header without noticing
that g0 has only one apb despite a big hole in the memory space and addresses
matching usual apb1/apb2 split..
2019-08-28 12:03:55 +02:00
Guillaume Revaillot 1928e6eb3c doc: typo 2019-08-28 01:41:14 +00:00
Guillaume Revaillot 562dca7358 stm32f4: doc: f4 are cortex m4f based 2019-08-28 01:41:14 +00:00
Guillaume Revaillot ec597796d7 stm32g0: fix bad typos in memorymap, impacting tim1 and tim15-17. 2019-08-27 16:24:42 +02:00
Guillaume Revaillot 3eff201a4b doc: stm32: adc: upgrade common_v2 documentation
add register grouping, fixup comment have them pickedup by doxygen, align style and masks.
2019-07-06 15:38:49 +00:00
Guillaume Revaillot 2035d84e55 stm32: lptim: add base support
Add basically what's needed to have some minimal but usefull subset of
function for a timer: irqs, compare, period, out polarity, enable/disable
and start.
2019-07-05 11:43:11 +02:00
Guillaume Revaillot f99e711873 stm32g0: lptim: add additional cr bits and cfgr2 reg. 2019-07-05 11:43:11 +02:00
Guillaume Revaillot 811aebf096 stm32: lptimer: enable lptimer.h usage on f4,f7,l4 and g0 chips. 2019-07-05 10:48:55 +02:00
Guillaume Revaillot 2975c3151a stm32: extract l0 lptimer stuff from timer.h to common lptimer.h
lptimer peripheral is present on f4,f7,l0,l4,g0,g4 and prob others. Extract
content from stm32l0 timer.h and make it usable by other chips.
2019-07-05 10:48:26 +02:00
Guillaume Revaillot 689e326f5f stm32f4: lptim1 sits at 0x40002400 on stm32f410, update memorymap 2019-07-02 18:27:43 +02:00
Karl Palsson 38d88c6113 doc: stm32f0: rcc: add missing groups for pll factors and sources 2019-06-27 14:53:09 +00:00
Karl Palsson 8744df10a6 doc: gd32: make groups match what's used.
Fixes the missing top level groupings here.
2019-06-25 21:15:35 +00:00
Karl Palsson 0cd06bcc97 doc: gd32/f1x0: fix missing tags, drop wrong tags
Drop incorrect/redundant type information from doxygen parameters
Adds groupings that are referred to.
2019-06-25 21:15:35 +00:00
Karl Palsson 1964fd72f2 doc: stm32f3: adc: register base addresses had landed outside a group 2019-06-25 21:15:35 +00:00
Karl Palsson 1b10a0871c doc: cm3: mpu: fix typo 2019-06-25 21:15:19 +00:00
Karl Palsson 60991ac306 doc: cm3: nvic: convert existing docs to doxygen
Make it visible
2019-06-25 21:15:19 +00:00
Karl Palsson 69ce9f876f doc: core cm3: standard titles
easier on the eyes reading the list of docs
2019-06-25 21:15:19 +00:00
Karl Palsson f63145db07 doc: stm32f7: rcc: add missing top level groups 2019-06-25 21:15:19 +00:00
Karl Palsson 1f359e0cb8 doc: efm32: tag USB files for doxygen generation 2019-06-25 21:15:19 +00:00
Karl Palsson 2d1277e1fa doc: efm32: uart/usart provide common doxygen
Fix some direct includes, tag properly, include a stub file to pull in
shared header documentation and re-arrange some existing documentation
to make it present nicely.
2019-06-25 21:15:19 +00:00
Karl Palsson 56265ad93f doc: efm32: rtc: tag and include in generated output
Includes the sutb file ncessary to find shared headers without any apis
2019-06-25 21:15:19 +00:00
Karl Palsson 6df301accc doc: efm32: timer: properly tag the shared header as well 2019-06-25 21:15:19 +00:00
Karl Palsson 531aa7e6b7 doc: efm32: rmu: include in doxygen generation
Include a stub .c file for shared code generation
2019-06-25 21:15:19 +00:00
Karl Palsson 75f6cbfd9d doc: efm32: msc: tag for doxygen inclusion
Includes a stub .c file to trigger common code generation
2019-06-25 21:15:19 +00:00
Karl Palsson c92f3dc0ad doc: efm32: letimer: include tags for doxygen
Include a stub .c file to document the shared headers.
2019-06-25 21:15:19 +00:00
Karl Palsson 25dc3a9b4b doc: efm32: i2c: tag for doxygen
Includes a stub .c file until there are some APIs
2019-06-25 21:15:19 +00:00
Karl Palsson 4c01e47aed doc: efm32: emu: tag for doxygen properly
Requires a stub .c file to make the common files be included until we
build some APIs.
2019-06-25 21:15:19 +00:00
Karl Palsson 764fbed9c8 doc: efm32: dac: fix up mising tags on common file 2019-06-25 21:15:19 +00:00
Karl Palsson 790d624230 doc: efm32: burtc: tag properly for doxyen
includes a stub .c file until there are APIs defined.
2019-06-25 21:15:19 +00:00
Karl Palsson aa99aba7d3 doc: efm32: prs: properly tag for doxygen 2019-06-25 21:15:19 +00:00
Karl Palsson 46514e75c0 doc: efm32: dma: tag headers properly 2019-06-25 21:15:19 +00:00
Karl Palsson 7e2cd050aa doc: efm32: acmp: document, and include via peripheral_apis
Requires a stub .c file as it has common includes with out any common
code (yet)
2019-06-22 01:38:20 +00:00
Karl Palsson 0626f6f75d doc: efm32: adc: enable peripheral_apis style 2019-06-22 01:38:20 +00:00
Karl Palsson ae777bb920 doc: efm32: timer: enable peripheral_apis style 2019-06-22 01:38:20 +00:00
Karl Palsson c8b8285446 doc: efm32: dac: enable peripheral_apis documentation 2019-06-22 01:38:20 +00:00
Karl Palsson 35657bdb61 doc: efm32: wdog: enable documentation via peripheral_apis 2019-06-22 01:38:20 +00:00
Karl Palsson 093edfb881 doc: efm32: cmu: move to peripheral_apis
Was completely undocumented before. Just needed different tagging so it
could be picked up.

No attempt at this stage of sharing more code between the cmu modules.
2019-06-22 01:38:20 +00:00
Karl Palsson 9bc432474b doc: efm32: include gpio_common
gpio_common was built, but wasn't picked up by any documentation.
Use the peripheral_apis style from stm32, but try out the #pragma once
style.  Downside is you don't get warnings if you include an sub layer
.h file.  Upsides are
* no ifdef/endif blocks
* no /**@cond*/ /**@endcond*/ blocks
* that's enough win!
2019-06-22 01:38:20 +00:00
Karl Palsson 6d74262bf4 doc: efm32: define peripheral_apis groups
Nothing is _in_ these groups yet, but define them so we can start
filling them out.  Follows the stm32 family style.
2019-06-22 01:38:20 +00:00
Karl Palsson 92b4b5a12f doc: efm32: fix typos in family/group names 2019-06-22 01:38:14 +00:00
Guillaume Revaillot f121c8c8f0 .gitignore: ignore autogenerated include/libopencmsis/swm050/ 2019-06-17 22:34:15 +00:00
Karl Palsson 2d0d29d946 doc: stm32l1: timer: fix params, missing groupings 2019-06-17 22:33:32 +00:00
Guillaume Revaillot 7d344b187d stm32: dma: add dma_set_channel_request to ease dma cselr usage. 2019-06-17 11:44:44 +00:00
Guillaume Revaillot eb0bc099f4 stm32l0: dma: include dma_cselr, present on l0x1-2-3. 2019-06-17 11:44:44 +00:00
Guillaume Revaillot e06898d9a4 stm32: dma: cselr: factorize register definition.
F09x and L4 share the same cselr register, as well as some L0s, factorize
definitions in a new shared header and add helpers.

fyi, that register allows to redefine dma channel peripheral mapping - see
device datasheet for mapping tables.
2019-06-17 11:44:44 +00:00
Karl Palsson 19f1160ad1 doc: stm32: timer: remove redundant groupings and consistent names 2019-06-16 18:17:06 +00:00
Karl Palsson 0b0a4de7c2 doc: stm32l0: fix doxygen groupings.
Makes some @ingroup directives redundant.
2019-06-16 18:02:41 +00:00
Guillaume Revaillot 594c354068 stm32: l0: timer/lptimer: doc+
better doc for l0 lptimer registers, add mask.
2019-06-16 09:48:34 +02:00
Guillaume Revaillot ab1b0c1a5e stm32g0: exti doc fixup 2019-06-13 12:04:58 +02:00
Guillaume Revaillot 8173fb7249 stm32g0: add timer.
Only tim2/3/7/14 have been really tested yet - but the others should
work as well.
2019-06-13 12:04:58 +02:00
Guillaume Revaillot 74526f00cc stm32g0: add crc.
Regular crc-v2 peripheral, except that CRC_IDR is now 32bit wide - but
not used.
2019-06-13 12:04:58 +02:00
Guillaume Revaillot 38006c3c82 stm32g0: add rng.
Regular rng peripheral, with one additional bit : clock error detection
apparently available on l4 chips).  Curiously, Clock error detection is
_disabled_ when bit is set, but bit is cleared by default, so peripheral
/ clock error detection behaves like all other chips..

NB: RNG need proper rcc_ccicr_rngsel bits set to work, no clock is set by
default. Note also that on that chip fRNGCLK must be higher than fHCLK/32
2019-06-13 12:04:58 +02:00
Guillaume Revaillot 5a349d3ab6 stm32g0: add i2c.
Regular i2c peripheral.
Partially tested as i had no i2c slave on hand, but i can see i2c on my scope..
2019-06-13 12:04:58 +02:00
Guillaume Revaillot ba3b50a4ad stm32g0: add spi.
classic "common" spi + frf bit spi peripheral.
As for i2c, i could only check signals on scope, no spi slave to check, but looks ok.
2019-06-13 11:56:20 +02:00
Guillaume Revaillot a51ecb4719 stm32g0: add usart. 2019-06-13 11:56:20 +02:00
Guillaume Revaillot bb98d0755c stm32g0: add iwdg.
regular v2 iwdg.
2019-06-13 11:07:53 +02:00
Eric Van Albert 3d422a930f stm32l4: add common DAC support
Replace the DAC1_BASE style, only used on l4 with the standard DAC_BASE
used on all other targets.

Reviewed-by: Karl Palsson <karlp@tweak.net.au>
2019-06-12 23:25:22 +00:00
Karl Palsson 9f58ad4393 doc: fix trivial missing trailers or typos 2019-06-12 23:16:58 +00:00
Karl Palsson 55c899c93b doc: stm32l0: rcc: add groups requested by existing docs
And cleanse the arguments to all match the docs.
2019-06-12 23:06:28 +00:00
Karl Palsson 7b6ca4be6b doc: stm32l0: rcc: add groups and tags for bus prescalers 2019-06-12 23:06:28 +00:00
Karl Palsson a2681b3122 doc: stm32f4: crypto trivial closing tag fix 2019-06-12 23:06:27 +00:00
Karl Palsson 502593ca6f doc: stm32: exti-v1: fix conditionals, add registers
Fixes some missing definitions.  cond/endcond is hard to get right
sometimes!
2019-06-12 23:06:22 +00:00
Karl Palsson 867bd164eb doc:stm32: usart: fix grouping and heirarchy of base addrs
They were always landing on the top level, or not even present.
2019-06-12 23:06:22 +00:00
Karl Palsson cfdb9b7856 doc: stm32f0: rcc: add groups and tags for bus prescalers 2019-06-12 23:06:22 +00:00
Karl Palsson e8f03b4615 doc: usbd: Add missing / incorrect parameters.
Just basic documentation to clear up errors for starters.
2019-06-12 23:06:22 +00:00
Karl Palsson 121d854841 doc: stm32: crc-v2 fix up markup for doxygen
Eliminates errors, fixes groupings, adds missing groupings.
2019-06-12 23:06:22 +00:00
Karl Palsson 7c0320bf21 doc: stm32g0: rcc: add groupings for periph resets 2019-06-12 23:06:22 +00:00
Karl Palsson 4129d89637 doc: stm32f7: rcc: add groupings for periph resets 2019-06-12 23:06:22 +00:00
Karl Palsson 5d3f13c40e doc: stm32f4: rcc: add groupings for periph resets 2019-06-12 22:56:38 +00:00
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 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 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 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 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 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 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 1e06c48201 stm32l1: timer: fix typo in option mask definition
Found while exploring documentation generation
2019-05-21 23:17:04 +00:00
Karl Palsson 1af3acdba4 stm32: doc: exti: fix missing/wrong groups and move to peripheral_api
Almost all families were missing all docs for the exti apis.
2019-05-21 23:16:59 +00:00
Karl Palsson 75748a7bfc stm32g0: flash doc: group registers 2019-05-21 21:47:24 +00:00
Karl Palsson 4aa9e484f6 stm32g0: flash: drop redundant docs
Functions that are already documented in the top level common api.h file
won't add any more documentation from later .c files.  Keep docs for
part specifics, in the .h files where they're accessible to IDEs and
also the documentation generation, and drop all (including the redundant
ones) from the .c file.
2019-05-21 21:46:02 +00:00