Commit Graph

309 Commits (80d58e55722107d2d004704de7b6050f0eb2e91e)

Author SHA1 Message Date
Sam Grove d990385058 Merge pull request #3684 from jamike/TARGET_STM_USB_CONFIG
Target stm usb config
2017-02-09 09:35:16 -06:00
Michel Jaouen 4d59c8857d TARGET_STM :move usb config file to target dir 2017-02-03 10:32:19 +01:00
adustm 885515acc9 STM32L432xC folder structure rework 2017-01-27 17:41:59 +01:00
adustm 389d9ba358 STM32L476xG STM32L486xG folder structure modification 2017-01-27 17:35:27 +01:00
Martin Kojtal bdcda386d5 Merge pull request #3618 from LMESTM/dev_stm32_PinNamesTypes
STM32: Move types definitions to a common file
2017-01-26 10:35:59 +02:00
Laurent MEUNIER 42f6622f8e STM32: Move types definitions to a common file
Only one point of attention:
STM_MODE_ANALOG_ADC_CONTROL is a specific mode that is only supported on L4.
So STM_MODE_ANALOG_ADC_CONTROL was moved to index 13 (last entry)
of gpio_mode table so that all the other modes are common and only the last
one is specific.
2017-01-24 10:58:36 +01:00
Laurent MEUNIER 5d04b97b80 STM32: make PortNames.h a common file
the same file can be used for all targets
2017-01-19 15:27:19 +01:00
Martin Kojtal 3933ccf76e Merge pull request #3584 from LMESTM/dev_stm32_common_peripheralpins
STM32: make PeripheralPins.h a common file
2017-01-16 16:29:28 +00:00
Martin Kojtal cc8a132f10 Merge pull request #3575 from LMESTM/dev_stm_factorize_gpio
Dev stm factorize gpio
2017-01-16 16:28:27 +00:00
Laurent MEUNIER 1a4394a4a2 STM32: make PeripheralPins.h a common file
Simple effort to avoid duplicate code.
2017-01-13 13:25:33 +01:00
Brian Daniels 24a9a4824f Fixes linking errors when building with debug profile
When building with the debug profile, certain ST plaforms error with
'get_i2c_timing' not being defined. This is because the function is not
defined as 'static inline', but just 'inline'.
2017-01-12 15:09:28 -06:00
Laurent MEUNIER 57e0225248 STM32: gpio: factorize gpio_api.c and gpio_object.h
Let's make the code more common for gpios.

The only difference between STM32 families is that BRR register may
not be available. In case BRR is not available, we use the 16 left bits
of BSRR instead. We could always use BSRR, but BRR saves one left-shift
operation, so let's use it when available.

By default we will consider using BRR, except for platforms that define
GPIO_IP_WITHOUT_BRR.
2017-01-12 19:24:32 +01:00
Laurent MEUNIER 7a36614e74 STM32: remove useless include
gpio_object.h is included from common_objects.h,
so no need to have it here.
2017-01-12 19:11:36 +01:00
Sam Grove cefae22703 Merge pull request #3492 from Nodraak/fix/3463/can_read_return_value
Fix #3463 CAN read() return value
2017-01-09 10:17:27 -06:00
Sam Grove ddcd3ad711 Merge pull request #3488 from LMESTM/dev_stm_i2c_v2_unitary_functions
Dev stm i2c v2 unitary functions
2017-01-09 10:15:55 -06:00
Adrien Chardon 885b018f77
Set bit without reseting the whole register 2017-01-03 11:46:27 +01:00
Adrien Chardon 7e0b4fe3c9
Fix can_read() return value for STM32 boards 2017-01-03 11:46:25 +01:00
Michel Jaouen 8af69dcbd6 STM32 HAL HCD : USBHOST changes for f4,f2,l4,f7
- reset toggle_out , toggle_in at init
-  in/out toggle in on ctrl endpoint
- remove call back when transmission restarted
2017-01-02 09:48:15 +01:00
jeromecoutant ab28a5e5cb STM32: Refactor lp_ticker.c + rtc_api.c + sleep.c + rtc_api_hal.h files 2016-12-21 16:54:18 +00:00
Laurent MEUNIER 20c9af8bec STM32: I2C unitary functions for IP V2
STM32 supported targets have 2 possible versions of I2C.
This patch makes the start / stop / read and write byte work ok for IP V2.
This was not working before and does not seem to be widely used.
2016-12-21 09:27:52 +01:00
Anna Bridge d1aa6eea52 Merge pull request #3410 from jeromecoutant/PR_ST_L4_ASSERT
STM32L4 : map ST HAL assert into MBED assert
2016-12-19 17:33:13 +00:00
Martin Kojtal 04f940de2d Merge pull request #3324 from LMESTM/dev_i2c_common_code
Dev i2c common code
2016-12-09 15:30:00 +01:00
jeromecoutant 3734269326 STM32L4 : correct ST HAL API call
- ll_utils: compilation issue
- GPIO: mode was not allowed by ST HAL API
2016-12-09 13:58:22 +01:00
jeromecoutant 64e92a54de STM32L4 : refactor stm32l4xx_hal_conf.h and map ST HAL assert into MBED assert 2016-12-08 16:15:47 +01:00
Martin Kojtal bd499daae8 Merge pull request #3304 from jeromecoutant/PR_L476
STM32L476: no HSE is present in NUCLEO and DISCO boards
2016-12-02 15:48:38 +01:00
Martin Kojtal 1c2c121741 Merge pull request #3303 from adustm/stm_fix_interrupt_in
Fix #2956 #2939 #2957 #2959 #2960: Add HAL_DeInit function in gpio_irq destructor
2016-12-02 15:47:50 +01:00
jeromecoutant 448f501d4a STM32L476: comments update 2016-11-30 08:52:49 +01:00
jeromecoutant 757944ee24 STM32L476: no HSE is present in NUCLEO and DISCO boards 2016-11-30 08:51:18 +01:00
Laurent MEUNIER 3fad50287c [STM32] Make most of the I2C code into a common file
Since most of the code in i2c_api.c is now relying on STM32 HAL, there
is now a possibility to make a common usage of this code accross families.

