Commit Graph

295 Commits

Author SHA1 Message Date
Piotr Esden-Tempski 971a295d43 Adjusted path to nvic.h. 2012-11-07 16:28:29 -08:00
Karl Palsson db5d19b4d4 Update documentation to reflect reality 2012-11-07 21:54:18 +00:00
Karl Palsson bffaa72f7e Remove debug code. 2012-11-07 21:54:18 +00:00
Karl Palsson ce8f47e7df Enable nvic and exti support for L1
And include an example that uses it.
2012-11-07 21:54:18 +00:00
Karl Palsson 25acaa5878 Add usart support for L1.
Only tested with basic tx blocking, ie, the same example code as on
F2/F4, but the description of the block is almost identical.
2012-11-07 21:50:27 +00:00
Karl Palsson 4941286454 STM32L1 support, rebased onto upstream generalizations branch.
Working example again.
2012-11-07 21:50:27 +00:00
Karl Palsson e4f84278f2 Add most of the rcc functions.
(Add the forgotten gpio.c file from before)
2012-11-07 21:50:27 +00:00
Karl Palsson 9aed64a19d Finish RCC definitions => Working example! 2012-11-07 21:50:27 +00:00
Karl Palsson 8318384cf1 More progress towards L1 support.
Believe gpio is complete, but untested without finishing at least the
RCC defines.

RCC defines are a work in progress
2012-11-07 21:50:27 +00:00
Karl Palsson f1f1aa84f3 Use make flags to help control where the library is installed
Where the library is installed has quite an affect on what -L and -I
flags are used.  If you install into the toolchain, you don't want
to use them at all, but if you install out of tree (/opt/mycm3 for
example) you need to specify the -L and -I flags.

Update the documentation and the example makefiles to support this
2012-11-07 21:50:27 +00:00
Piotr Esden-Tempski 08129a5644 Fixed stm32f4-discovery/usb_cdcacm example for deduplication patches. 2012-10-31 13:41:24 -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
chrysn 99d7b21032 define platform specific constants for all chips
previously, only stm32 chips passed the information about which chip to
build on into the compiler. this information is essential to dispatch,
thus defining LPC13XX, LPC17XX, LPC43XX and LM3S in analogy to
STM32F1..4.
2012-10-19 19:10:42 +02:00
chrysn bc5146b710 unified systick handling
the only change this results in in the example binaries is in the
hackrf-jellybean/systick example, where the the check in
systick_set_clocksource for overflowing from the stm32 area gets used.
2012-10-18 22:48:14 +02:00
chrysn e20f1c0d8f unify scb (system control block)
these register definitions are common to all cortex mcus. some of the
registers might not be implemented everywhere (especially the floating
point registers), but defining them does no harm.

this modification does not result in any changes in the example
binaries.
2012-10-18 21:45:20 +02:00
chrysn c39c5c147d adapt lpc43xx example to generalizations 2012-10-18 21:09:35 +02:00
chrysn 94ce82396b modified examples to use libopencm3/cm3/nvic.h instead of /stm32/ 2012-10-18 13:28:03 +02:00
Felix Ruess b7ebe6e705 fix clean target for example makefiles if the compiler is not in PATH 2012-10-16 14:09:42 -07:00
Stephen Dwyer 2b8fbfc433 updated the lisa_m_2 (STM32 F1) ADC examples for recent code changes to stm32f1 adc.c and adc.h 2012-10-07 17:53:09 -06:00
Stephen Dwyer 794f3fbeda oops, had to update bin names in makefiles for adc examples 2012-10-07 15:38:02 -06:00
Stephen Dwyer bece4c30d3 added different ADC sampling examples for the LisaM v2 including:
* simple polling of an injected channel
 * timer triggered sampling of an injected channel
 * timer triggered sampling and IRQ handling of an injected channel
 * timer triggered sampling and IRQ handling of 4 injected channels
2012-10-07 15:38:02 -06:00
Piotr Esden-Tempski 9e77f8c361 Merging pull request #28 Random number generator defenition and example.
Merge remote-tracking branch 'tiltit/master'
2012-10-05 13:08:03 -07:00
Piotr Esden-Tempski cb60e37608 Merging pull request #37 Adds hard-float support to stm32f4, with a nice mandelbrot example
Merge remote-tracking branch 'schodet/hard-float'
2012-10-05 13:03:58 -07:00
Ken Sarkies 7d0611609b Code changes to stm32f1 adc.c and adc.h
remove rcc_set_adc_clk - use rcc version
Added functions:
 - adc_power_on
 - adc_start_conversion_direct
 - adc_set_dual_mode
 - adc_eoc
 - adc_eoc_injected
 - adc_read_regular
 - adc_read_injected
 - adc_set_injected_offset
