1720 Commits

Author SHA1 Message Date
Piotr Esden-Tempski
34e9e8c3e1 [stm32f4-ltdc] Remove the LCD_TFT_BASE define.
This define name was used because of datasheet inconsistency. The
correct name is LTDC.
2015-02-12 19:02:51 -08:00
Jeff Epler
ef97de242e stm32: f373: support the 373xc devices
These devices have 32kiB RAM and 256kiB flash and are otherwise
register compatible with the f373x8 and f373xc devices.

Signed-off-by: Jeff Epler <jepler@unpythonic.net>
2015-02-05 22:55:51 -08:00
Piotr Esden-Tempski
8591a5aa20 [stm32-common-i2c] Style fix. 2015-02-05 20:14:29 -08:00
Angus Peart
b58ac190bb Fixed unwanted deletions... 2015-02-05 20:11:06 -08:00
Angus Peart
60739968bd STM32F1: Support for I2C_OAR2 (Dual addressing) 2015-02-05 20:11:06 -08:00
Piotr Esden-Tempski
98855af279 Indentation and style fix. 2015-02-05 19:13:49 -08:00
Chuck McManis
d7c83348c0 Doxygen fix
Timer docs were a bit out of date just brought them up to date
and added the Quadrature example.
2015-02-05 19:08:25 -08:00
Ondrej Palenicek
377f782d23 Removed extra underscore. 2015-02-05 18:27:29 -08:00
Karl Palsson
721f3d74eb headers: Explicitly error when you include an internal header
People should not be using the dispatch/ headers directly.
Try and make this more explicit.

Signed-off-by: Karl Palsson <karlp@tweak.net.au>
2015-02-05 18:20:57 -08:00
Oliver Meier
7fbd49b3fc [stm32f4-ltdc] Helper function to wait for SRCR reload to complete 2015-02-05 16:44:38 -08:00
Oliver Meier
4b8f5e613b [stmf4-ltdc] added 3 spaces 2015-02-05 16:44:38 -08:00
Oliver Meier
3c9b07d776 [ltdc-stm32f4] add helper function to convert rgb565 to rgb888 2015-02-05 16:44:38 -08:00
Oliver Meier
c26831fab0 [stm32f4-stdc] fixed includes 2015-02-05 16:44:38 -08:00
Oliver Meier
276600b511 [stm32f4-ltdc] commented out assertions. will remove them later 2015-02-05 16:44:38 -08:00
Oliver Meier
d5112bc9e7 [stm32f4-ltdc] The Makefile change got lost somehow 2015-02-05 16:44:38 -08:00
Oliver Meier
eaae7731e9 [stm32f4-ltdc] initial commit 2015-02-05 16:44:38 -08:00
Pavol Rusnak
4b8f6e01ab stm32: f2: Add missing desig.o to Makefile
Basically the same as ad937e00fd04d1a618146b20f04ebc8460bf98b2 but for stm32/f2
2015-01-31 11:24:50 +01:00
Felix Ruess
f206fcb57e [stm32] desig: high nibble to hex char first
When converting the uniqute id to a hex string, it seems more sensible to put the higher nibble in the string before the lower nibble.
2015-01-16 19:12:21 +01:00
Daniel Serpell
ca41131f97 stm32: f0: Fixes setting of PLL multiplication factor
Really use RCC_CFGR_PLLMUL negated as a mask.

Signed-off-by: Daniel Serpell <daniel.serpell@gmail.com>
2015-01-12 22:44:03 -03:00
George McCollister
418fdd08dd usb: Prevent RX_CTR and TX_CTR from being cleared
When writing the USB endpoint register, USB_EP_RX_CTR (bit 15) and
USB_EP_TX_CTR (bit 7) should be set to avoid inadvertently clearing
either bit.

Prior to this patch end points could indefinately stall if the hardware
changed these bits between the time they are read and when they were
written.

Signed-off-by: George McCollister <george.mccollister@gmail.com>
2015-01-02 19:01:16 +00:00
George McCollister
9eb551c127 tools: Added *REG_BIT_MSK_AND_SET macros
Added CLR_REG_BIT_MSK_AND_SET and TOG_SET_REG_BIT_MSK_AND_SET because we
need version of CLR_REG_BIT_MSK and TOG_SET_REG_BIT_MSK that allow us to
OR in bits before the register is written.

