Commit Graph

1575 Commits

Author SHA1 Message Date
Chuck McManis 0ca7123fe6 .gitignore cscope database files 2014-11-24 00:24:37 +00:00
Karl Palsson 3a44b1311b stm32: f1: Additional GPIO Remappings for F100
F100 has more remap options than F10x, particularly on the High Density
devices.

Fixes github issue #365

Signed-off-by: Karl Palsson <karlp@tweak.net.au>
2014-11-21 10:38:03 +00:00
Karl Palsson 2c475a38d5 stm32:l0: Correctly compile as m0+, not m0.
Committed to binutils back in 2012, so even though it has no real impact, it at
least does the right thing for future compilers to make better decisions.

Signed-off-by: Karl Palsson <karlp@tweak.net.au>
2014-11-18 21:50:10 +00:00
Karl Palsson fb95997b3b stm32f1: rcc: timer 15,16,27 rcc bits missing for old style
The bits definitions for direct manipulation were missing, and should be
present for completeness.  However, this only affects the legacy (error prone)
API, replaced some time ago.

old and error prone: (stop using code like this)
    rcc_peripheral_enable_clock(&RCC_APB2ENR, RCC_APB2ENR_TIM16EN);
    rcc_peripheral_reset(&RCC_APB2RSTR, RCC_APB2RSTR_TIM16RST);

new:
    rcc_periph_clock_enable(RCC_TIM16);
    rcc_periph_reset_{pulse,hold,release}(RCC_TIM16);

Fixes github issue #361
2014-11-14 22:32:49 +00:00
Silvio Gissi 1420be5577 lpc17xx: power: basic peripheral power functions and defns 2014-10-27 22:05:36 +00:00
Silvio Gissi ff8e2743e8 lpc17xx: clock: Add basic clock control definitions 2014-10-27 22:05:30 +00:00
Silvio Gissi 91dca33789 lpc17xx: memorymap: Add APB1 peripherals 2014-10-27 22:05:23 +00:00
Silvio Gissi f44a8cf696 lpc17xx: memorymap: Add GPIO block at correct location 2014-10-27 22:05:16 +00:00
Silvio Gissi fe52894cf4 lpc17xx: memorymap: Fix AHB address and add peripherals 2014-10-27 22:05:08 +00:00
Silvio Gissi 9a79e6036e lpc17xx: trivial: fix description in linker script. 2014-10-27 22:04:54 +00:00
Karl Palsson 5dc9662e60 Update README with recently added targets 2014-10-21 14:54:08 +00:00
Frantisek Burian 9fce73a014 [Doxygen] Strip out architectures from Makefile dependencies
This commit shrinks the Makefile of the doxygen and makes easy error-prone addition of the new supported platforms.
The user should modify only one line at start of file to add new supported family to the build process.

The calling format is preserved and is compatible with old version of the makefile.
2014-10-15 19:50:08 +02:00
Frantisek Burian eee5a45019 [stm32l0] Integrate the L0 architecture to the doxygen documentation
Conflicts:
	doc/Makefile
2014-10-15 19:33:20 +02:00
Frantisek Burian f9152eb00a [stm32l0] Initial support for STM32L0 architecture, Add GPIO peripheral 2014-10-15 19:31:41 +02:00
Stefan Agner 7cef59a83f vf6xx: add I/O mux controller
Add I/O mux controller which is required to mux pins according to
their used function. For all pads, the alternative function 0 is
GPIO. For different pin mux function refer to the reference manual.
2014-10-15 19:31:09 +02:00
Stefan Agner 2e1cbcae22 vf6xx: initial GPIO support
This adds GPIO module support. GPIO can be controlled using the GPIO
number as stated in the reference manual, similar to Linux. Also
32-bit access to whole ports is possible. Reading a GPIO is possible
without muxing the pad as GPIO, however writing a GPIO needs the pad
to be muxed as GPIO.
2014-10-15 19:31:09 +02:00
Stefan Agner a1d456521d vf6xx: add UART support
This adds UART support for Vybrid VF6xx. Baud rate is calculated
from IPG clock, which need to be initialized by using the
ccm_calculate_clocks functions. Also clock need to be gated using
the ccm_clock_gate_enable function. Tested with an unitialized
UART with a baud rate of 115200.
2014-10-15 19:31:02 +02:00
Stefan Agner c9857ad52a vf6xx: calculate core clocks
Extend the clock controller module with a function to calculate
core clocks from the current registers settings. On Vybrid, we
assume that the core clocks are setup by the main operating system
running on the Cortex-A5. Nevertheless we need to know their actual
values in order to calculate other clocks or baud rates.

