Commit Graph

1754 Commits

Author SHA1 Message Date
Piotr Esden-Tempski b1049f9a6f [Style] Stylefix sweep over the whole codebase. 2015-12-14 22:57:15 +01:00
Piotr Esden-Tempski 1f6fd11dd9 [Style] Fixed all style errors in the efm32. 2015-12-14 19:30:04 +01:00
Kuldeep Singh Dhaka 77354cb371 Inital support for EFM32LG 2015-12-13 19:56:19 +01:00
Devan Lai c28d9727d7 stm32f0: flash: Add BOOT_SEL and nBOOT0 definitions for FLASH_OBR
Checked against RM0091rev8
2015-12-13 01:07:26 +00:00
Karl Palsson 7c1cd2e5cd Drop "install" target and documentation.
This has hurt many many many people over it's lifetime, by confusing their
multilib toolchains.  Simply drop it outright.  People who _really_ know what
they're doing are still perfectly entitled to "install" portions of this
project in suitable locations for their own use.
2015-12-06 22:17:30 +00:00
Constantine Verutin 2eade079a9 Fix flash size for stm32f401x(D|E) in devices.data. According to
datasheet(http://www.st.com/st-web-ui/static/active/en/resource/technical/document/datasheet/DM00102166.pdf,
page 11) stm32f401xD has 384 Kb of flash and stm32f401xE has 512.
2015-12-02 10:15:09 +00:00
Jim Paris 01f08c4638 Remove WEAK from handler prototypes
These prototypes affect functions defined by application code.  Only
the implementations in libopencm3 are supposed to be weak; the
functions in application code should definitely not be.  Otherwise,
you'll end up with two weak symbols being linked together, and
it's luck as to which one the linker picks.
2015-11-24 09:55:27 +00:00
Karl Palsson 1ebfc4b26e lpc17xx: Correct duplicate CLKOUT definition
Checked against UM10360 rev3.1

Reported-by: <karl.robinsod@gmail.com>
2015-11-23 09:51:18 +00:00
Karl Palsson f14c678ccb stm32l4: add gpio support
Just the basic core common functionality gained for free by being a common
peripheral.  Enough for a miniblink.

Fixes some errors in the GPIO memory map.  ST's naming of AHB2 vs AHB3 is
confusing.
2015-11-13 02:13:31 +00:00
Karl Palsson 8afc983f3e stm32l4: Add RCC definitions
Bring in the core common code, and now that it's used, pull in the common
memorymap
2015-11-13 01:15:17 +00:00
Karl Palsson d0ac7feb3b stm32l4: Add linker generation support 2015-11-11 00:51:50 +00:00
Karl Palsson 7233d1112c stm32l4: Add to documentation build
Don't include any of the common files yet, we're only getting a stub framework
up for further work.

This is mostly noise adding links from the other families to make the l4
"exist"
2015-11-11 00:51:08 +00:00
Karl Palsson 507c184456 stm32l4: initial memorymap and vector support
Values from RM0351rev1, with the correction of the duplicate TIM1_CC entry.

Only stub support so far, but this opens up the beginning of build testing.
2015-11-10 23:47:57 +00:00
Karl Palsson 00cbf86e77 scripts: clean generated cmsis headers too 2015-11-10 23:47:57 +00:00
Karl Palsson a939810940 stm32f0: Add rcc compatibility aliases
Many stm32 families have multiple ADC and DAC peripherals.  F0 (so far) only
has one.  To make it easier to use the same code on many stm32 families,
provide an alias for ADC1 to ADC.
2015-11-10 22:00:11 +00:00
Nicolas Schodet 9b8d44e8a3 stm32f4: add GPIOJ & GPIOK
They are available on STM32F429 and STM32F439.
2015-11-10 14:27:57 +01:00
Karl Palsson fd100ea6c2 stm32f0: rcc: doxygen update prediv
After adding support to the f3, add missing doxygen support to the f0
equivalent.  This improves things and keeps them consistent until/if they are
pulled out as common code.
2015-11-08 15:36:32 +00:00
Karl Palsson a444aa4476 stm32f3: rcc: Add pll source prediv support
Based on the f0 support, which has identical functionality, but with doxygen
added.  Bits renamed as they are only HSE prediv on some targets, and makes
things more consistent with the f0.

