Commit Graph

49 Commits

Author SHA1 Message Date
Federico Ruiz Ugalde ef762f0448 Stm32f3: usart support added. 2013-07-07 16:01:48 -07:00
Federico Ruiz Ugalde 78236d6e00 Fixed missing gpio F port stm32f3. 2013-07-07 16:01:47 -07:00
Federico Ruiz Ugalde be841154a9 i2c support added.
Most of the changes went to i2c_common_all.h file.
F3 is considerably different than all the other in i2c.
2013-07-07 16:01:47 -07:00
Federico Ruiz Ugalde 3af5833b83 Initial support for stm32f3. Changes in makefiles, gpio.
- Makefiles now include building f3 src directory.
- Gpio support added. gpio_common_f24 changed to support also f3.
- f3 still not compiling, but f2 compile not broken (probably also f4).
2013-07-07 16:01:45 -07:00
Piotr Esden-Tempski beeb9c3f65 [Style] Do not declare new types if not really necessary. 2013-06-30 22:20:51 -07:00
Piotr Esden-Tempski 647b878031 [Style] Coding style fixes.
* No trailing white spaces
 * No sapces before tabs
 * "int *var" and not "int * var"
2013-06-30 22:09:25 -07:00
BuFran 035c67ced6 Add preliminary support for Cryptographic coprocessor on stm32 F2 and F4 2013-06-30 21:20:42 -07:00
Piotr Esden-Tempski fb5c86db07 Spellchecking fixes. 2013-06-16 14:06:37 -07:00
Piotr Esden-Tempski 169dbd6c08 Dropped raw option on github file archive links. 2013-06-13 11:26:16 -07:00
Piotr Esden-Tempski e4a86e269e Replaced goo.gl links with links to our new file archive at github.
https://github.com/libopencm3/libopencm3-archive
2013-06-13 11:20:04 -07:00
Piotr Esden-Tempski 8da7fbd71e Changed to use accessors instead of casting to volatile pointers.
In places where we were defining memory mapped peripheral buffers we
were using directly a cast to "volatile int_type *". For consistency we
should use dereferenced accessor like: &MMIO32(address)
2013-06-12 21:37:55 -07:00
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
Piotr Esden-Tempski 99a909dba0 Fixed "function declaration isn't a prototype" warning introduced by the last patch. 2013-06-02 18:25:52 -07:00
Mikhail Avkhimenia 15e35d5bc1 [stm32] Added basic support for hash processor
Added hash processor register definitions and main functions. Hash
processor is supported in stm32f21, stm32f41 and stm32f43 and can be
used to calculate Md5 and Sha1.
2013-06-02 18:23:49 -07:00
Ken Sarkies f5c9bdfe61 Changes to doxygen markup to solve a few problems that upset
doxygen, and to correct minor errors.
2013-06-02 18:17:49 -07:00
Fergus Noble 4ad30d56b4 Add higher level flash_program function for f2/f4 to write a buffer into flash. 2013-05-10 18:53:19 -07:00
Fergus Noble 410be2a39a **** WARNING **** This change may break your code!!!
Change flash_erase_sector (f2/f4) to take numerical sector argument.

As opposed to using one of the defines in the header, this is more convenient when programatically deciding which sectors to erase.
2013-05-10 18:51:01 -07:00
Fergus Noble b039504494 Moving stm32 f2/f4 flash code into the common area. 2013-05-10 18:34:55 -07: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
Ken Sarkies cbb4756440 As requested (6 Feb 2013) change DMA interrupt flag names
in STM32/common, for dma_common_f24, to match those used in dma_common_f13.
Examples compile OK
2013-04-26 12:12:03 +09:30
Piotr Esden-Tempski c0aefb6ad3 Fixed dma interrupt flag related definitions. 2013-04-23 20:25:42 -07:00
Alan Braithwaite 67903bfbfe API change to remove dual loading default case for dac_load_data_buffer_single
Also change dac_data from u32 to u16
2013-04-20 00:31:30 +02:00
Ken Sarkies 1627cd60c3 Documentation structures added to place the non-STM32 families into the documentation tree.
Actual documentation has not been added. Volunteers?
2013-04-14 15:30:02 +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
lappi af8c5a85d6 [stm32] Added *DECLS in stm32/common/gpio_common_all.h and stm32/l1/rcc.h 2013-03-01 21:03:59 +04:00
Michael Aherne dd75633245 Adding some useful functions for wakeup timer interrupts 2013-02-26 21:22:58 -08:00
Michael Aherne 8c8b6440e7 Formatting and commenting
- No changes to content
- Lots of comments added
- Tabs --> spaces  and uniform spacing
2013-02-26 21:22:58 -08:00
Michael Aherne 8498b54c66 Minor fixes to RTC definitions 2013-02-26 21:22:58 -08:00
Piotr Esden-Tempski 5b596c72d6 [stm32] [lib] Fixed declaration of spi_clean_disable to match implementation. 2013-02-26 20:03:00 -08:00
Zachary Crockett 9d24a480ae Implement SPI clean disable from TODO comment 2013-02-26 19:59:15 -08:00
Piotr Esden-Tempski 80fd23580a Fix all warnings for stm32f1 lib. 2013-02-26 17:14:31 -08:00
Michael Aherne c51e01e0fe Remove duplicate declaration 2013-02-26 16:20:03 -08: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 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
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
Roger Light a4a4255555 STM32: Move RNG to common area and add support for the F2. 2012-12-12 20:47:38 +00:00
Ken Sarkies e34ad9b3d2 rebase and fix 2012-11-13 18:41:31 +10:30