Verified on a Colibri VF61, which calculates following values:
ccm_core_clk: 500210526
ccm_platform_bus_clk: 166736842
ccm_ipg_bus_clk: 83368421
2014-10-15 19:31:02 +02:00
Stefan Agner 511f16e8c7 vf6xx: enable floating-point coprocessor 2014-10-15 19:31:02 +02:00
Stefan Agner c83e16926e vf6xx: doc: initial commit
Add documentation Makefile and DoxygenLayout for Freescale Vybrid
VF6xx support.
2014-10-15 19:31:02 +02:00
Stefan Agner 3132ae50cb vf6xx: initial memorymap and clock control module
Add initial memorymap for Vybrid VF6xx module. Also add the clock
control module which allows to control system clocks and enable
clocks of individual pheripherials.
2014-10-15 19:31:02 +02:00
Stefan Agner cc2dc243e5 vf6xx: set vector table to memory
Set Vector Table Offset to memory location of our vector table.
Since we put the whole programm including the vector table into
memory, we need to make use of the Cortex-M4 system control block
Vector Table Offset Register (VTOR).
2014-10-15 19:31:02 +02:00
Stefan Agner 07b7d3e805 vf6xx: initial add of Vybrid VF6xx support
Freescale Vybrid is a familiy of ARM SoC, wheras the VF6xx models
have two cores in one SoC, a Cortex-A5 and a Cortex-M4. This adds
initial support for the Cortex-M4 in the libopencm3 library.

