1677 Commits

Author SHA1 Message Date
Karl Palsson
27bc12de61 stm32: unify bulk of adc convenience functions
This unifies stm32f1, l1, and f4 convenience functions for adc.  The code
should be useable for f2 and f37x as well, but that needs hardware for testing,
and there was no existing implementation. This is the reason for the
"adc_common_v1.c" name, as trying to put all the different families into the
common file name has become too cumbersome.

All of the deprecated routines have been dropped, they've been marked
deprecated for a very long time now, and porting them seemed unnecessary.

This has been tested on f1, l1 and f4 discovery boards, and is based on some
existing l1/f1 unification code from
https://github.com/karlp/libopencm3/tree/rme_l1_master
2014-02-05 10:39:00 +00:00
Karl Palsson
3eaeaf693c stm32: ADC peripheral style 1 header unification
This pulls out all the common header definitions for the F1, L1, F4 and F37x
parts.  It's verified against the datasheet for F2 as well, but we don't have
any good F2 test boards or any support for that yet.  (The F2 header would be
_exactly_ the same as the F4 header, so it's a target for a future round of
unification, not this one)

Tested with f1, f4 and l1 examples from the examples repository.
2014-02-05 10:38:45 +00:00
memeruiz
06f11df2a9 [stm32f3] fix DMA memory address and complete RCC enable definitions. 2014-02-01 21:34:27 +01:00
memeruiz
c858e9552a [stm32f3] Because f0 and f3 dma units are equal, dma irq names have been changed to be the same. 2014-02-01 21:17:10 +01:00
memeruiz
cf21290488 [stm32f3] Moving common f0 an f3 functions together. New init_master function. 2014-02-01 21:11:58 +01:00
Felix Ruess
8782a60b48 [stm32][f1|f3] fix adc_set_injected_sequence 2014-02-01 19:22:17 +01:00
Karl Palsson
5830a1ee8a usb-cdc: Add enums for parity/stop bit definitions
Sourced from the lm4f usb-cdcacm example, and verified against the USB CDC 1.2
standard document.  (And the 1.1 doc for good luck)
2014-01-22 20:24:04 +00:00
Frantisek Burian
5ba8b10428 Add method to clear the systick value, that is undefined at startup. 2014-01-15 22:37:45 +01:00
Ken Sarkies
3c6e9fd56d Fix a number of top level doxygen issues.
So that the navigation pane works correctly in browsers.
Some additional doc fixes put in where found (but many more still to go).
Added some dummy .c and .h files to bring the associated docs into line.
makefile changed to allow 'make html' as well as 'make doc' (the latter only does html anyway).
2014-01-15 22:19:52 +01:00
Ken Sarkies
a54a12e1c9 Documentation added to flash modules for all STM32 families. 2014-01-15 22:09:36 +01:00
Frantisek Burian
e4f4845e0c Merge pull request #242 from ksarkies/typos
Merged bugfix. Thanks.
2014-01-14 00:39:02 -08:00
Ken Sarkies
e8b1045386 Fix missing backslashes on some macro defines 2014-01-14 17:22:19 +10:30
Frantisek Burian
c9a3b6b050 Merge pull request #240 from BuFran/pulls/genlink_strip
Add support of splitting parameter classes to ARCH, DEFS, LIB
2014-01-11 15:23:18 -08:00
Frantisek Burian
b7785100c8 Add support of splitting parameter classes to ARCH, DEFS, LIB
in ARCH, there are all -m flags (will be expanded into ARCH_FLAGS in Makefile)
in DEFS, there are all -D flags (will be expanded into DEFS in Makefile)
in LIB, there are all -l flags (will be expanded into LIBNAME in Makefile)

If no MODE option specified, the generator behaves as in previous version.
2014-01-12 00:21:33 +01:00
Frantisek Burian
eb924abc10 Add dependency of stylecheck result file to its source
In previous version, if teh file has been changed, stylecheck file was not generated.
2014-01-11 11:28:15 +01:00
Piotr Esden-Tempski
a909b5ca9e [Style] Global style fix run. 2014-01-03 01:07:30 +01:00
a1ien
67efedec54 [STM32F2-F4:CRYPTO]Fix hash_set_last_word_valid_bits() 2014-01-02 22:17:46 +01:00
Frantisek Burian
bfc65271c0 Remove compatibility with old systick.
Use only new names, from ARM manual, because systick.h is part of ARM core, not vendor.
2014-01-02 22:09:16 +01:00
Frantisek Burian
d541c14110 [CM3] Systick Add helper function to easily set the desired frequency 2014-01-02 22:09:16 +01:00
BuFran
52758bb8fd [Ethernet] Add support for the ethernet module STM32Fxx7 and Micrel PHY 2014-01-02 22:02:54 +01:00
BuFran
723e1a69bd Better method of reset and clock handling with RCC, support L1, F1, F2, F3, F4 2014-01-02 22:00:11 +01:00
BuFran
33f75a529d [LINKER] Fix the -m parameter 2014-01-02 21:50:02 +01:00
BuFran
bebcd88431 [LINKER] Clear ARCH_FLAGS if the DEVICE is specified 2014-01-02 21:50:02 +01:00
BuFran
f015c8209b [LINKER] Add ARCH_FLAGS to linker definition file 2014-01-02 21:50:02 +01:00
BuFran
d15a0e63fe [LINKER] Add single underscore to all definitions, no -D for dashed param.
This makes possibility for the script to append the definitions to CFLAGS
and LDFLAGS, and with the feature of disabling of -D prependation it will
make possible to generate ARCH_FLAGS generic to each specific chip.
2014-01-02 21:50:02 +01:00
BuFran
ea589b9a4e [BUILD] Updated to make from examples directory correctly 2014-01-02 21:50:02 +01:00
BuFran
8d94bdc11c [GENLINK] Make tests in paralell
usage:

make genlinktests -j

speedup: 4 times on 8-core system
2014-01-02 21:50:02 +01:00
BuFran
6a41e5fccb [GENLINK] Moved linker template source to ld directory 2014-01-02 21:50:02 +01:00
BuFran
08e08f5f84 [GENLINK] Edit the documentation to match current version 2014-01-02 21:50:02 +01:00
BuFran
30d4540d9e [GENLINK] Code Cleanup 2014-01-02 21:50:01 +01:00
BuFran
ff3b177c47 [GENLINK] Add test patterns 2014-01-02 21:50:01 +01:00
BuFran
89236f0339 [GENLINK] Add Test suite + simple test 2014-01-02 21:50:01 +01:00
BuFran
bfdc2cd991 [GENLINK] correct the whitespace bug 2014-01-02 21:50:01 +01:00
BuFran
ea5bbdc08c Add Example makefile to linker script generator dir 2014-01-02 21:50:01 +01:00
BuFran
d38f3bbde5 Add Readme to linker script generator dir 2014-01-02 21:50:01 +01:00
BuFran
de5117e945 Add example to the device database file 2014-01-02 21:50:01 +01:00
BuFran
19fbf4e582 Add the linker generator makefile
Example of use is included in the file header
2014-01-02 21:50:01 +01:00
molnarkares
f7620ae148 * unnecessary PG bit clearing removed from flash word and half-word programming to improve speed
* missing PG bit set is inserted at word programming
2014-01-02 21:41:33 +01:00
Frantisek Burian
db3dc42dd6 [CM3:DWT] Add the file to library build process for each target 2014-01-02 21:25:26 +01:00
Frantisek Burian
7ccc0d053e [CM3] Add register definitions for Debug Watch Trace point.
Add provision functions for the use of CPU counter as a high-resolution timer for code benchmarking purposes
2014-01-02 21:25:26 +01:00
BuFran
aa9b94ee1d [Stylecheck] Correct style in the CM3 addition 2014-01-02 21:06:05 +01:00
Frantisek Burian
8e96592f55 [CM3] Add atomic operation support
Tested with -O0, -O2 and -Os generating correct code with gcc-arm-embedded 2013q2.
note -std=c99 or newer needed
2014-01-02 21:06:05 +01:00
Frantisek Burian
17fc71a462 [CM3] Add support for Cortex M interrupt masks
FIX: add doxygen documentation to the module
2014-01-02 21:06:05 +01:00
Frantisek Burian
065b47f8ba [CM3] Add core interrupt masking for easy creation of atomic blocks 2014-01-02 21:06:05 +01:00
Karl Palsson
5c14780403 [build] Remove PyYAML dependency
This converts all the YAML files to JSON files, as json parsing is built
into python instead of being a separate library requiring installation.

YAML is a superset of JSON, but putting comments in is not quite as obvious
as it is in yaml.

The following glue was used to convert yaml to json:
python -c 'import sys, yaml, json; json.dump(yaml.load(sys.stdin), sys.stdout, indent=4)' < $1 > $2

Clearly I haven't tested this on every single platform, and this
doesn't address the large blobs of yaml in the lpc4300 scripts directory,
only the cortex NVIC generation process.

I've tested a few IRQ driven example apps, and I've checked the generated
output of some known cases like the LM3s that has explicit gaps, and they are
all generated correctly.
2014-01-02 20:55:15 +01:00
Stefan Agner
b4eb8a6971 [stm32f4] add I2C frequencies
STM32F4 allows I2C frequencies up to 42 MHz, this commit adds the missing
defines.
2014-01-01 21:56:33 +01:00
Onno Kortmann
fe6b542357 STM32F0: Correctly clear pll source bits. 2013-12-16 19:42:21 +00:00
Onno Kortmann
02b4aec0a9 STM32F0: Fix the PLL multiplier table
The value '6' was twice in the table and all higher frequencies are
shifted. The values are now fitting the table in 'STM32F05xxx/06xxx advanced
ARM-based 32-bit MCUs', page 101.

PLL frequencies have been measured by selecting

    rcc_set_mco(RCC_CFGR_MCO_SYSCLK);

and measuring the output with an oscilloscope. 8, 16, 24, 32, 40 and 48 MHz
work fine from the HSI base.
2013-12-16 19:37:54 +00:00
Onno Kortmann
f622437cfb STM32F0: Fix PLL multiplication factor for 48MHz setup
It was set to overclocking configuration!
2013-12-16 19:37:07 +00:00
Onno Kortmann
868d65d872 STM32F0: Turn on PLL clock source when asked to
The STM32F05xxx/06xxx manual describes on p.98 (Sec 7.4.1) the RCC_CR
register, on which it says that bit 24 is the PLLON bit which has to be
enabled before using the PLL. This causes the PLL to be enabled with
rcc_osc_on(PLL).
2013-12-16 19:37:06 +00:00