381 Commits

Author SHA1 Message Date
Frantisek Burian
09fcb14f74 [F0] Add new irq's
Be warned that this commit changes names of some old definitions. This may broke old code !
2014-02-07 07:46:54 +01:00
Frantisek Burian
9c0ca88c2e [F0] Update CRCto be compatible wih RM0091 Rev. 5 2014-02-07 07:46:54 +01:00
Frantisek Burian
fc9a7260c2 [F0] Add new peripheral Clock Recovery Subsystem as defined in RM0091 Rev. 5 2014-02-07 07:46:54 +01:00
Frantisek Burian
f244bc87dd [F0] Adapted USB to be compatible wih RM0091 Rev. 5 2014-02-07 07:46:53 +01:00
Frantisek Burian
55750d5dc6 [F0] Updated RCC module to be compatible wih RM0091 Rev. 5 2014-02-07 07:46:53 +01:00
Frantisek Burian
c2f73b9524 [F0] Updated Uart module to be compatible wih RM0091 Rev. 5 2014-02-07 07:46:53 +01:00
Frantisek Burian
8b0a591ca5 [F0] Updated memorymap.h to meet RM0091 Rev. 5 2014-02-07 07:46:53 +01:00
Frantisek Burian
8d5ad52e0f Fix the stm32f0 evident bugs 2014-02-06 11:23:01 +01:00
Stefan Agner
7681597e42 Use type suffix to avoid warnings
When compiling with all warnings enabled, some defines can lead to
warning due to missing unsigned type suffix:

warning: integer overflow in expression [-Woverflow]

This fix should not affected behavior at all, since calculation with
such overflows lead to the same actual address when writing to that
location. However, it makes the warning disappear and also defines
the right data type for a memory location.
2014-02-06 00:59:39 +01:00
Ken Sarkies
0af6d06eda Deduplication of flash code for STM32F0 and F1.
Extension of code for STM32F1 to allow for dual bank series XL.
Small changes to documentation for F2, F4 and L1 to add a parameter reference.

Tested with STM32F103RBT6
(note: tests show that the PG bit must be cleared after programming, otherwise
a subsequent erase attempt fails. This has been added to flash_program_half_word
for F0 and F1 only. A fix for the other families is not included in this PR.)
2014-02-06 00:52:42 +01:00
Frantisek Burian
a4d9a41093 [Style] Don't use editor droppings in files, please. 2014-02-06 00:46:05 +01:00
cmcmanis
07d0076934 Updates for STM32F429 chip
After a few rounds of review, changes are added to support
additional peripherals of the STM32F427/429
2014-02-06 00:41:52 +01:00
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
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
Piotr Esden-Tempski
a909b5ca9e [Style] Global style fix run. 2014-01-03 01:07:30 +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
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
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
Karl Palsson
638eeebeec [stm32] Add Factory Calibration values where available
Add memorymap entries for ST calibration data, the vref internal, and the temp
sensor at 30C and 110C for the parts that provide this data.

F1 and F2 do not appear to have this anywhere.
2013-12-04 22:52:17 +00:00
Karl Palsson
50daf0ef1e [stm32f3] Fix USART1 memory base address
Thanks to Uwe Bonnes on the mailing list.

Confirmed in the f37x and f30 ref manuals
2013-12-04 22:20:40 +00:00
BuFran
6570f6eb07 Fix the order of ADC injected channel list
According to RM0090, page 301, paragraph 11.13.12 Note. (For F4, for F1 and F3 is it in the corresponding manuals)

The JSQR are filled always ending at SQR4 ie for those lists we must set this list:

(A)       ->                               JSQ4 = A,
(A,B)     ->                     JSQ3 = A, JSQ4 = B,
(A,B,C)   ->           JSQ2 = A, JSQ3 = B, JSQ4 = C,
(A,B,C,D) -> JSQ1 = A, JSQ2 = B, JSQ3 = C, JSQ4 = D,

The readed values are in correct order, starting from JDR1:

(A)       -> JDR1 = A,
(A,B)     -> JDR1 = A, JDR2 = B,
(A,B,C)   -> JDR1 = A, JDR2 = B, JDR3 = C,
(A,B,C,D) -> JDR1 = A, JDR2 = B, JDR3 = C, JDR4 = D,
2013-12-04 22:03:23 +00:00
Karl Palsson
5cbf5619a1 [stm32] Unify f0/f3 SPI and correct all makefiles
The common code wasn't being included in L1 builds, even though the headers now
included the correct definitions.