By using two different ram areas (pc_ram and ps_ram) the user can
put the code in a RAM area bounded to the code bus. The data can
be stored in the data area. However, currently the initial values
of for the variables in the data section are stored in the code
section and copied to the ram section by the initialization code
(like it's copied from ROM to RAM on microcontrollers).
2014-10-15 19:31:01 +02:00
Enrico Jorns cd6b997a67 Markdowned README.md 2014-10-15 17:30:27 +02:00
Enrico Jorns 116462ca45 Renamed README to README.md to be recognized as Markdown by GitHub 2014-10-15 17:30:27 +02:00
Freek van Tienen ac8ac8c64d [f4] Added a 25mhz clock 2014-10-15 17:27:18 +02:00
Karl Palsson 67f4f50a94 stm32: common: fix missing SPI_I2S_BASE rename regression
Fix regresion from 5d4437fe43 where
somehow not all occurrences were replaced.  I could swear it all
compiled when I was working on it :(

Reported-by: Trevor Woerner <trevor.woerner@linaro.org>
2014-10-08 14:32:05 +00:00
Michael Spieler 50dd1c5725 stm32: gpio_toggle: ensure correct state of non-toggled pins. 2014-10-07 12:01:04 +00:00
Stefan Agner 0d5dac515a init: call pre_main before C++ constructors
This moves the platform specific initialization function pre_main
in front of C++ constructors. This is especially necessary for
platforms which need to setup the stack pointer (pre_main itself
is inline, hence no stack needed for this function).
2014-10-07 11:31:36 +00:00
Karl Palsson 4c190a3fa3 stm32: i2c: actually keep bit 14 set as per datasheet.
Old code did three writes, new way actually seems to follow datasheet
properly.
2014-10-07 11:25:02 +00:00
Geoffrey Hausheer 4ff07df7b2 stm32: Add timers 9-17. This should support all F0, F1, and F2 products 2014-10-07 11:23:52 +00:00
Karl Palsson 5d4437fe43 stm32/spi: Replace all SPIx_I2S_BASE with SPIx_BASE
Latest versions of all reference manuals refer to the address as SPIx_BASE, and
simply name some of the individual registers as SPI_I2SXXXX.  Likewise, the
interrupts are simply SPIx, not SPIx/I2Sx.  Rather than hacking more duplicates
into the F0 and L0 parts where this was turning up, remove the pointless _I2S_
from SPI2/SPI3 and make it all consistent

Compile tested only, with the examples collection.

Signed-off-by: Karl Palsson <karlp@tweak.net.au>

Fixes #331
Fixes #347
2014-10-07 11:21:40 +00:00
Karl Palsson 2211944233 stm32: exti: Define all irqs in common header.
There's more exti lines on many more devices now. F0 and F3 have extras, as did
L1 and L0.  There's no real reason not to have higher order EXTI definitions
defined at the top level, and it reduces the number of files to merge together
to find all definitions for the bigger devices.

Signed-off-by: Karl Palsson <karlp@tweak.net.au>

Fixes #338
2014-09-30 22:32:52 +00:00
Paul Fertser 283d8cc7d2 Makefile: fix build for directories with spaces
When full path of a source directory has spaces in it, that makes
shell and Make split the path, so special treatment is
necessary. Additionally, @F doesn't honour the escaping, so has to be
avoided.

Reported-by: Roman Faizullin <roman@faizullin.info>
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
2014-08-12 12:01:16 +00:00
Karl Palsson 88c20212ed docs: fix link from stm32f3 to stm32f0
Incorrectly pointed to f1.
2014-08-12 10:33:59 +00:00
Nippius d2808b8486 tiva lm4f: ssi: Initial implementation for SSI peripheral 2014-08-11 21:51:09 +01:00
Karl Palsson 8fa7727b09 stm32f3: drop redundant gpio.c
All methods in this file are in either
* common/gpio_common_all.c
* common/gpio_common_f0234.c

Those other files have better doxygen commentary, this file should never
have been added.
2014-08-10 21:06:38 +00:00
Norbert Braun 884924d598 stm32: timers: fix mixup between TIMx_CCMR1 and TIMx_CCMR2 in timer_set_oc_mode() 2014-08-04 15:38:01 +02:00
Karl Palsson af3389652c stm32: timers: Fix edge polarity setup
The CCxP/CCxNP bits are actually separated by a reserved bit, so the
correct mask is 0xa, (0b1010) not 0x6 (0b0110)

Reported by PyroDevil on the mailinglist
2014-07-15 13:28:02 +00:00
Karl Palsson cf5fb002f6 [l1-flash/eeprom] Add lock/unlock/eeprom helper routines 2014-07-14 17:54:20 +00:00
Frantisek Burian 4d28c1b849 USB: Fix definition of function according to previous commit. 2014-07-14 14:50:07 +02:00
Franck Jullien d6bad27735 Allow more than one usbd_register_set_config_callback
In a composite device if one want to separate code
for each interface, usbd_register_set_config_callback
can now register more than one callback.

Signed-off-by: Franck Jullien <franck.jullien@gmail.com>
2014-07-14 14:04:58 +02:00
Pavol Rusnak 806ebb18fa add MSC (Mass Storage Class) support 2014-07-03 18:46:55 +02:00
Felix Ruess f6b6d62ec5 [stm32] fix dox for rcc_periph_x
closes #329
2014-06-28 02:40:36 +02:00
Felix Ruess f49c1f264a [stm32] fix i2c_reset
rcc_periph_reset_pulse needs RST_I2Cx instead of RCC_I2Cx as argument
see also #329
2014-06-26 00:05:46 +02:00
Felix Ruess c01f9ee323 [stm32] implement i2c_reset using rcc_periph_reset_pulse
this also adds support for I2C3 in i2c_reset
2014-06-11 12:58:05 +00:00
Karl Palsson 67b538a540 usb/stm32: Add top level commentary for scope
Remove some unncessary commentary and fixed bit fields introduced earlier via
insufficient review.
2014-05-25 19:54:06 +00:00
Roger Wolff c07a1291f4 usb/stm32 added NOVBUSSENS bit definitions 2014-05-25 19:45:52 +00:00
Roger Wolff 5c5c77d4dc stm32/f0: DMA base address compatibility tweak 2014-05-25 19:35:20 +00:00
Karl Palsson b37597f1db stm32/dac: Follow ref-man guidelines on GPIO config
GPIO pins should be configured for Analog IN on virtually all families
to reduce parasitic consumption.

Reported-by: Roger Wolff <R.E.Wolff@BitWizard.nl>
2014-05-19 10:29:11 +00:00