Fixes part of github issue #560
2015-11-08 15:36:32 +00:00
Karl Palsson 489dc5125e stm32f3: rcc: support setting ADC prescalers
If you are in async mode (ADC_CCR.CKMODE == 0) (the reset default) you still
need to set the prescalers before the ADC will actually enable.
2015-11-08 15:36:32 +00:00
Karl Palsson 674cd9bfe9 stm32f3: rcc: Update ENR/RST definitions for newer docs
Based on latest RM0316rev5, and fixed a bug in f37x CEC bit definition that
overlapped.
2015-11-08 15:36:32 +00:00
Karl Palsson 4d7694b454 stm32f3: rcc: consistent masks for pll multiplier
All other masks consistently used a separate mask/shift define, bring the pll
multiplier function in line, and use the same form as other functions.
2015-11-08 15:36:32 +00:00
Karl Palsson 129a874cf8 stm32f3: rcc: Correct name of pll multiplier helper.
This function was badly copied and pasted from the f4 library, where there are
two functions, rcc_set_main_pll_hsi and rcc_set_main_pll_hse which combine
source, multipliers, dividers and other pll factors.

On F3, (not all of them, but the ones we support now), the function as
implemented has nothing to do with hsi / hse, and instead is simply selecting
the PLL multiplier.
2015-11-08 15:36:32 +00:00
Karl Palsson 10ef294e5d stm32f3: rcc: Set prescalers properly.
Copypasta from f4 rcc code was only modified to shift the result, but not clear
the existing settings properly. Add mask/shift definitions and use them
properly.
2015-11-08 15:36:32 +00:00
Karl Palsson ce9dab2a92 stm32f3: rcc: drop unused "power_save" parameter
Badly copied from F4 rcc code, there's no power save support in the f3 rcc
tree.
2015-11-08 15:36:32 +00:00
Karl Palsson 388138b953 stm32f3: Include at least a single linker script for f3 standard
This is the f3 on the common f3 discovery board.
2015-11-08 15:36:32 +00:00
Karl Palsson 5f2f296047 stm32l1: add l100xc linker script
Less eeprom and ram than l15x series.
2015-11-06 00:05:22 +00:00
Joost Rijneveld 74cd99343b stm32f4: linker scripts: add CCM to F405
The filename has always been wrong, "6" is a temperature grade, but f405 and
f407 are in the same datasheet, and all have the 64k CCM.  Add it to the linker
script.
2015-11-06 00:03:36 +00:00
Karl Palsson e6f267e103 stm32f7: Update TODO memory map items
DBGMCU and flash size and unique id registers had simply been copied from F4,
with TODO markers.  Checked against current datasheet and ref manual
2015-11-01 14:21:07 +00:00
Karl Palsson ab0552b1f7 stm32f7: correct addresses for calibration values 2015-11-01 14:12:37 +00:00
Alexandru M Stan 435cbcc675 stm32f0: Fix TSC_IOGxCR
TSC_IOGxCR is actually a 32 bit register, of which 13 bits are used
(rest are reserved).

