935 Commits

Author SHA1 Message Date
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