Signed-off-by: George McCollister <george.mccollister@gmail.com>
2015-01-02 19:01:07 +00:00
Felix Ruess
40d9ffcb6b stm32: f1: fix missing ahb_freq 2014-12-29 19:52:23 +01:00
Felix Ruess
922d8f7079 [usb] fix user_callback_set_config
USB using control callbacks was broken since d6bad27735a77b8daa90ce72b843cf08ba78697d
Properly check if user usb control callback are registered,
while here make sure user_callback_set_config callback pointers are initialized to NULL.
2014-12-29 17:10:04 +01:00
Karl Palsson
8a15cec6bf stm32: f4: flash: support extended sector ranges
F42xx and F43xx have extended sector ranges.

Reported-by: H2OBrain@irc
2014-12-18 23:29:10 +00:00
Daniel Thompson
e3b8adec10 usb: Support for MIDI class devices
Provides all of the config descriptors for MIDI class devices together
with a sub-set of the audio class sufficient to put together a full
fledged MIDI device.
2014-12-18 22:50:27 +00:00
Daniel Thompson
d3aa579e0a usb: Support for class specific endpoint descriptors.
Extends struct usb_endpoint_descriptor to make it possible to provide
the USB host with class-specific extensions to endpoint descriptors.

The approach taken, based on extra and extralen and removing the sizeof()
from USB_DT_ENDPOINT_SIZE, is identical to the approach used to add
class-specific extensions to interface descriptors. All libopencm3-examples
use the USB_DT_ENDPOINT_SIZE (rather than directly using sizeof) so there
should be no compatibility problems resulting from this change.
2014-12-18 22:50:27 +00:00
Daniel Thompson
0b63408260 usb: Prevent memcpy() being called with NULL arguments
If there is no additional iface data then iface->extra is NULL and
iface->extralen is zero. Passing NULL to memcpy is undefined behaviour
even if the length of data to copy is zero. In other words a conforming
(debug) memcpy implementation is permitted to assert(dst && src) without
checking the value of n.

Add an extra branch to avoid this.
2014-12-18 22:50:27 +00:00
Kuldeep Singh Dhaka
342ec6e9e3 [STM32F0] Add support functions for USB clock setup in F072 chips.
There is remaining an issue with PREDIV connected just after clock multiplexer (only F072). This should be fixed in another commit.
2014-12-18 23:43:04 +01:00
Kuldeep Singh Dhaka
331acce4fc [STM32F0] add support of autotrimming HSI to USB SOF frames
Signed-off-by: Frantisek Burian <BuFran@seznam.cz>
2014-12-18 23:43:04 +01:00
Karl Palsson
3974e5f48d ethernet: mac stm32fxx7: Fix style and docs
Rushed commits are bad mkay :)
2014-12-18 22:00:03 +00:00
Frantisek Burian
cf6d8d7235 [fix] after phyid addition, the init function should init correct phy. 2014-12-18 21:26:59 +01:00
brabo
bb8980efc6 [ETH] Make support of ethernet for F1 family 2014-12-17 23:58:55 +01:00
brabo
9cced2c0b4 [ETH] Phy ID configurable as parameter 2014-12-17 23:40:06 +01:00
Karl Palsson
c09d2583dd stm32: f4: Add FLASH_OPTCR1 definition
This is required for stm32f42xx and stm32f43xx with second bank options.
2014-12-17 17:26:25 +00:00
Chuck McManis
14ad92015e Audit RTCPRE Shift and Mask Values
L0 - RTC Prescaler appears in RCC_CR, bit 20, 2 bits wide (RM0367 Rev 2)
L1 - RTC Prescaler appears in RCC_CR, bit 29, 2 bits wide (RM0038 Rev 10)
F0 - no prescaler setting (RM0091 Rev 7)
F1 - no prescaler setting (RM0041 Rev 4)
F2 - RTC Prescaler appears at RCC_CFGR, bit 16, 4 bits wide (RM0033 Rev 6)
F3 - no prescaler setting (RM0316 Rev 3)
F4 - RTC Prescaler appears at RCC_CFGR, bit 16, 4 bits wide (RM0090 Rev 8)
2014-12-14 16:29:03 -08:00
Chuck McManis
9ddfcb0e53 Rename rcc_ppre1_frequency and rcc_ppre2_frequency
Rename rcc_ppre1_frequency and rcc_ppre2_frequency to rcc_apb1_frequency and rcc_apb2_frequency
Also add rcc_ahb_frequency (although it is not set correctly in all cases) which will be fixed by
the rcc commits later. Also fixup the only use in the library of these variables, the USART code.

