30 Commits

Author SHA1 Message Date
Karl Palsson
0b84540ecb stm32l4: add common timer code. 2016-03-30 16:59:57 +00:00
Robin Kreis
0a76a24286 stm32l0: add LPTIM definitions 2015-10-06 00:53:51 +00:00
Ken Sarkies
7816501dbc Changes to the header includes for all STM32 peripherals
to remove variations, redundancies, add missing, fix errors. All c files
refer only to the dispatch style headers in /include/stm32. Those headers
#include memorymap.h and cm3/common.h. All references to
these are removed from the family specific headers. Ethernet untouched as
it appears incomplete.

Added dummy spi.c for F0/F3. Fix some doxygen anomalies.
2014-03-11 16:40:31 +00:00
BuFran
81982916e2 [Doxygen] Add complete documentation page to STM32F0 2013-08-22 17:18:42 -07:00
Federico Ruiz Ugalde
74a313625f stm32f3: timer support added. 2013-07-07 16:01:48 -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
Piotr Esden-Tempski
80fd23580a Fix all warnings for stm32f1 lib. 2013-02-26 17:14:31 -08:00
Ken Sarkies
6ee8e44bd7 Initial documentation for stm32/usart.c, usart.h
Some minor documentation corrections to timer.h
2012-10-16 14:07:27 -07:00
Ken Sarkies
0834f41383 stm32f1:
Add object files to Makefile to include new modules into lib.

Correct typo in pwr.c

Add two new functions to timer.c to preset the counter (for use
with deadman style timeouts) and to identify an interrupt
source.

Also noticed lib/makefile.include didn't clean lib/stm32, which
isn't a target. Added a fix.
2012-10-16 14:05:45 -07:00
Nicolas Schodet
3aab6220d8 Add C linkage declaration for C++ usage 2012-09-02 17:12:58 +02:00
Ken Sarkies
52533a6e3d STM32F1xx: Changed markup to get more control over documentation, each
file having its own group module rather than using @file.

No code changes except for the following:

gpio: Added function to map the eventout signal plus two Remap functions
dma: Prevent changing base addresses while channel enabled (see datasheet)
pwr: Added pwr.c (new file)
timer: Removed the last function that I introduced recently; there is already
an equivalent function present. Changed some parameter names for consistency.
2012-08-20 17:19:20 +09:30
Ken Sarkies
52fd7c7976 STM32F timers. Doxygen markup added, and some code changes:
1. Remove the extra mask (TIM_DIER(timer_peripheral) & flag)
in timer_get_flag. Not all flags in SR relate to IRQs and the flags that
do might be useful even if interrupts not enabled.

2. In a number of functions (e.g. timer_set_output_idle_state) that only
apply to advanced timers, add test for TIM1 and TIM8, as done in some others.

3. Added timer_force_event to manipulate the EG register

TBD DMA burst - can't get my head around why this would be useful.
Someone must have thought so!
2012-07-10 09:32:47 +09:30
Gareth McMullin
8820277f09 Added functions for configuring timers in slave mode. 2012-04-08 14:12:21 +12:00
Gareth McMullin
a8ec86a527 Added functions for timer input capture polarity and enable/disable. 2012-04-08 13:55:16 +12:00
Gareth McMullin
4b041697f4 Added convenience function for timer input selection. 2012-04-08 11:56:42 +12:00
Gareth McMullin
a62473fbdf Added convenience funcions for timer input capture filter and prescaler. 2012-04-08 11:11:52 +12:00
Gareth McMullin
567faa9b61 Corrected parameters of timer_set_mode() to u32. 2012-04-07 20:31:56 +12:00
Gareth McMullin
3be6cd8f76 Corrected bit definitions for capture/compare input selection.
Thanks to Linux Casassa.
2012-04-07 09:01:39 +12:00
Piotr Esden-Tempski
43561de329 License change of the library to LGPL, version 3 or later.
Agreed to by all the significant contributors to the library.
2012-03-02 14:44:49 -08:00
Stephen Caudle
1fea1df39a Fix more STM32 whitespace issues 2011-10-31 11:11:03 -04:00
Piotr Esden-Tempski
c7587f11ec Added get flag and get counter functions to timer. Allow proper interrupt handling and recording timer counter values. 2011-02-01 22:43:18 -08:00
Piotr Esden-Tempski
d40fb96fcf Added set prescaler and set repetition counter functions to timer. 2011-01-31 22:08:37 -08:00
Piotr Esden-Tempski
92edc113f9 Added timer reset function. 2011-01-31 16:30:12 -08:00
Piotr Esden-Tempski
e85c55a9a7 Added timer flag reset function. 2011-01-31 16:15:09 -08:00
Piotr Esden-Tempski
dd0018ffdf Added interrupt and event generation handling functions to timer. Updated pwm 6step example to use those and commutate on button press using PWM ON scheme. 2011-01-31 13:28:54 -08:00
Piotr Esden-Tempski
59293a9640 Added break and dead time convenience functions. Adapted 6step example to reflect that. 2011-01-28 16:04:36 -08:00
Piotr Esden-Tempski
a1bd228c87 Replaced OC mode selection with an enum, makes it simpler to use. 2011-01-28 15:11:52 -08:00
Piotr Esden-Tempski
5975750e5e Added output compare channel convenience functions and adapted the pwm_6step example accordingly. 2011-01-27 22:18:34 -08:00
Piotr Esden-Tempski
d608049563 Started a pwm 6step output example. Enabled timer convenience functions and some minor fixes that showed themselves while writing the bare bone example. 2011-01-27 17:03:13 -08:00
Uwe Hermann
8f251e8a9d Some more file/path restructuring.
All #includes now explicitly use the "<libopencm3/stm32/rcc.h>" format.
If you want to get rid of the "libopencm3" prefix in your local project you
can add a respective -I entry in your Makefile (not recommended though).

All .ld files and .a libs are installed in $(TOOLCHAIN_DIR)/lib
directly (as before), but are now renamed to avoid potential
conflicts now or in the future. Examples:

  libopencm3_lpc13xx.a
  libopencm3_lpc13xx.ld
  libopencm3_stm32.a
  libopencm3_stm32.ld
2010-12-31 18:18:39 +01:00