Also, added x-1 since G0 is not a valid group, TSC_IOGCSR_GxE(1) is supposed
to be at 0x34, not 0x38.
2015-10-24 20:06:12 -07:00
Karl Palsson ff6cc954b7 stm32: adc: drop non-existant adc_set_single_channel
Was only in the (obviously out of date) documented example and as a
declaration.  No implementations.  Dropping immediately, but documentation
still needs further work.
2015-10-17 01:23:56 +00:00
Karl Palsson fbd25fb16f stm32f7: missing ; in rcc enumerations 2015-10-15 12:31:01 +00:00
Karl Palsson caeeed2b0f stm32f7: FPU only single precision on f7 :(
Boo ST.
2015-10-15 12:28:54 +00:00
Karl Palsson 5ece67ad5d stm32f7: Add rcc.h
Full clean manually checked against RM0385rev2.

Header definitions only.
2015-10-15 11:49:28 +00:00
Karl Palsson c1c37a8b0f stm32f7: Update IRQs from latest ref manual
One name change and some new ones.
2015-10-15 10:36:54 +00:00
Frantisek Burian 3ef2c38120 [stm32f7] Add initial support of the family, GPIO support.
Most changes are noise from doxygen.
Readme udpated to explain newer FP_FLAGS for m7
stm32f7 library is skipped if the toolchain doesn't support it yet.
2015-10-15 10:34:28 +00:00
Karl Palsson 2e25d678ba Surround all macro parameters with ()
Followup from c72f3d588a
2015-10-15 01:03:18 +00:00
Karl Palsson 8f06818f03 doc: flash: syntax check parameters
Mostly just cleans up warnings in doxygen, for most purposes the output is
similar enough to have not been noticed.
2015-10-15 00:54:04 +00:00
Karl Palsson 8eb4ae09ea docs: adcv1: update example code 2015-10-15 00:13:45 +00:00
Karl Palsson 33a2d057f4 doc: exclude CRS from f1, f2, f3, f4, l1 2015-10-15 00:13:33 +00:00
Karl Palsson 3c9e80c6f1 doc: stm32l1: include rcc.c docs 2015-10-15 00:13:25 +00:00
Karl Palsson 75d508246e usb: otg: drop confusing invalid definitions
GUSBCFG TRDT fields have very particular meanings, and the field should be set
depending on your bus speed.  There's no 8/16bit meaning in any current
reference manual for this field.

Fixes github issue #530
2015-10-14 22:42:49 +00:00
Karl Palsson c72f3d588a Surround all macro parameters with ()
All the macro arguments that are user supplied, or potentially, wrap properly
in () as good practice.

Probably missed one or two, and a lot of them are possibly unnecessary, but
it's straightforward to just do it always.

Fixes github issue #321
2015-10-14 22:15:15 +00:00
fenugrec c899273c62 usb: Improved comments of USB API
usbd.h: more comments for bmRequestType and bmAttributes bitfield macros
usbd.h: migrated and added API doxyblocks from implementations (*.c)
2015-10-14 20:48:26 +00:00
Karl Palsson 7814d06095 usb: control complete callback has no return value
It's never used, so let's make it void to avoid any confusion.
It was also an unintentional change from void to int in 4b89272
2015-10-14 10:04:37 +00:00
Antal Szabó f5c9dbdb8d stm32f1: rcc: Fix comments on clock speed. 2015-10-13 15:26:53 +00:00
Karl Palsson 27b826bc4a tests: Allow user override of C/CXX/CPP/LD flags
As recently added to the library, allow the tests to be compiled with user
overridable flags too
2015-10-11 19:15:06 +00:00
Tido Klaassen aad8d06c3f make: rename CFLAGS in target Makefiles to TGT_CFLAGS
Renamed every instance of variable CFLAGS in target specific Makefiles
to TGT_CFLAGS to free up CFLAGS for user defined compiler flags.

Added information in README.md about existence and usage of CFLAGS
environment variable in build process.
2015-10-11 19:14:25 +00:00
Hunz 9217a5f888 ld generator: add STM32F302x8 2015-10-11 18:46:25 +00:00
Karl Palsson 3ed12b6fd9 usb: short control IN might need a ZLP
Control transfers can transfer less than was requested by the host in the
wLength field.  if this short transfer is a multiple of the endpoint's packet
size, a zero length packet must be sent.

Adds tests for a range of control transfer IN requests, and properly supports
this in the core.  Based heavily on work by Kuldeep Dhaka.

See https://github.com/libopencm3/libopencm3/pull/505
and https://github.com/libopencm3/libopencm3/pull/194 for original discussion.

Tested with stm32f4, stm32f103 and stm32l053.
2015-10-11 18:43:11 +00:00