Commit Graph

820 Commits (e4b03a157739050f626073a925882677cb2a07aa)

Author SHA1 Message Date
Laurent MEUNIER 1fb5b3f2d0 [STM32F4] SPI Peripheral pin - allow SPI3 to be used
Let's swap default PA_4 pin mapping to SPI_3 otherwise SPI3 cannot be used
2016-10-13 14:21:02 +02:00
Laurent MEUNIER 0aeea4950c [STM32] Deploy SPI_ASYNCH to all family
the SPI_ASYNCH feature has been already activated for STM32F4.
This patchset makes it supported on all STM32 families by:
- moving spi_s structure at family level instead of board level
- using the F4 spi_api.c reference implementation and making it a common
stm_spi_api.c file which makes maintenance a lot easier.
- the only part that needs to be implemented for each family is the computation
of the clock frequency input to the spi peripheral which is not the same
accross families. So this is what remains in the spi_api.c of each family.

Because of the introduction of the common file, all the above modifications
needs to be done at once.
2016-10-13 14:18:21 +02:00
Sam Grove 217a8fba8e Merge pull request #2972 from betzw/betzw_i2c_wb
Make (synchronous) I2C work again
2016-10-12 17:16:10 -05:00
Sam Grove 35d6682d61 Merge pull request #2970 from andreaslarssonublox/ublox_enable_hw_entropy
Enabled TRNG functionality for UBLOX_EVK_ODIN_W2 target.
2016-10-12 17:15:55 -05:00
Sam Grove f9ee683fa7 Merge pull request #2611 from adustm/STM32_entropy
STM32 hw entropy
2016-10-12 17:06:51 -05:00
Wolfgang Betz d258c14e1e [STM32F4]: I2C bugfix 'i2c_stop()' timeout
- Remove waiting for 'BTF' flag in 'i2c_stop()':
  When 'i2c_stop()' is called from 'i2c_read()' or 'i2c_write()' flag 'BTF'
  has already been cleared (indirectly) by the calling functions and therefore
  'i2c_stop()' would mistakenly always run into a timeout.
- Delay clock enabling until pins are configured:
  Enabling the I2C bus clock before configuring its pins might in rare
  cases lead to HW faults on the bus.
- Move initialization of 'handle->Instance' to function 'i2c_reset()':
  As 'i2c_reset()' uses '__HAL_I2C_GET_FLAG(handle, I2C_FLAG_BUSY)' field
  'handle->Instance' must have been initialized before doing so. Therefore,
  this operation has been anticipated by moving it from function
  'i2c_frequency()' to function 'i2c_reset()'.
2016-10-12 07:02:42 +02:00
andreas.larsson 84a25e72f7 Fixed wrong stack pointer 2016-10-10 18:55:46 +02:00
Sam Grove 4297042096 Merge pull request #2932 from bcostm/adcintch_F4
STM32F4xx - Fix issue with ADC internal Temperature and VBat channels.
2016-10-10 10:35:06 -05:00
andreas.larsson cb97f5dc7f Enabled TRNG functionality for UBLOX_EVK_ODIN_W2 target. 2016-10-10 15:42:47 +02:00
Martin Kojtal 8f492a20a7 Merge pull request #2920 from LMESTM/fix_pull_overwrite
STM32F4: Fix pull overwrite
2016-10-10 10:23:55 +01:00
adustm bda200e814 rework after directory moves 2016-10-10 10:12:39 +02:00
Sam Grove eee4db1fe0 Merge pull request #2896 from geky/restructure-cmsis
restructure - Restructure cmsis directory
2016-10-07 11:13:09 -05:00
bcostm 4207ebf329 Fix issue with Temp and VBat channels. Use internal channels specific definitions. 2016-10-05 16:33:46 +02:00
Christopher Haster 26ced98734 restructure - Restructured cmsis directory
targets/cmsis -> cmsis
targets/cmsis/TARGET_* -> targets/TARGET_*/device
targets/cmsis/TARGET_*/mbed_rtx.h -> targets/TARGET_*/mbed_rtx.h
2016-10-04 17:51:44 -05:00
Laurent MEUNIER e8675033f4 [STM32] remove superfluous calls to SystemCoreClockUpdate
Supported toolchains initialization steps have been modified to make sure
that mbed_sdk_initi is called _after_ RAM initialization and _before_ C++
objects creation.

since this was done, there is no need to redundant SystemCoreClockUpdates
in the drivers
2016-10-04 15:08:28 -05:00
Laurent MEUNIER fe9d3174bf INIT:GCC no rtos: Align pre-main initialization steps between TCs
Various toolchains supported in MBED don't follow the same initialization
steps. This can have impacts on platform behavior.

For STM32, it is needed to call the HAL_Init() _after_ the  RAM has been
initialized (sdata from flash / zero initialized data) and _before_ the C++
objects are being created, especially if those objects require support
of tickers for instance.

In GCC, this is easily done because SystemInit is called after the ram
initialisation, so HAL_Init does not need to called from mbed_sdk_init.
this is covered by the changes in mbed_overrides.c files.

This series should solve issue reported here:
STM32 (At least F401) breaks if Tickers are activated in a global object #2115
2016-10-04 14:55:20 -05:00
Laurent MEUNIER 3f81f5df50 [STM32F4] Use previously introduced pin_function_gpiomode
This way the pull-up / pull-down modes would not be overwritten
as first reported in issue #2638
2016-10-04 11:19:24 +02:00
Laurent MEUNIER e516bddc66 [STM32F4] Introduce a function that sets gpio mode w/o changin pull mode
This function reads the pull mode from HW and can then be used
to avoid over-writing the previously set pull-up / pull-down modes.

This is done following reported issue: #2638
2016-10-04 11:19:22 +02:00
andreas.larsson 1d3c63d9bb Changed name for the target UBLOX_C029 to UBLOX_EVK_ODIN_W2 2016-10-03 12:10:50 +02:00
Christopher Haster 0bad622a16 restructure - Moved targets out to top level
hal/targets -> targets
hal/targets.json -> targets/targets.json
2016-09-30 19:18:09 -05:00