Tested dual mode scanned regular, but no tests of injected yet.
Changes: "discontinuous" was misspelled.
 - adc_set_discontinuous_mode_regular - added "length" parameter
 - adc_disable_discontinuous_mode_regular - name change
 - adc_enable_discontinuous_mode_injected - name change
 - adc_enable_automatic_injected_group_conversion - disable triggers
 - adc_enable_jeoc_interrupt - name change to match common usage in lib
 - adc_disable_jeoc_interrupt - ditto
 - adc_enable_external_trigger_regular - remove incorrect test on parameter
 - adc_enable_external_trigger_injected - ditto
 - adc_set_sample_time - name change to match function's purpose
 - adc_set_conversion_time_on_all_channels - ditto
 - adc_set_injected_sequence - changed order of register loading (ref Barlow's issue)
 - adc_enable_analog_watchdog_on_all_channels - flipped AWDSGL
 - adc_enable_analog_watchdog_on_selected_channel - ditto
added aliases for expected commonly used functions to avoid sudden user code breakage

In adc.h, corrected errors in SQR names
added "deprecated" compiler warnings to adc_on and to aliases defined in adc.c
2012-10-05 13:50:42 +09:30
Daniel Serpell aac5909ff1 Add a floating-point example to the stm32f4.
This example calculates a mandelbrot fractal using floating point
in C.
2012-09-27 23:12:18 +02:00
Daniel Serpell 584052c28c Compile stm32-f4 library with floating point support.
This enables hard-float in the compilation of library and examples
for the stm32f40* chips.
2012-09-27 23:12:18 +02:00
Paul Sokolovsky d6e0e6e976 Explicitly link example binaries statically.
This allow good share of binaries be linkable (and actually run) with a
typical distro-packaged ARM toolchain (Cortex-A and Linux targetted).
2012-09-25 00:31:31 +03:00
Jason Kotzin 34beeae925 USB core updated for reentrance based on Christian Cier-Zniewski's branch 2012-09-13 10:43:35 -07:00
Piotr Esden-Tempski dcd98dde86 Renamed adc example to be more descriptive. 2012-09-10 14:01:24 -07:00
Piotr Esden-Tempski d1cc8ca2b3 Added simple adc example for lisa/m 2. 2012-09-10 14:01:23 -07:00
Oliver Dille 099a5626db Random number generator example. 2012-09-07 22:43:10 +02:00
Thomas Waldecker 5604182467 added a make target stlink-flash to use the stlink on the stm32f4-disovery 2012-09-06 11:33:01 +02:00
Piotr Esden-Tempski 11727f56c9 Minor build system fixes. 2012-08-25 19:53:15 -07:00
Piotr Esden-Tempski fa5d689f78 Use make wildcard command for source dir detect. Library path fix.
Thanks ni!
2012-08-14 17:48:23 -07:00
Piotr Esden-Tempski b82e7eee52 Examples detect if they are being built in src dir.
If an example is in the libopencm3 source directory it will use the
locally built library instead of the system library.

When you copy an example out of the libopencm3 tree it will
automatically detect it and build using the system wide installation.
2012-08-13 15:29:01 -07:00
Piotr Esden-Tempski 3441bba1c4 Changed local build target for library and linker files.
- The library files are now being built into the lib subdirectory of the
  source.
- The linker files for each library are being copied into the lib source
  subdirectory.

Motivation: The relative locations of files in the source directory after make
are now the same as after make install now. This makes it easier to
reuse examples with their makefiles outside of the libopencm3
sourcecode directory.
2012-08-13 15:19:57 -07:00
Karl Palsson 6574baa767 Fix link flags to specify cpu instead of (wrong) arch.
-march=armv7 is NOT right for cortex-m3, and results in unexpected
arm code being linked in when using multilib toolchains
2012-06-29 02:09:50 -07:00
TitanMKD c65ca01044 Fix Linker bug copy ROM to RAM & exec from RAM (need more test). 2012-06-13 01:05:49 +02:00
TitanMKD 3c8e76f679 Added ROM to RAM code copy & exec with example of how to use it (miniblink_rom_to_ram). 2012-06-10 11:44:36 +02:00
TitanMKD 8d97dbc7c3 Work on scs.h register and also nvic.h.
ARM Interrupt API (see nvic.h).
ARM SysTick API (see systick.h).
Example using both Interrupt and SysTick and blink LED1/2/3 see systickdemo.c.
2012-06-09 18:27:42 +02:00
Michael Ossmann 161aad0139 quick comment fix 2012-06-07 07:14:17 -06:00
TitanMKD 8adc873e84 Fixed SSP, tested with Oscilloscope Write work fine (tested SPI Mode).
For more details on tests see ssp/README.
2012-06-06 00:30:25 +02:00
Michael Ossmann a39df46db4 removed some unused SCU config 2012-06-05 07:33:22 -06:00
Michael Ossmann 3a4a6b75de resolved minor conflict 2012-06-04 18:00:20 -06:00
TitanMKD d7a7fd9d30 * Added SSP Driver (Not Tested).
* Replaced leading space by tabulations.
2012-06-05 01:41:54 +02:00
Michael Ossmann 5698016877 moved stuff out of i2cdemo.c and into drivers/headers 2012-06-04 17:30:08 -06:00
Michael Ossmann 44db38301c fixed i2cdemo to supply 1V8 for Si5351C output supply 2012-06-04 16:41:12 -06:00
TitanMKD 23ad036ed6 Merge branch 'master' of git://github.com/mossmann/libopencm3 2012-06-03 23:49:00 +02:00
Michael Ossmann b55d006d02 got I2C demo working but stuff still needs to be moved out of here and into drivers 2012-06-03 14:55:51 -06:00
TitanMKD 67a048b5b0 Added SCU I2C0 specific configuration. 2012-06-03 18:57:33 +02:00