Commit Graph

63 Commits

Author SHA1 Message Date
Fergus Noble b039504494 Moving stm32 f2/f4 flash code into the common area. 2013-05-10 18:34:55 -07:00
Matthew Peddie ea15d962ab Remove redundant access size argument in F4 flash code. 2013-04-25 17:13:51 -07:00
Gautier Hattenberger a4b582f91d add 16MHz resonator for stm32f4 2013-04-23 17:52:27 +02:00
John Howe dd906c0656 Updated links to ST programming manuals 2013-04-16 16:35:19 -07:00
Ken Sarkies 5b8953124e This mainly moves the STM32 timers' code to the common area.
F2 and F4 have a common section to deal with the options register (TIM2 and TIM5 only)
L1 has been made common with timer_common_all as its options register has very different settings to F2/F4. Code is in the L1/timer.c L1/timer.h files

Note that F3 and F05 timers should fit into this scheme, with F3 having additional features.

Bundled with this is L1/pwr.h to change a documentation setting
Also all the Doxyfiles have added "ENABLE_PREPROCESSING = NO" to fix a problem introduced by commit 118.
2013-03-09 14:39:01 +10:30
Ken Sarkies a9a85f080b Add test in common headers for improper inclusion of such files in application.
(prevents inclusion and also issues warning)
Changes to some source files to remove references to common headers.
Changes to rng.h to make guard symbols the same in f2 and f4.
2013-03-07 18:35:04 +10:30
Ken Sarkies e2022f5884 Repair to documentation (most documented files)
to remove errors, duplications and inconsistencies.
File lib/stm32/f1/pwr.c - all code removed as it duplicates that in common/pwr_common.c
Remaining changes do not affect code. Compiles OK.
TODO efm32 has no code so generates no modules
TODO F2 needs pwr.c
TODO L1 needs dma.h and dma.c
2013-03-07 11:14:06 +10:30
Michael Aherne a121769785 Adding f4-specific rtc functions
These should also work with the f2
2013-02-26 21:22:58 -08:00
Piotr Esden-Tempski 1a025b5379 Fix all warnings for stm32f4 lib. 2013-02-26 17:19:22 -08:00
alexn 3e587dce68 fix stm32f4 sdio base adress 2013-02-25 14:07:51 +01:00
Piotr Esden-Tempski b4634ba8ff Merge pull request #92 "DMA tidyup"
Merge remote-tracking branch 'karlp/dma_tidy'
2013-02-18 14:14:22 -08:00
Piotr Esden-Tempski 6eef01ce26 Merge pull request #84 "Pr flash reg rename"
Merge remote-tracking branch 'karlp/pr_flash-reg-rename'

Conflicts:
	include/libopencm3/stm32/l1/flash.h
2013-02-18 14:09:31 -08:00
Piotr Esden-Tempski 9095f58fa3 Merge pull request #79 "More L1 support (and f2/f4 rtc)"
Merge remote-tracking branch 'karlp/pr_more_l1_rtc'
2013-02-18 14:06:02 -08:00
Piotr Esden-Tempski 9193d3d273 Fixes #93 copypasta error in RCC_CSR_BORRSTF definition. 2013-02-15 16:14:30 -08:00
Karl Palsson 7afc13930f [stm32] Use common memorymap include for consistency
Most peripheral headers simply include <libopencm3/stm32/memorymap.h>
which, like the rest of libopencm3 requires the correct compiler define
flag to be set.  A few peripherals were directly including the platform
include, libopencm3/stm32/xx/memorymap.h, and in some of those cases it
wasn't even correctly including the correct platform.  (Likely the
result of copy/paste errors)

These direct includes have been eliminated
2013-02-06 11:47:23 +00:00
Karl Palsson 40d9d630f0 [flash] f4: use "proper" bit definition naming.
Part 4 of 4: updated f4 to use flash_<reg>_bit instead of just
flash_bit
2013-01-23 13:58:11 +00:00
Karl Palsson e5b3250382 [stm32] Support the "new" BCD style RTC peripheral
Add the register definitions and some of the most basic helper functions
for the new style BCD RTC module found on the F2, F4, L1, F3 and F0.

