Piotr Esden-Tempski
39fa9e4c58
Stile fixes run, 80 char boundry.
2013-06-12 21:07:35 -07:00
Piotr Esden-Tempski
34de1e776e
Changed to use stdint types.
2013-06-12 19:11:22 -07:00
Piotr Esden-Tempski
7df63fcae0
First coarse run to fix coding style in locm3.
...
Added --terse and --mailback options to the make stylecheck target. It
also does continue even if it enounters a possible error.
We decided on two exceptions from the linux kernel coding standard:
- Empty wait while loops may end with ; on the same line.
- All blocks after while, if, for have to be in brackets even if they
only contain one statement. Otherwise it is easy to introduce an
error.
Checkpatch needs to be adapted to reflect those changes.
2013-06-12 18:22:56 -07:00
Felix Ruess
0bf8324c91
stm32f1: add timer.o to objects for timer_ic_set_polarity
2013-06-04 18:44:19 +02:00
Ken Sarkies
92d1134a16
STM32: moved timer_ic_set_polarity from timer_common_all to
...
f1/timer.
Added timer_ic_set_polarity to timer_common_f24 with
the enum tim_ic_pol now including trigger on both edges.
Changed timer_slave_set_polarity to use enum tim_et_pol
rather than tim_ic_pol.
In response to suggestion of stinkydiver73 on 24 March that
timers in all families have an option for triggers on both
edges, except F1.
2013-04-26 15:30:07 +09:30
millerd
6313af8869
Small improvements of using FLASH memory in STM32F1XX
2013-04-24 15:55:15 -07:00
Nicolas Schodet
b2df978eae
Add support for static constructors and destructors
2013-04-24 22:49:25 +02: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
Austin Palmer
31aa3b6f5a
EXTI: Added function to get flag status
2013-03-01 10:36:57 -08:00
Piotr Esden-Tempski
b0233ae6fb
Added more warning CFLAGS to all makefiles.
2013-02-26 16:42:20 -08:00
Piotr Esden-Tempski
5e7ec39440
FLASH: Make sure that the flash unlock register state is cleared before trying to unlock the flash.
2013-02-26 15:25:55 -08:00
Vegard Storheil Eriksen
bc853e7ebd
Fixed gpio_primary_remap; swjdisable is pre-shifted and therefore needs to be u32.
2013-02-26 13:49:42 +01:00
Piotr Esden-Tempski
1e1859e8c7
ADC: Fix CR usage in adc_enable_discontinuous_mode_regular. Fixes #101
2013-02-25 17:15:43 -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
Karl Palsson
1eb4e6ed29
[flash] f1: use "proper" bit definition naming.
...
Part 2 of 4: updated f1 to use flash_<reg>_bit instead of just
flash_bit
2013-01-23 13:58:11 +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
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
61f2cb3f99
Move STM32F1 DMA files to respective common directories
...
This sets the stage for adding DMA to STM32F3xx (when added) and STM32L1xx as the controller appears to be identical in these.
2013-01-08 18:07:28 +10:30
Piotr Esden-Tempski
c904c3ae57
Merging pull request #63 Improvements to STM32F1 I2C, CAN, RCC, and USB (f107)
...
Merge remote-tracking branch 'icd/master'
2013-01-06 17:52:43 -08:00
Jeff Ciesielski
db35fbb7ba
Merge branch 'master' of git://github.com/libopencm3/libopencm3 into upstream-merge
2012-11-13 13:13:40 -08: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
b2af3ca540
[doc] Cosmetic.
2012-11-12 15:14:06 -08:00
Ken Sarkies
35c0863a75
Documentation updates
2012-11-12 21:44:52 +10:30
Karl Palsson
2011941b55
Vectors and Memory Map for STM32L1 series
2012-11-07 21:50:27 +00:00
Andrey Smirnov
12e1786863
Add a desig_get_unique_id_as_string
...
This commit adds desig_get_unique_id_as_string which is useful if one
wants to use device ID as USB serial number(iSerialNumber), for example.
2012-11-06 16:48:40 -08:00
Jeff Ciesielski
6c41c808c3
stm32/f1/can: Add clearing of can timing bits on init
...
This corrects a bug introduced with the addition of allowing loopback
and silent parameters in the init function.
2012-11-01 18:02:11 -07:00
Jeff Ciesielski
fa1d5f8e43
stm32/f1/can: clean up can_available_mailbox ->fewer 'if' statements
2012-10-31 17:03:26 -07:00
Piotr Esden-Tempski
507a1742dc
Merge pull request #57 F2/F4 timer merging action
...
Merge remote-tracking branch 'tdaede/f4-timer'
2012-10-31 13:47:54 -07:00
Piotr Esden-Tempski
60aa32e2b9
Merge pull request #53 CAN fixes
...
Merge remote-tracking branch 'tdaede/master'
2012-10-31 13:37:19 -07:00
Ken Sarkies
5a6b1a1934
STM32F1 Addition to DMA to add interrupt flag read and clear.
...
Additional macros and defines added to header for the purpose.
Also disable of increment modes (seem to have been omitted originally).
2012-10-31 13:35:59 -07:00
Piotr Esden-Tempski
6b2ca89f48
Merge pull request #22 fixing usb and f4 alignment issues
...
Merge remote-tracking branch 'jdk/master'
Conflicts:
lib/stm32/f1/Makefile
lib/stm32/f4/Makefile
2012-10-31 13:34:18 -07:00
Thomas Daede
d7296f176a
Move timer.c to be common to all stm32 series
2012-10-30 16:52:54 -05:00
Thomas Daede
1bb0e9b970
Add CAN support for F2 and F4 series.
...
All stm32 series currently released share the same bxCAN hardware, so share can.c among all the families.
2012-10-28 02:50:46 -05:00
Jeff Ciesielski
94abf6e529
stm32/f1: Add user_reset_hook to reset_handler w/ jump_to_dfu preset
...
This allows for pragramatic jumping to the DFU bootloader on CL devices, or
could be used for things like CRC checking of the firmware before boot
2012-10-22 14:45:44 -07:00
Jeff Ciesielski
dd5e797d61
stm32/f1/can: Add function to detect if can system has an available mailbox
2012-10-22 13:26:58 -07:00
Jeff Ciesielski
24a35126bf
stm32/f1/can: Replace mistaken logical operators with bitwise operators.
...
also: remove unnecessary parenthesis
2012-10-19 23:05:37 -07:00
Jeff Ciesielski
1cb373464c
stm32/f1/gpio: use |= instead of = when setting up registers
2012-10-19 16:33:38 -07:00
Jeff Ciesielski
527eeacbff
stm32/f1/rtc: add PLL2/3 to switch statement to avoid compiler warning
2012-10-19 16:32:37 -07:00
Jeff Ciesielski
069a758f6c
stm32/f1/rcc: add 25mhz in to 72mhz out clock tree setup function.
...
also: added support for previously undefined PLLs
2012-10-19 16:31:52 -07:00
Jeff Ciesielski
153e81bc96
stm32/f1/vector: add ability to boot to DFU bootloader
...
note: Only works on CL devices
also: this could probably use a helper function
2012-10-19 16:30:27 -07:00
Jeff Ciesielski
a2fc8768c6
stm32/f1/dma: add clear_flag helper function
2012-10-19 16:28:44 -07:00
Jeff Ciesielski
4b86c28141
stm32/f1/can: Add loopback/silent vars to init function.
...
Also: add helper function for mailbox checking
2012-10-19 16:27:17 -07:00