This combines the two f0 and f3 spi files, which previously differed only in
the number of spi peripherals defined.

Files were renamed to the full "l1f124" style, not because I like it, but
because it's the convention we have, so it's best to apply it rigourously.

Tested on L1 and F100 boards, compile tested only for others, but the examples
repository all compiles too.  (Though the lack of SPI examples for all
platforms was how this broke in the first place)
2013-11-07 21:50:48 +00:00
Karl Palsson
8e44177a66 [stm32] SPI includes got jumbled for for DFF
DFF exists at bit 11 for f1, f2, f4 and l1, but the f0 and f3 have that bit as
CRC len and use CR2 for data size bits instead.  The merging of the F3 and F0
and attempts to put common data in common places broke the l1 code.

F3 and F0 SPI headers are still almost completely identical.
2013-11-07 21:50:48 +00:00
Karl Palsson
a99f4fb620 [stm32] Use correct offsets for UniqueID bits
STM32L1 has a different set of offsets, not just a different base
address, so we can't have common registers definitions.  Also, out of
F0,F1,F2,F3,F4,L1, only the F1 has the odd note about 2x16bit registers
and 2x32bit registers with one 16bit register marked as "This field
value is also reserved for a future feature."  Therefore, replace the
awkward reading out as multiple words and just copy them in.

F0,F2,F3,F4 were missing definitions altogether.

This does _not_ attempt to address the problem of the mismatched base
addresses for Medium+ and High Density L1 parts.
2013-10-15 11:16:14 +00:00
BuFran
d63bf5ac64 [STM32F3:doc] Add doxygen documentation page to output 2013-08-22 23:08:52 -07:00
BuFran
e19270b3bf [STM32F0:ADC] Add supporting functions to the module 2013-08-22 17:18:42 -07:00
BuFran
81982916e2 [Doxygen] Add complete documentation page to STM32F0 2013-08-22 17:18:42 -07:00
BuFran
4ff19fa2b4 [Style] Unified commenting style on F0 2013-08-22 17:18:41 -07:00
BuFran
efc2489d2c [Stylecheck] Code cleaned to current stylecheck script 2013-08-22 17:18:41 -07:00
BuFran
210a17ec97 [STM32F0:SPI] Add initial support 2013-08-22 17:18:41 -07:00
BuFran
72f38401c0 [STM32F0:I2C] Add register definitions 2013-08-22 17:18:40 -07:00
BuFran
662aace389 [STM32F0:TSC] Add register definitions 2013-08-22 17:18:40 -07:00
BuFran
7487a22c7e [STM32F0:CEC] Add register definitions 2013-08-22 17:18:40 -07:00
BuFran
9952768c42 [STM32F0:DAC] Add register definitions 2013-08-22 17:18:39 -07:00
BuFran
a073758cb4 [STM32F0:ADC] Add register definitions 2013-08-22 17:18:39 -07:00
BuFran
1345a3403c [STM32F0:EXTI] Add prelimnary support of exti, common file now in common directory 2013-08-22 17:18:39 -07:00
BuFran
cd9ba87073 [STM32F0:SYSCFG] Add support for SYSCFG. Old file moved to common directory for L1 and F234 2013-08-22 17:18:39 -07:00
BuFran
9f8dd28a5c [STM32F0:COMP] Add preliminary support of module 2013-08-22 17:18:38 -07:00
BuFran
4bb18baa59 [STM32F0:RTC] Renamed common files to be consistent to file naming scheme 2013-08-22 17:18:38 -07:00
BuFran
cc4c164ebe [STM32F0:DMA] Renamed common file to meet all supported families, added missing files 2013-08-22 17:18:37 -07:00
BuFran
8b0656459b [STM32F0:DMA] Add initial support 2013-08-22 17:18:37 -07:00
BuFran
62a8aca04a [STM32F0:RTC] Add initial support 2013-08-22 17:18:37 -07:00
BuFran
c99be0fb96 [STM32F0:IWDG] Add initial support 2013-08-22 17:18:37 -07:00