This tries to keep as close to HACKING_COMMON_DOC as possible, while
maintaining sane names.
2013-01-22 23:55:59 +00:00
Karl Palsson df5e3e5ff1 [l1] PWR: fix style for common code
Code added for L1 to support the PWR Control block didn't properly
follow the HACKING_COMMON_DOC guidelines.  The naming was wrong, and
some headers were missing.  This commit has no functional changes, it
only addresses the style and structure problems.
2013-01-22 22:55:19 +00:00
Piotr Esden-Tempski 204eb047b4 Merging pull request #72 Doc
Merge remote-tracking branch 'ksarkies/doc'

Conflicts:
	doc/stm32f1/Doxyfile
	doc/stm32f2/Doxyfile
	doc/stm32f4/Doxyfile
	lib/stm32/f1/Makefile
	lib/stm32/f2/Makefile
	lib/stm32/f4/Makefile
2013-01-09 01:05:37 -08:00
Ken Sarkies 85308f562a Minor cleanup to use dispatch memorymap.h 2013-01-08 19:58:18 +10:30
Ken Sarkies efee94901a CRC moved to common area 2013-01-08 19:58:18 +10:30
Ken Sarkies e831f4db51 I2C to common area
F2/4 has now I2C3 included
2013-01-08 19:57:19 +10:30
Ken Sarkies 312d887825 IWDG moved to common area 2013-01-08 19:51:49 +10:30
Ken Sarkies 0878a534cd Move usart files to common area
Again added to L1 which is similar to F1
2013-01-08 19:51:08 +10:30
Ken Sarkies 1029597e70 Move DAC to common area
(Note there are now dummy source files dac.c (and others) that are
not compiled but are needed for documentation).
2013-01-08 19:50:22 +10:30
Ken Sarkies 7ec382c7d5 STM32: Moved SPI code into the common area.
Updated the documentation so that it appears in all families
Also added it to the L1 area, but is untested. An addition to the memorymap
allows commonality and a #ifdef added to the spi_common_all code to
exclude the case of SPI3 for L1 and F0 as SPI3 doesn't exist in those.
An rcc dispatch header was added to remove same code from the spi header.
2013-01-08 19:48:52 +10:30
Ken Sarkies a60ae5044c STM32 DMA: replaced F4 header to match that for F2, and move header and source files to common.
In the header:
- Fix DMA_SxCR_CT: change shift from 18 to 19
For use with the convenience functions:
- Added DMA_SxCR_CHSEL generic values
- Added DMA_STREAM - generic values
- Added dma_if_offset - rather than separating out LISR and HISR
- Added masks
- Added dma_disable_double_buffer_mode()
2013-01-08 08:16:25 +10:30
Piotr Esden-Tempski c03cbc41a1 Merge pull request #73 RNG
Merge remote-tracking branch 'oojah/master'
2013-01-06 18:05:49 -08:00
Piotr Esden-Tempski 44e350ad20 Merging pull request #64 Various changes
Merge remote-tracking branch 'bgamari/master'
2013-01-06 17:56:13 -08:00
Roger Light a4a4255555 STM32: Move RNG to common area and add support for the F2. 2012-12-12 20:47:38 +00:00
Roger Light 512769296a Update STM32 RNGEN register bit name to more closely match documentation. 2012-12-12 20:34:44 +00:00
Ben Gamari a43f1d0844 stm32/f4/memorymap.h: Fix ADC offsets 2012-11-14 20:07:28 -05:00
Ken Sarkies 4ab5c94b90 Proposed deduplication of peripherals, GPIO example
See rambling post on dev list for justification
2012-11-13 18:41:31 +10:30
Piotr Esden-Tempski f714ee42c0 Merging pull request #60 Miscellaneous DMA fixes for F4
Merge remote-tracking branch 'bgamari/master'
2012-11-08 12:04:28 -08:00
Ben Gamari f3557b8d60 stm32f4/dma: Fix DMA_ISR_OFFSET definition 2012-11-08 12:13:16 -05:00
Karl Palsson ce8f47e7df Enable nvic and exti support for L1
And include an example that uses it.
2012-11-07 21:54:18 +00:00
Piotr Esden-Tempski f5df25d6de Merge pull request #55 STM32F4: New adc module
Merge remote-tracking branch 'ksarkies/adc-f4'
2012-10-31 13:38:51 -07:00
Ken Sarkies 68e6818761 STM32F4 New: headers and source code for DMA
This has been tested with some dac, timer and (as yet uncommitted) adc examples.
2012-10-31 13:36:07 -07:00
Ken Sarkies 0bd415365d STM32F4: New adc module
Note adc.h was provided by Matthew Lai but was never merged.
adc.c is new.
2012-10-30 10:22:52 +10:30
chrysn e20f1c0d8f unify scb (system control block)
these register definitions are common to all cortex mcus. some of the
registers might not be implemented everywhere (especially the floating
point registers), but defining them does no harm.