And fix the typos that resulted
Make l1 generic too
2014-12-13 19:49:04 -08:00
brabo
2429159203 ethernet: corrected typo in ethernet/phy_ksz8051mll.c to include setting the speed to 100M in case of 100M Half Duplex 2014-12-14 00:11:51 +01:00
Oliver Meier
f52a39cc48 [cm3/sync] mutex_lock now calls mutex_trylock repeatedly 2014-12-11 09:59:22 +00:00
Oliver Meier
a2fe6c49a8 [cm3/sync] Add mutex_trylock()
Allows non-blocking use in user code.
2014-12-11 09:58:34 +00:00
Daniel Thompson
ad937e00fd stm32/desig: include in f4 library
The code is all there and working but simply isn't being built.
2014-12-07 12:47:19 +01:00
Karl Palsson
5c18dee500 .gitignore correct netbeans project directories 2014-12-05 21:28:52 +00:00
Chuck McManis
99f83eedcd stm32/f0: rcc.c Use common version instead of duplicate code.
Pulls out duplicate calls from f0/rcc.c and uses the common version which
also means that f0 can use rcc_peripheral_enable() now which is in common
but not the old rcc versions.
2014-12-03 11:14:26 +00:00
Karl Palsson
f51698fff4 stm32:l0: RCC: add osc_on/osc_off helpers
These are the routines that have custom switch cases, and aren't easy targets
for pulling out.
2014-12-03 11:13:39 +00:00
Karl Palsson
160a644bc6 stm32:l0: Add linker script / memory sizes
Easier to pick a corresponding part.
2014-12-03 11:13:39 +00:00
Karl Palsson
378069091a stm32:l0: Add RCC register definitions
Tested with a miniblink example on the l053 discovery board.

Only register definitions at this stage, no helpers.
Register definitions from RM0367r2, hopefully the biggest
superset of L0 parts.

Signed-off-by: Karl Palsson <karlp@tweak.net.au>
2014-12-03 11:13:39 +00:00
Chuck McManis
0ca7123fe6 .gitignore cscope database files 2014-11-24 00:24:37 +00:00
Karl Palsson
3a44b1311b stm32: f1: Additional GPIO Remappings for F100
F100 has more remap options than F10x, particularly on the High Density
devices.

Fixes github issue #365

Signed-off-by: Karl Palsson <karlp@tweak.net.au>
2014-11-21 10:38:03 +00:00
Karl Palsson
2c475a38d5 stm32:l0: Correctly compile as m0+, not m0.
Committed to binutils back in 2012, so even though it has no real impact, it at
least does the right thing for future compilers to make better decisions.

Signed-off-by: Karl Palsson <karlp@tweak.net.au>
2014-11-18 21:50:10 +00:00
Karl Palsson
fb95997b3b stm32f1: rcc: timer 15,16,27 rcc bits missing for old style
The bits definitions for direct manipulation were missing, and should be
present for completeness.  However, this only affects the legacy (error prone)
API, replaced some time ago.

old and error prone: (stop using code like this)
    rcc_peripheral_enable_clock(&RCC_APB2ENR, RCC_APB2ENR_TIM16EN);
    rcc_peripheral_reset(&RCC_APB2RSTR, RCC_APB2RSTR_TIM16RST);

new:
    rcc_periph_clock_enable(RCC_TIM16);
    rcc_periph_reset_{pulse,hold,release}(RCC_TIM16);

Fixes github issue #361
2014-11-14 22:32:49 +00:00
Silvio Gissi
1420be5577 lpc17xx: power: basic peripheral power functions and defns 2014-10-27 22:05:36 +00:00