The IP version definition is introduced per family, to allow a switch of
functionnalities, especially the frequency management which differs.
BTw, we fix the F0 frequency settings at the same time.

F1 is managed for now as an exception as the HAL API for sequential transmit
/receive is not yet available (coming soon)
2016-11-30 08:23:13 +01:00
Laurent MEUNIER 23926a2418 [STM32] HAL I2C (V2) sequential transmit / receive
In case of sequential transmit / receive, there is a need to:
- not use the reload option
- generate a new START on each new transaction

This applies to all HAL supporting the IP version V2.
2016-11-30 08:23:13 +01:00
Martin Kojtal c57427f77f Merge pull request #3321 from jeromecoutant/PR_L432KC
no HSE available by default for NUCLEO_L432KC
2016-11-29 18:25:17 +01:00
Martin Kojtal a8ebfaa058 Merge pull request #3288 from LMESTM/dev_spi_asynch_l0l1
Dev spi asynch l0l1
2016-11-29 18:17:06 +01:00
Martin Kojtal bb2d03f34b Merge pull request #3213 from bcostm/factorize_ticker
STM32: Refactor us_ticker.c + hal_tick.c files
2016-11-29 18:10:45 +01:00
jeromecoutant a933032a58 no HSE available by default for NUCLEO_L432KC 2016-11-24 11:33:43 +01:00
adustm 0219b64af4 fix #2956. Add HAL_DeInit function if gpio_irq destructor
This allows ci-test-shield tests-api-interruptin to pass
2016-11-21 15:55:15 +01:00
Laurent MEUNIER 7cdaba8474 [stm32] remove unused module member in spi_s struct 2016-11-18 09:59:53 +01:00
bcostm 896293d5be Replace TIM_MST_GET_PCLK_FREQ macro with TIM_MST_PCLK macro 2016-11-14 09:31:14 +01:00
bcostm 0524811c75 STM32xx - Remove hal_tick.c files and update hal_tick.h with new macro 2016-11-14 09:31:14 +01:00
bcostm bb10409954 Replace all devices us_ticker files with a common 16b and 32b file 2016-11-14 09:31:14 +01:00
Michel Jaouen 182c311fbd TARGET_STM : USB FS STM HAL changes 2016-11-09 12:08:45 +01:00
Michel Jaouen 9c4e7173a5 DISCO_L476VG : align memory mapping with ARM 2016-11-09 12:08:41 +01:00
Michel Jaouen c2032c0442 DISCO_L476VG: modify clock for USB support 2016-11-09 12:08:36 +01:00
Michel Jaouen 4a69072161 INIT:GCC add call to HAL_Init
system_init, stops all on going timer.
gcc _start , perform zero initialized.
=> HAL_Init must be done again also in GCC toolchain
2016-10-27 10:40:28 +02:00
Michel Jaouen 93a0b9ce60 STM32L4xx : GCC_ARM remove zero bss, in startup.
zero bss is done in libc init after call to _start.
2016-10-26 14:42:24 +02:00
Sam Grove f1d678f8a4 Merge pull request #3056 from LMESTM/fix_stm32_pull_overwrite
Fix stm32 pull overwrite
2016-10-19 05:50:30 -05:00
Sam Grove 2ae71777aa Merge pull request #3013 from bcostm/check_adcintch_pins
STM32xx - Change how the ADC internal pins are checked before pinmap_…
2016-10-19 05:43:15 -05:00
Laurent MEUNIER af51027f61 [STM32] Fix pull over write to all families
This applies the same fix as was done for F4 to solve issue #2638.
The fix applies ell to all other families excpet STM32F1.

Basically, to avoid over-writing the pull-up/-down settings, we read the
current state from HW.
2016-10-18 12:16:58 +02:00
adustm 78fd559d11 ADD NEW TARGET : NUCLEO_L486RG, based on existing NUCLEO_L476RG 2016-10-13 18:29:09 +02:00
bcostm a484f51904 STM32xx - Change how the ADC internal pins are checked before pinmap_pinout 2016-10-13 16:28:57 +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 f9ee683fa7 Merge pull request #2611 from adustm/STM32_entropy
STM32 hw entropy
2016-10-12 17:06:51 -05:00
Sam Grove 8d6e358387 Merge pull request #2947 from bcostm/adcintch_L4
STM32L4xx - Add support of ADC internal channels
2016-10-10 10:35:18 -05:00
adustm e189bc7cc8 Change MBEDTLS_ENTROPY_ALT to device has TRNG
update code accordingly
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 569f64a966 STM32L4xx - Add support of ADC internal channels 2016-10-06 15:41:00 +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
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