this modification does not result in any changes in the example
binaries.
2012-10-18 21:45:20 +02:00
chrysn 5ceb377a37 switch all interrupt lists to yaml format 2012-10-18 16:52:48 +02:00
chrysn a8a6eb39e9 add irq cound to existing nvic.h files 2012-10-18 13:19:55 +02:00
chrysn 7c33025c31 Merge branch 'master' into generalizations
Conflicts:
	lib/lm3s/vector.c -- split out to lm3s/irq.h
	lib/stm32/f4/vector.c -- put the floating point initialization code into a function like in lpc43xx
2012-10-17 18:55:54 +02:00
Piotr Esden-Tempski 9e77f8c361 Merging pull request #28 Random number generator defenition and example.
Merge remote-tracking branch 'tiltit/master'
2012-10-05 13:08:03 -07:00
chrysn a69d83d312 unified vector table initialization
the cortex generic interrupts get moved to lib/cm3/vector.c, the
platorms' individual irq names, initialization and handler prototypes go
to platoform specific irq.h files.

as the vector.c file heavily depends on platoform specific headers, it
can't be built once-and-for-all in lib/cm3/, so there are inclusion
stubs in the various architecture dirs; this might be better solved with
Makefile / include path handling.

one particular file is lib/lpc43xx/vector.c; that platform's
initialization code contains an additional section to copy everything
from flash to ram (which probably performs better there). that code
still resides in the inclusion stub, and gets mashed in using defines.
would need a cleaner implementation together with the Makefile solution.

this commit contains some files of the upcoming efm32 branch, from which
it was cherry-picked.

the .bin files produced from before and after this commit only differ in
lpc43xx, where the startup sequence was subtly modified.
2012-10-05 00:55:24 +02:00
Daniel Serpell c9ab75878f Add all SCB registers mentioned in ARM DDI 0403D manual.
See table B3-4 and B3-5 for the definitions and B3-24 for the
bit assignments of SBC_CPACR.
2012-09-27 23:12:18 +02:00
Ken Sarkies ff83a1ae1c Setup to document entire project using doxygen.
New doc directory with config files and generated html, LaTeX/pdf.
Makefile provided for autogeneration and explanatory README.

The project structure is hostile to doxygen, which can't cope with functions
of the same name. Doxygen is run for each family separately, and separately
for LaTeX generation. Customized layout files sort of "integrate" HTML, and
separate pdfs are generated for each family. Not ideal but seems the best
solution until doxygen changes, if at all.
2012-09-15 12:51:46 +09:30
Oliver Dille e99896120b Random number generator register definitions. 2012-09-07 22:03:36 +02:00
Nicolas Schodet 3aab6220d8 Add C linkage declaration for C++ usage 2012-09-02 17:12:58 +02:00
Fergus Noble 87ea496ca7 Revert "Fix setting alternate port functions on the STM32F4."
This was also fixed in ac29b654a9 in a
different way. I think the mask definition should be left with 1s
indicating the bits of interest.

This reverts commit e11185d47d.
2012-03-21 20:16:10 -07:00