Stephen Caudle
c26abb6c25
Add pwr to STM32F4 makefile
2011-11-02 14:26:31 -04:00
Gareth McMullin
e0fe43357d
usb_f107: Fixed lost 4 bytes on control OUT transaction.
2011-10-31 14:09:41 -07:00
Stephen Caudle
5a89d44591
Add initial support for STM32F4
2011-10-31 00:41:19 -04:00
Stephen Caudle
05bc9d10f1
Add generic STM32F2 RCC clock function
2011-10-31 00:17:53 -04:00
Stephen Caudle
68d2e0d1e3
Fix stm32f2 RCC PLL values for 120MHz
2011-10-30 18:17:33 -04:00
Stephen Caudle
eb47f0cfc0
Add SCB from stm32f1
2011-10-30 17:42:49 -04:00
Stephen Caudle
1dc4645732
Update makefiles to reflect stm32 lib folder name changes
2011-10-30 17:42:49 -04:00
Stephen Caudle
b3a710b0bc
Rename stm32 lib folders to be consistent with include
2011-10-30 17:42:49 -04:00
Uwe Hermann
788f3870c4
Merge remote-tracking branch 'fnoble/stm32f2'
2011-10-29 22:19:12 +02:00
Gareth McMullin
284be93037
Restored OTG clock enable in RCC in f107 usb init.
2011-10-29 23:57:10 +13:00
Gareth McMullin
b05a5dcf2a
Fixed some F105/F107 USB issues. Added user callback on SOF.
...
Made examples depend on lib.
2011-10-29 21:30:26 +13:00
Stephen Caudle
fd2524beb0
Merge remote-tracking branch 'fnoble/stm32f2' into stm32fx
...
Conflicts:
lib/stm32f2/Makefile
2011-10-27 23:39:16 -04:00
Stephen Caudle
36cff03af1
Add RCC and FLASH support for STM32F2
2011-10-27 23:34:52 -04:00
Fergus Noble
0f6a0276aa
Merge branch 'stm32f2' of github.com:fnoble/libopenstm32 into stm32f2
2011-10-26 13:33:40 -07:00
Fergus Noble
869a0df701
Adding new EXTI stuff to F2 makefile.
2011-10-26 13:30:44 -07:00
Fergus Noble
7877aaeebc
Better way to toggle a pin.
2011-10-26 13:30:27 -07:00
Fergus Noble
8974be7435
Added convenience function code for EXTI on F2.
2011-10-26 13:29:52 -07:00
Fergus Noble
ae44add1b6
Merge branch 'stm32fx' of https://github.com/doceme/libopenstm32 into stm32f2
...
Conflicts:
Makefile
examples/stm32/lisa-m/fancyblink/fancyblink.ld
examples/stm32/lisa-m/usb_hid/usbhid.ld
examples/stm32/mb525/fancyblink/fancyblink.ld
examples/stm32/obldc/usart_irq/usart_irq.ld
examples/stm32/other/usb_dfu/usbdfu.c
examples/stm32/stm32-h103/fancyblink/fancyblink.ld
examples/stm32/stm32-h103/usart_irq/usart_irq.ld
examples/stm32/stm32-h103/usb_dfu/usbdfu.c
examples/stm32/stm32-h103/usb_hid/usbhid.ld
examples/stm32f1/Makefile.include
examples/stm32f1/lisa-m/fancyblink/fancyblink.ld
examples/stm32f1/lisa-m/usb_hid/usbhid.ld
examples/stm32f1/mb525/fancyblink/fancyblink.ld
examples/stm32f1/obldc/usart_irq/usart_irq.ld
examples/stm32f1/other/usb_dfu/usbdfu.c
examples/stm32f1/stm32-h103/fancyblink/fancyblink.ld
examples/stm32f1/stm32-h103/usart_irq/usart_irq.ld
examples/stm32f1/stm32-h103/usb_dfu/usbdfu.c
examples/stm32f1/stm32-h103/usb_hid/usbhid.ld
examples/stm32f2/jobygps/usart_printf/usart_printf.ld
lib/lm3s/Makefile
lib/lpc13xx/Makefile
lib/stm32f1/Makefile
2011-10-13 00:11:32 -07:00
Fergus Noble
82768447c8
Merge branch 'stm32f2' of github.com:fnoble/libopenstm32 into stm32f2
2011-10-12 23:59:16 -07:00
Fergus Noble
2095715eb1
I think we want to wait before we send the UART byte rather than after...
2011-10-12 23:58:37 -07:00
Fergus Noble
878c094871
Added alternative function for doing an SPI transfer.
2011-10-12 22:20:22 -04:00
Fergus Noble
14dcda91b0
Fixing some more header references
2011-10-12 22:20:22 -04:00
Fergus Noble
7518bc83c1
Fixing some header references
2011-10-12 22:20:22 -04:00
Fergus Noble
e772992f4c
Some more silly bugs in GPIO fixed for F2.
2011-10-12 22:18:44 -04:00
Fergus Noble
e7f909c502
Minor fixes to the SPI code, mainly you should check that the TX buffer is empty before rather than after sending.
2011-10-12 22:18:44 -04:00
Fergus Noble
53f1c75c53
Fixed bug in F2 GPIO code.
2011-10-12 22:18:43 -04:00
Fergus Noble
d1272acaad
Initial move of USART code to common, still needs some work.
2011-10-12 22:18:43 -04:00
Fergus Noble
7133e79239
Change default prefix in Makefiles to arm-none-eabi for compatability with summon toolchain out the box.
2011-10-12 22:18:43 -04:00
Fergus Noble
4d02d36d6b
Moving nvic code to common, adding F1 and F2 specific user interrupt definition headers.
2011-10-12 22:17:16 -04:00
Fergus Noble
010ee53298
Moved SPI to stm32 common.
2011-10-12 22:17:16 -04:00
Fergus Noble
72baa300ab
Moved I2C to stm32 common.
2011-10-12 22:17:16 -04:00
Fergus Noble
ca412a9ed2
Move systick to stm32 common.
2011-10-12 22:17:16 -04:00
Fergus Noble
ce7dd46aef
Update F1 libs with new header file locations.
2011-10-12 22:13:02 -04:00
Fergus Noble
a4935eef57
Add family define for the F1 Makefile and add a Makefile for the F2.
2011-10-12 22:13:02 -04:00
Fergus Noble
7524b0f4c5
Adding vector table for F2.
2011-10-12 22:13:02 -04:00
Fergus Noble
8a2cf9dd4b
Copying F1 linker script over to the F2 target, hopefully it should be the same!
2011-10-12 22:13:02 -04:00
Fergus Noble
775288bc13
Renaming things in the F1 target Makefile.
2011-10-12 22:13:02 -04:00
Fergus Noble
60dcacccb7
Some updates to the F2 GPIO header plus implementation of GPIO convenience functions.
2011-10-12 22:13:01 -04:00
Fergus Noble
424b094ce8
Renaming lib code for stm32 f1 series.
2011-10-12 22:13:01 -04:00
Fergus Noble
c63001c6cd
Henry is a grammar nazi.
2011-10-04 17:13:49 -07:00
Fergus Noble
4809f7dacf
Added alternative function for doing an SPI transfer.
2011-10-04 16:06:01 -07:00
Piotr Esden-Tempski
03a4a18ed6
Switched all makefiles to arm-none-eabi default.
2011-10-04 13:08:35 -07:00
Fergus Noble
71909482de
Fixing some more header references
2011-09-27 17:19:24 -07:00
Fergus Noble
59c1c40e2c
Fixing some header references
2011-09-27 17:18:15 -07:00
Fergus Noble
d4d7370963
Some more silly bugs in GPIO fixed for F2.
2011-09-23 13:05:12 -07:00
Fergus Noble
3c67ef7d07
Minor fixes to the SPI code, mainly you should check that the TX buffer is empty before rather than after sending.
2011-09-23 13:04:54 -07:00
Fergus Noble
25ed4d5af0
Fixed bug in F2 GPIO code.
2011-09-22 14:23:25 -07:00
Fergus Noble
508e18b26b
Initial move of USART code to common, still needs some work.
2011-09-22 13:52:43 -07:00
Fergus Noble
551d069ed3
Change default prefix in Makefiles to arm-none-eabi for compatability with summon toolchain out the box.
2011-09-16 23:14:07 -07:00
Fergus Noble
3a426b34aa
Moving nvic code to common, adding F1 and F2 specific user interrupt definition headers.
2011-09-15 16:26:39 -07:00
Fergus Noble
97413a83f8
Moved SPI to stm32 common.
2011-09-15 15:07:07 -07:00
Fergus Noble
318deef8cb
Moved I2C to stm32 common.
2011-09-15 15:06:28 -07:00
Fergus Noble
7889cb66c7
Move systick to stm32 common.
2011-09-15 14:59:55 -07:00
Fergus Noble
5b4cbe7d87
Update F1 libs with new header file locations.
2011-09-15 01:18:49 -07:00
Fergus Noble
b546f9b5a9
Add family define for the F1 Makefile and add a Makefile for the F2.
2011-09-15 01:18:26 -07:00
Fergus Noble
4366d5e600
Adding vector table for F2.
2011-09-15 00:59:30 -07:00
Fergus Noble
b5883df455
Copying F1 linker script over to the F2 target, hopefully it should be the same!
2011-09-15 00:07:14 -07:00
Fergus Noble
a43e52124a
Renaming things in the F1 target Makefile.
2011-09-15 00:06:35 -07:00
Fergus Noble
6912cbe71f
Some updates to the F2 GPIO header plus implementation of GPIO convenience functions.
2011-09-14 23:57:43 -07:00
Fergus Noble
bd33f2d256
Renaming lib code for stm32 f1 series.
2011-09-12 18:25:11 -07:00
Uwe Bonnes
32c276a708
Move enabling the USB Clock into stm32f10x_usbd_init
2011-07-13 10:04:03 +02:00
Uwe Hermann
089bb73018
Merge remote-tracking branch 'gsmcmullin/master'.
2011-04-28 19:42:35 +02:00
Gareth McMullin
3ac0ae839d
Added extra interrupt vectors for STM32 connectivity line.
2011-04-24 14:31:56 +12:00
Gareth McMullin
7434d50fda
Check index bounds on usb string descriptor request.
2011-04-24 14:28:16 +12:00
Gareth McMullin
3d820c6ed7
Fixed stm32f107 usb driver to allow calling usbd_poll from irq handler.
2011-04-04 17:39:05 +12:00
Gareth McMullin
ef0ff192f7
Added usbd_ep_nak_set() to force flow control on OUT endpoints.
2011-03-30 07:17:02 +13:00
Gareth McMullin
692266bf67
Fixes CAN identifiers on send and receive.
2011-03-23 17:36:17 +13:00
Gareth McMullin
6bbc4c2f7c
Fixed non-control endpoints for connectivity line USB.
2011-03-15 20:33:02 +13:00
Gareth McMullin
bf0d1a7b41
Connectivity line USB driver now enumerating correctly.
2011-03-14 20:31:32 +13:00
Gareth McMullin
7faea389e8
Added dependency generation. Abort loops on error.
2011-03-14 16:45:17 +13:00
Piotr Esden-Tempski
1f3e431527
Usart baud rate setting function now uses the new apb1 and apb2 frequency variables. And calculates the full BRR value.
2011-03-11 19:51:48 -08:00
Piotr Esden-Tempski
3d20f37b27
RCC now has two variables to hold the current apb1 and apb2 frequency.
2011-03-11 19:49:23 -08:00
Piotr Esden-Tempski
7073637430
Added 12MHz external clock rcc setup routine.
2011-03-09 14:06:58 -08:00
Gareth McMullin
554feb7f27
USB driver for Connectivity-line devices partially working.
2011-02-20 12:28:23 +13:00
Gareth McMullin
e64a9d2bf9
Minor cleanup of usb. Template driver for STM32F107 added.
2011-02-10 19:58:51 +13:00
Uwe Hermann
0a0ce22762
Add rcc_clock_setup_in_hse_8mhz_out_24mhz().
...
Thanks Marko Kraljevic <krasnaya.zvezda@gmail.com> for the patch!
2011-02-09 02:48:51 +01:00
Uwe Hermann
e0a488f586
gpio_toggle(): Add support for multiple GPIOs.
...
Thanks Marko Kraljevic <krasnaya.zvezda@gmail.com> for the patch!
2011-02-09 02:48:50 +01:00
Uwe Hermann
447c333cec
Minor cosmetics, whitespace.
2011-02-09 01:06:43 +01:00
Gareth McMullin
769a932f3e
Added initial support for the LuminaryMicro LM3S family.
2011-02-04 22:47:51 +13:00
Uwe Hermann
729a48c655
Cosmetics, whitespace, reduced indentation level.
2011-02-03 02:17:15 +01:00
Piotr Esden-Tempski
c7587f11ec
Added get flag and get counter functions to timer. Allow proper interrupt handling and recording timer counter values.
2011-02-01 22:43:18 -08:00
Piotr Esden-Tempski
d40fb96fcf
Added set prescaler and set repetition counter functions to timer.
2011-01-31 22:08:37 -08:00
Piotr Esden-Tempski
92edc113f9
Added timer reset function.
2011-01-31 16:30:12 -08:00
Piotr Esden-Tempski
e85c55a9a7
Added timer flag reset function.
2011-01-31 16:15:09 -08:00
Piotr Esden-Tempski
dd0018ffdf
Added interrupt and event generation handling functions to timer. Updated pwm 6step example to use those and commutate on button press using PWM ON scheme.
2011-01-31 13:28:54 -08:00
Uwe Hermann
a0091f18c7
Cosmetics, consistency fixes, fix compiler warnings.
2011-01-30 22:43:33 +01:00
Gareth McMullin
aac65d8560
Abstracted USB driver interface to to allow driver selection.
2011-01-30 17:04:56 +13:00
Gareth McMullin
193a1ed3b8
Reset CTR flag for endpoint from usbd_poll if no callback.
2011-01-30 15:42:12 +13:00
Gareth McMullin
f87170e06e
Clear user control request handlers on set_configuration request.
2011-01-30 15:41:23 +13:00
Piotr Esden-Tempski
59293a9640
Added break and dead time convenience functions. Adapted 6step example to reflect that.
2011-01-28 16:04:36 -08:00
Piotr Esden-Tempski
a1bd228c87
Replaced OC mode selection with an enum, makes it simpler to use.
2011-01-28 15:11:52 -08:00
Piotr Esden-Tempski
5975750e5e
Added output compare channel convenience functions and adapted the pwm_6step example accordingly.
2011-01-27 22:18:34 -08:00
Piotr Esden-Tempski
d608049563
Started a pwm 6step output example. Enabled timer convenience functions and some minor fixes that showed themselves while writing the bare bone example.
2011-01-27 17:03:13 -08:00
Uwe Hermann
1cabc38c3a
EXTI bugfix in exti_select_source().
...
AFIO_EXTICR[1 to 4] registers were not beeing set correctly. You have to
force a 0 on the bits that are 0 for the mutex to work.
Thanks Linus Casassa <linus@lin.cl> for the patch!
2011-01-07 17:07:25 +01:00
Uwe Hermann
8f251e8a9d
Some more file/path restructuring.
...
All #includes now explicitly use the "<libopencm3/stm32/rcc.h>" format.
If you want to get rid of the "libopencm3" prefix in your local project you
can add a respective -I entry in your Makefile (not recommended though).
All .ld files and .a libs are installed in $(TOOLCHAIN_DIR)/lib
directly (as before), but are now renamed to avoid potential
conflicts now or in the future. Examples:
libopencm3_lpc13xx.a
libopencm3_lpc13xx.ld
libopencm3_stm32.a
libopencm3_stm32.ld
2010-12-31 18:18:39 +01:00
Uwe Hermann
a97dd10a95
More libopenstm32 renames.
2010-12-30 13:22:56 +01:00
Uwe Hermann
18790a2454
More renames for libopenstm32 -> libopencm3.
2010-12-30 13:19:25 +01:00
Uwe Hermann
0995f73f72
Finish libopenstm32.ld to stm32.ld rename.
2010-12-30 13:14:36 +01:00
Uwe Hermann
48b514d3ef
s/libopenstm32/libopencm3/ is some Makefiles.
2010-12-30 03:45:00 +01:00
Uwe Hermann
8e5acecc6e
More path and name changes.
2010-12-30 02:57:44 +01:00
Uwe Hermann
7c53b252a3
Add missing files.
2010-12-30 02:24:40 +01:00
Uwe Hermann
be2ac142d9
Rename include/libopenstm32 to include/stm32.
2010-12-30 02:23:51 +01:00
Uwe Hermann
8e084b1517
Move STM32-specific source to lib/stm32 subdir.
2010-12-30 02:12:31 +01:00
Uwe Hermann
17b2e87ba3
Factor out cm3/common.h and cm3/memorymap.h.
2010-12-30 00:53:52 +01:00
Uwe Hermann
b5727a6c73
USB: Cosmetics and coding-style fixes.
2010-12-29 18:00:32 +01:00
Uwe Hermann
c39eb69e4d
Replace uint8_t with u8 et al, fix whitespace.
2010-12-29 17:28:06 +01:00
Uwe Hermann
34fd228bf9
Move generic USB stuff to a subdir, dedupe .h files.
...
Adapt examples and the lib code accordingly.
2010-12-29 17:02:36 +01:00
Uwe Hermann
f062777930
More whitespace fixes.
2010-12-29 16:43:26 +01:00
Uwe Hermann
a6e6a08a3a
Make the build/clean targets a bit less verbose.
2010-12-29 15:44:12 +01:00
Uwe Hermann
1c6d7cf06a
Merge branch 'martinmm'.
2010-12-29 15:12:23 +01:00
Piotr Esden-Tempski
e5941fb075
Improved usart api implementation to be more readable.
2010-12-29 13:56:22 +01:00
Piotr Esden-Tempski
600d8c3458
Added gc-sections. Now unused functions are being garbage collected.
2010-12-27 21:30:12 +01:00
Piotr Esden-Tempski
bf0b987fe3
Splitted out the usart recv and send functions to have blocking and non blocking versions of those.
2010-12-27 15:29:22 +01:00
Uwe Hermann
571c4d37d0
CAN: Reduce nesting level via code transformations.
2010-12-26 00:36:32 +01:00
Uwe Hermann
06d1a5ca80
CAN: Cosmetics and coding-style fixes.
2010-12-26 00:30:05 +01:00
Piotr Esden-Tempski
e7d765ea90
Factored out CAN helper functions out of the example. Test code now also uses the received data.
2010-12-25 20:39:46 +01:00
Piotr Esden-Tempski
d1e5a5069e
Fixed behavior of rcc_peripheral_clear_reset...
2010-12-23 00:18:23 +01:00
Uwe Hermann
eebbd508fc
TIM1 GPIO remapping + gpio_port_config_lock().
...
Thanks to Philip Court <philip@greenstage.co.nz> for the patch.
2010-12-17 06:04:28 +01:00
Uwe Hermann
9539f3bf06
Fix typo.
2010-12-17 05:50:00 +01:00
Uwe Hermann
e2d82ff44c
Build fixes for ethernet.c, and hook it up.
2010-12-17 05:50:00 +01:00
Uwe Hermann
af61aaef21
Minor ld script changes.
...
Add wildcards to the input section names.
This fixes the script for use with the "-ffunction-sections
-fdata-sections -Wl,--gc-sections" options when compiling/linking.
Also, discard the .eh_frame section. This section is emitted by GCC 4.4,
but not 4.5. Discarding it doesn't appear to break anything. I suspect this is
used for C++ exception implementation.
I found this to be a problem when building with GCC 4.4 (arm-elf),
because the USB DFU demo exceeded the 8k I allowed for it.
Thanks to Gareth McMullin <gareth@blacksphere.co.nz> for the patch.
2010-12-17 05:50:00 +01:00
Uwe Hermann
4ef35380e8
Register definitions for the STM32F107 Ethernet.
...
Thanks to Gareth McMullin <gareth@blacksphere.co.nz>.
2010-12-17 05:50:00 +01:00
Gareth McMullin
7f002110dc
Improved dispatching of user control callbacks.
...
Only cdc_acm example is updated.
2010-11-06 12:21:46 +13:00
Gareth McMullin
87960830f4
Fixed HALT condition handling and data toggle.
2010-11-04 16:49:03 +13:00
Martin Mueller
d6eacce827
add standard request
2010-11-04 00:44:47 +01:00
Uwe Hermann
6e090ccee1
Initial USB device stack for STM32.
...
Patch provided by Gareth McMullin <gareth@blacksphere.co.nz>,
thanks a lot!
2010-11-02 02:02:21 +01:00
Uwe Hermann
1621fde1f4
Add proper C runtime init, add reset handler.
...
The C runtime wasn't initialized correctly (there was garbage in the data
and bss sections). Add a reset_handler which initializes these sections
before calling the application's main() function.
The initial stack pointer is also defined in the linker script, allowing the
application to override with a linker command line option
"-Wl,--defsym,_stack=0x20005000".
Thanks to Gareth McMullin <gareth@blacksphere.co.nz>.
2010-10-19 02:00:28 +02:00
Uwe Hermann
68b7e255ad
Add timer handling functions.
...
Thanks to Edward Cheeseman <cheesemanedward@gmail.com>.
2010-10-18 00:36:39 +02:00
Uwe Hermann
0287fd9029
Add more support functions for flash handling.
...
Thanks to Mark Butler <mbutler@physics.otago.ac.nz>.
2010-10-18 00:20:59 +02:00
Uwe Hermann
6ba179b361
Various cosmetic and coding style fixes.
2010-06-29 23:01:44 +02:00
Uwe Hermann
47b31246ca
rcc: Cosmetics and coding style fixes.
2010-06-29 22:29:57 +02:00
Thomas Otto
388f940475
Initial EXTI support.
...
Thanks to Mark Butler <mbutler@physics.otago.ac.nz>.
2010-05-12 18:12:31 +02:00
Thomas Otto
898c118e1e
Fix of rtc_set_counter_val(). supplied by Jim <lordjames@y7mail.com>
2010-05-12 16:26:01 +02:00
Thomas Otto
b2bca1f1a4
Changed rtc.c to use the changed defines.
2010-05-11 14:36:56 +02:00
Thomas Otto
141a291e8d
Changed rcc.c to use the new definitions.
2010-05-11 14:26:46 +02:00
Uwe Hermann
93fe67908a
Add more RTC functions and an RTC example.
...
Thanks Lord James <lordjames@y7mail.com> for the patch!
2010-05-10 00:40:42 +02:00
Thomas Otto
4f272b4ad4
Added rcc clock setup function for 16mhz crystal.
2010-05-02 20:20:04 +02:00
Thomas Otto
8dc36291d1
Fixed channel group setting with more then 6 items.
2010-05-02 15:56:48 +02:00
Thomas Otto
905b5112b6
Some improvements to systick.h+c.
2010-04-13 22:26:07 +02:00
Thomas Otto
0fed8c6cc5
Added spi_send() equivalent to usart_send().
2010-04-12 21:12:52 +02:00
Thomas Otto
47c51fc9cc
Some additions to spi.c+h.
2010-03-30 22:29:02 +02:00
Thomas Otto
97e27b2430
Make 72MHz the default in usart.c
2010-03-28 15:51:10 +02:00
Thomas Otto
9d2e074b3d
Cosmetic fixes.
2010-03-28 15:19:32 +02:00
Thomas Otto
561ce37809
Changed address setting in dma.c+h.
2010-03-26 17:36:15 +01:00
Thomas Otto
0f710dd8fa
Fixed settings of groups in adc.c.
2010-03-26 17:35:15 +01:00
Thomas Otto
3518301870
Integrated systick into build system.
2010-03-25 13:13:01 +01:00
Thomas Otto
feb3f187fe
Added systick.h definitions.
2010-03-25 13:11:59 +01:00
Thomas Otto
d96b318795
Added some address setting functions to dma.
2010-03-24 22:51:43 +01:00
Thomas Otto
cdf93fedfa
Small correction in isr table.
2010-03-23 21:05:37 +01:00
Thomas Otto
426d6a45fc
added some SCB defs. Added some NVIC functions.
2010-03-22 22:01:44 +01:00
Thomas Otto
e4788f67b6
added dma.h and basic functions
2010-03-22 21:52:49 +01:00
Thomas Otto
561c9a1d3e
added basic adc funktions
2010-03-22 21:40:08 +01:00
Uwe Hermann
a6342d4968
Cosmetic fixes.
2010-03-06 15:22:09 +01:00
Uwe Hermann
e6c72d5cfc
Fix bug: PLLMUL_PLL_CLK_MUL9 is correct.
2010-03-06 15:07:21 +01:00
Uwe Hermann
4390abfd95
Cosmetic and coding style changes.
2010-03-06 14:49:59 +01:00
Uwe Hermann
f514162134
Add some more ADC support.
...
Also:
- Fix a few typos (e.g. s/ADC1_BSAE/ADC1_BASE/).
- adc.h: Use common SUBSYSTEMNAME_REGISTERNAME_FOO #define format.
2010-03-05 20:59:07 +01:00
Uwe Hermann
f1a6e56f5c
gpio: Fix some issues with gpio_set_mode().
...
This patch, a slightly modified version of a patch from Thomas Otto,
should fix the following two issues:
- It generally sets the submited config to the mentioned GPIO pins but
kills configs for other pins on the same GPIO port. So if we want to set
PB6 and PB7 to push-pull and I2C2 SDA and SCL (PB10 and PB11) to open
drain it's simply impossible, because the second config try kills the first.
- The floating-bit thing isn't working correctly. If we enable a config
for PB6 for instance, the same config will also apply to all following
pins of that port (i.e. PB7-PB15). That's because the shifting isn't only
done if a pin isn't to configure, if you are hitting a matching bit the
shiftig is missing. I think shifting isn't nessessary for a separate
variable. We have the counting index from the for statement.
Both issues should now be fixed.
2010-03-05 19:46:57 +01:00
Uwe Hermann
e7cadf0822
Use direct #includes instead of libopenstm32.h.
2010-03-04 21:25:25 +01:00
Uwe Hermann
92194abda4
Trivial quickfix for some compiler warnings.
2010-03-04 21:08:36 +01:00
Piotr Esden-Tempski
d7489ebfbd
Added standard clock setup routines.
...
Thanks to Thomas Otto for pointing out problems with the clock code in
examples and his clock routine implementations. Based on that the most
common clock combination routines were added to the library and all
routines in examples setting up the clock replaced with calls to that
functions.
2010-03-04 20:37:04 +01:00
Uwe Hermann
742c595114
Add initial set of I2C functions.
...
Thomas Otto has tested the code by successfully talking to a temperature
sensor from ST in master tranciever mode.
Thanks Thomas Otto <tommi@viadmin.org> for the patch!
2010-03-01 21:47:14 +01:00
Piotr Esden-Tempski
bc46b3118e
Added all handlers to the vector table.
...
All handlers are weak symbols pointing to a null handler (doing nothing)
or blocking handler (running an infinite loop). This means you can
define a function with the name in the list and the linker will use your
definition instead of the default one. This makes it easy to implement
your own handlers without touching the library code.
2010-01-25 17:32:33 +01:00
Piotr Esden-Tempski
4935a0ddd8
Moved vector_table to the library.
2010-01-25 17:29:06 +01:00
Uwe Hermann
1f9479e673
Add initial (unfinished, untested) RTC support.
2010-01-22 01:48:02 +01:00
Uwe Hermann
3e29876d98
rcc: Add a few functions to set prescalers.
...
Thanks Thomas Otto <tommi@viadmin.org> for the patch!
2010-01-19 19:57:38 +01:00
Uwe Hermann
92dc4c361e
Add empty lib/nvic.c to make libopenstm32 compile.
2010-01-19 19:53:20 +01:00
Piotr Esden-Tempski
a38fc2c3a2
Added basic NVIC register defs and functions.
2010-01-16 04:12:53 +01:00
Uwe Hermann
8d1c464961
Add flash.o to list of objects to build.
2010-01-15 01:43:51 +01:00
Uwe Hermann
d7d851e579
Prefix all flash related stuff with FLASH_.
2010-01-15 01:21:40 +01:00
Uwe Hermann
4fdb7f08fd
Add initial flash memory register support.
...
Thanks Thomas Otto <tommi@viadmin.org> for the patch!
2010-01-15 01:05:22 +01:00
Piotr Esden-Tempski
667f32bd45
Added USART_ prefix to bit definitions.
...
This matches the new convention used throughout libopenstm32.
2010-01-15 00:03:29 +01:00
Uwe Hermann
312db1a301
Fix logic bugs in rcc_wait_for_osc_ready().
...
Thanks Thomas Otto <tommi@viadmin.org> for the patch!
2010-01-14 19:34:30 +01:00
Uwe Hermann
977f0ef6a0
Configure SPI as master in spi_init_master().
2010-01-14 19:20:23 +01:00
Uwe Hermann
98997691d3
Add first version of spi_enable()/spi_disable().
2009-12-30 23:28:40 +01:00
Uwe Hermann
a7a3770d51
Add initial SPI code.
...
For now, add the following basic SPI functions:
- spi_init_master()
- spi_write()
- spi_read()
This is incomplete and untested, yet.
Also, add some more SPI bit definition macros and comments.
2009-12-30 23:09:14 +01:00
Uwe Hermann
88f35a4a7e
ADC #defines, contributed by Edward Cheeseman <ed@landcrab.co.nz>.
2009-09-04 15:47:38 +02:00
Uwe Hermann
25a003b076
Add rcc_peripheral_{reset,clear_reset} functions.
...
Also, rename two other functions for consistency.
2009-08-31 14:47:07 +02:00
Uwe Hermann
c6ec621b1a
Initial implementation of USART API functions.
...
The usart_set_baudrate() function is currently hardcoded to certain
settings, that needs to be fixed later.
2009-07-25 03:24:08 +02:00
Uwe Hermann
1f07553863
Fix comment.
2009-07-25 00:28:07 +02:00
Uwe Hermann
cfd87f6b9d
Add mini ld scripts in the example which include the global one.
2009-07-25 00:05:06 +02:00
Uwe Hermann
428e328b7e
Install the ld script upon 'make install'.
2009-07-24 23:30:36 +02:00
Uwe Hermann
50ba77bea9
Factor out ld scripts into one common script in the lib.
2009-07-24 23:19:44 +02:00
Uwe Hermann
6db6d5b49c
Add initial framework for USART support. So far only some #defines.
2009-07-22 14:02:21 +02:00
Uwe Hermann
574f77f6df
Add -Wstrict-prototypes to CFLAGS for more strict checking.
2009-07-22 03:28:58 +02:00
Uwe Hermann
9fd3064cb2
Add more RCC related API functions and their prototypes.
...
This includes:
- rcc_set_sysclk_source()
- rcc_set_pll_multiplication_factor()
- rcc_set_pll_source()
- rcc_set_pllxtpre()
2009-07-22 03:25:14 +02:00
Uwe Hermann
a5a9648144
Add rcc_enable_peripheral_clock() et al, and respective prototypes.
2009-07-22 02:56:04 +02:00
Uwe Hermann
97440d8406
Turn rcc_osc_ready() into rcc_wait_for_osc_ready(), more useful.
2009-07-22 02:38:31 +02:00
Piotr Esden-Tempski
446de38728
Changed all includes to use <foo.h> notation.
2009-07-20 17:54:33 +02:00
Uwe Hermann
4f43d8c622
Fix some compiler warnings.
2009-07-20 15:32:28 +02:00
Uwe Hermann
50b1b50676
Add slightly modified rcc.c file, contributed by Federico Ruiz-Ugalde.
2009-07-20 15:29:43 +02:00
Uwe Hermann
3bef8767f9
Add gpio_get() API function.
2009-07-18 17:41:31 +02:00
Uwe Hermann
83f5c58eb9
Switch the license to GPL, version 3 or later.
2009-07-18 16:27:47 +02:00
Uwe Hermann
3262983d27
Add initial GPIO API implementation.
...
This currently includes a number of basic functions. Example usage:
gpio_set_mode(GPIOC, GPIO_MODE_OUTPUT_2_MHZ,
GPIO_CNF_OUTPUT_PUSHPULL, GPIO12);
gpio_set(GPIOB, GPIO4);
gpio_clear(GPIOG, GPIO2 | GPIO9);
gpio_toggle(GPIOA, GPIO7);
reg16 = gpio_port_read(GPIOD);
gpio_port_write(GPIOF, 0xc8fe);
2009-07-18 16:20:32 +02:00
Uwe Hermann
b6f7fa5715
Add missing .PHONY target.
2009-07-16 15:54:41 +02:00
Uwe Hermann
3a2c63129e
Use a Linux kernel style build output printing.
...
Example:
$ make install
BUILD lib
CC gpio.o
AR libopenstm32.a
BUILD example
CC blink.o
LD blink
INSTALL headers
INSTALL lib
$ make clean
CLEAN blink.o
CLEAN blink
CLEAN gpio.o
CLEAN libopenstm32.a
2009-07-16 15:15:26 +02:00
Uwe Hermann
f0661cb343
Make default build silent, use 'make V=1' for verbose build.
2009-07-16 14:55:22 +02:00
Uwe Hermann
0efee48451
Add first example project (framework) using libopenstm32.
...
This is intended as a small blink example for the Olimex STM32-H103 board.
It doesn't do anything useful (yet), but it builds fine.
There's a sample Makefile and a preliminary ld script (which probably
needs some more work).
2009-07-16 14:29:00 +02:00
Uwe Hermann
c62ca6143d
Make gpio number argument 'unsigned int', there are no negative GPIOs.
2009-07-16 14:23:25 +02:00
Uwe Hermann
0a8135395a
Add dummy gpio.c implementation and final Makefile.
...
The whole lib should now build and install fine. It's not yet tested
on hardware, though.
2009-07-16 03:27:05 +02:00