Commit Graph

850 Commits (5a6aee43eb58c9ba3b1d2de7d178a3d68867a0da)

Author SHA1 Message Date
Martin Kojtal a74e95fb26 Merge pull request #4973 from gorazdko/new-target-L-TEK-FF1705
Add new target: L-TEK FF1705
2017-09-22 11:32:50 +01:00
Jimmy Brisson a2cdb10bf7 Merge pull request #4932 from LMESTM/can_reset
Fix STM32 CAN reset to not lose context
2017-09-20 16:24:40 -05:00
Jimmy Brisson d3b33d75a4 Correct NRF SDK11 assembly 2017-09-11 13:20:33 -05:00
Jimmy Brisson 0b7a9033b5 Enable many STM devices with ARMC6
Yet another incorrect arm vs gcc discriminant
2017-09-11 13:20:32 -05:00
Jimmy Brisson 15a9a0382b Enable Compiling with ARMC6 across all targets
remove duplicate sys.cpp
2017-09-11 13:20:32 -05:00
Jimmy Brisson 3f2e986256 Merge pull request #5012 from LMESTM/issue5004_ticker_16b
STM32_us_ticker_16b: keep code to cope with past event
2017-09-09 12:09:25 -05:00
Russ Butler 72f07ec4d9 Make room on stm32f07 for tickless
Decrease the interrupt stack from 2k down to 1k so there is enough
ram to build all the tests with tickless enabled. In general, targets
should not need an interrupt stack greater than 1k with mbed-os.
2017-09-07 21:35:06 -05:00
Jimmy Brisson 9b85155aa7 Merge pull request #4881 from betzw/betzw_freeze_github_wb
[STM32F401xE] Freeze master timer on stop/breakpoint
2017-09-06 14:25:47 -05:00
Jimmy Brisson 5f9d984a22 Merge pull request #5013 from janjongboom/mts_printf
MTS targets: Don't use any printf() calls when NDEBUG is defined
2017-09-05 11:19:42 -05:00
Jimmy Brisson 34d41c5068 Merge pull request #4995 from kegilbert/odin-led-remap
Add LED color remapping definitions to Odin target
2017-09-05 11:17:42 -05:00
Jimmy Brisson e009d9f7be Merge pull request #4975 from LMESTM/STM32_SPI3W
Stm32 spi 3 wires mode support
2017-09-05 11:16:53 -05:00
Jimmy Brisson 94fb4a3aad Merge pull request #4929 from bcostm/adc_sampletime_vrefint
STM32F4: Increase ADC sample time for VREF
2017-09-05 11:15:53 -05:00
Laurent MEUNIER f2eb77a81a STM32_us_ticker_16b: reset counter when fire interrupt
Fixing regression introduced in commit
"Ticker: add fire interrupt now function".

In above mentioned commit, the management of timestamp being in the past
has been moved to higher layer (hal/mbed_ticker_api.c), but the reset of
oc_int was missing when implementing the new us_ticker_fire_interrupt
function - which is fixed now.
2017-09-05 13:03:21 +02:00
Laurent MEUNIER 5997811d46 STM32: F2: put can_s struct under DEVICE_CAN option
In case of F2 devices without CAN support.
2017-09-05 10:27:21 +02:00
Laurent MEUNIER 04ac65a4e6 STM32: CAN: restore registers after can_reset
After reset the MCR register content needs to be restored so we're
introducing the can_registers_init function to be called at the first
init stage, but also after reset. We also store the can frequency to
go through the initialisation phase again.
2017-09-05 10:27:21 +02:00
Laurent MEUNIER 8357f6fe77 STM32: CAN: store the mode in object context
In order to apply the same mode in case of reset, we store the current
requested mode in the HAL structure.

To make storage in a single place, we also change can_monitor to call
can_mode function as they actually acting on same registers.
2017-09-05 10:27:21 +02:00
Laurent MEUNIER 57222b604f STM32: CAN: do not overwite BTR register when setting frequency
BTR register has other bits than the ones calculated and set through
the can_speed function, so let's take care to only write to the
right registers.
2017-09-05 10:27:21 +02:00
Laurent MEUNIER 759642af8e STM32: Define CAN handle as part of can object
Instead of a static object, this will make driver
instantiation more robust and allow to re-use init
configuration on a need basis.

The CANName struct member is actually the CAN registers base address,
which is now available in the CanHandle.Instance field, so we don't need
CANName anymore.
2017-09-05 10:27:21 +02:00
Laurent MEUNIER 66162c6b1d STM32: move can_s definition to common_objects.h
This will ease up further changes to the structure.
2017-09-05 10:27:21 +02:00
Martin Kojtal 675a17cff2 Merge pull request #4980 from LMESTM/stm32_flash_update
Stm32 flash update
2017-09-04 16:49:18 +01:00
Jan Jongboom 72262ca0b3 MTS targets: Don't use any printf() calls when NDEBUG is defined, prevents linking out printf() and friends in release build 2017-09-04 12:05:41 +01:00
Laurent MEUNIER b01cc966b0 Introduce TIMEOUT_1_BYTE
This makes the code more explicit about what is last parameter of
HAL_SPI_Transmit/HAL_SPI_Receive functions.
2017-09-04 11:16:49 +02:00
Kevin Gilbert 41000e091c Add LED color remapping definitions to Odin target 2017-09-01 17:00:24 -05:00
gorazd 7773acd78c arduino connector namings added 2017-08-31 15:18:14 +02:00
Jimmy Brisson 82f5ce22f8 Merge pull request #4951 from JanneKiiskila/ublox_odin_buttons
UBLOX_EVK_ODIN_W2- add BUTTON1/2 definitions
2017-08-29 13:46:10 -05:00
Jimmy Brisson d68cd09c63 Merge pull request #4944 from LMESTM/F1_AFIO_CLK
STM32: F1 GPIO: Enable AFIO clock
2017-08-29 13:45:27 -05:00
Laurent MEUNIER dacf04e69b STM32: Flash: cover TARGET_F410RB case
There was a comilation error for NUCLeO_F410RB as it does not have
a ADDR_FLASH_SECTOR_5.
2017-08-29 11:42:51 +02:00
Wolfgang Betz f8114f2295 [STM32F401xE] Freeze master timer on stop/breakpoint 2017-08-28 14:29:47 +02:00
Laurent MEUNIER a9468c09e3 STM32: F7 Flash API support
Adding flash API support to STM32F7 family. The code is derived from
F4 family one. The memory topology is described in flash_data.h files
and the flash_api.c implementation manages the 2 possible memory types (1
or 2 banks).
2017-08-28 10:23:55 +02:00
Laurent MEUNIER e6631c02a4 STM32: adjust flash.get_page_size() to minimum programable size
Users of FlashIAP usually get the minimum programable size
by calling flash.get_page_size(), so let's return the minimum
to allows a most efficient usage of flash.

For F4 devices, this is 1 byte.
For L0 and L1 devices, this is a word (4 bytes).
For L4 devices, this is a double word (8 bytes).
2017-08-25 17:21:30 +02:00
Laurent MEUNIER 3de2ce9c10 STM32: Add Flash API support to STM32F413xH
First add the flash_data.h that describe the flash memory topology,
and also activate FLASH support for the corresponding targets.

This is a 1,5MB flash memory device which contains 15 sectors, where
sectors 12 to 15 are 128KB sectors. So flash_api.c needed has been
updated to differentiate between this flash memory and the 2MB ones
by checking existence of sector 16 instead of sector 12.
2017-08-25 17:21:30 +02:00
Laurent MEUNIER 4b62cf015c STM32: Add Flash API support to STM32F469xI
First add the flash_data.h that describe the flash memory topology,
and also activate FLASH support for the corresponding targets.
2017-08-25 17:21:08 +02:00
Laurent MEUNIER 86ad16f5f8 STM32: Add Flash API support to STM32F410RB
First add the flash_data.h that describe the flash memory topology,
and also activate FLASH support for the corresponding targets.
2017-08-25 17:20:40 +02:00
Laurent MEUNIER 645fd0f06d STM32: Add Flash API support to STM32F4 devices with 512KB Flash
First add the flash_data.h that describe the flash memory topology,
and also activate FLASH support for the corresponding targets.
2017-08-25 17:20:13 +02:00
Jimmy Brisson 3926b56cd8 Merge pull request #4935 from LMESTM/F410RB_ARM_TC
STM32: fix F410RB vectors size
2017-08-24 10:16:31 -05:00
Janne Kiiskilä 2e6cd907d4 UBLOX_ODIN_EVK_W2 - add BUTTON1/2 definitions
UBLOX_ODIN_EVK_W2 is missing the abstract button definitions originally
introduced with PR https://github.com/ARMmbed/mbed-os/pull/4249.

Fix two tab to spaces issues on the go as well.
2017-08-22 09:54:53 +03:00
Jimmy Brisson 316c875136 Merge pull request #4926 from bcostm/merge_l053x8
STM32L053x8: Refactor NUCLEO_L053R8 and DISCO_L053C8 targets
2017-08-21 10:38:42 -05:00
Jimmy Brisson bb7ab1942a Merge pull request #4896 from pilotak/patch-1
target BLUEPILL_F103C8 compile fix
2017-08-21 10:37:01 -05:00
Laurent MEUNIER d4fa585ac4 STM32: F1 GPIO: Enable AFIO clock
It is required to enable AFIO clock before using __HAL_AFIO_REMAP_xy
macros, which was missing here. Without clocks enable, the remap
actually doesn't occur. This would possibly cause some PIOs (part of
PB_3, PB_4, PA_13, PA_14, PA_15) to not behave as expected.

In most cases AFIO clock was enabled in stm_pin_SetAFPin function, so
that this bug was not visible. But there were few cases left were
stm_pin_DisconnectDebug would be called first. A typical case was
with GCC_ARM in case a DigitalInOut variable is declared as global.
2017-08-21 13:32:33 +02:00
Laurent MEUNIER 95fc6d0bad STM32: fix F410RB vectors size
On F410RB, the size reserved to vectors with ARM toolchains was not properly
defined,which was not the case for other toolchains.

This would cause few tests to fail like EXAMPLE_1 with below error:

HOST: Unknown property: mbed assertation failed: _ptr == (T *)&_data, file: C:/github/mbed/BUILD/mbed/platform/SingletonPtr.h, line 91
2017-08-18 11:57:51 +02:00
bcostm d0fce353cc STM32F4: Set ADC sample time to max value for VRefInt 2017-08-17 16:12:16 +02:00
Laurent MEUNIER 8c99bf3b62 SPI: HAL: disable IP at the end of transmit
in case of 1LINE direction
2017-08-17 11:02:43 +02:00
mapellil 6dfafc7293 STM32: SPI: Use LL in spi_slave_read
this is more a cosmetic change, but since LL was introduced, we can now
use it here as well.
2017-08-17 11:02:43 +02:00
Laurent MEUNIER 57371ea591 STM32: SPI: Do not enable SPI during Init if 3W
Enabling SPI causes the clock to be output by default.

Most devices will not care about extra clock cycles, especially as long
as chip select is not active, nevertheless this may cause side issues
with other devices especially during init phase.

This was actually the case with a 3 wire device (LPS22HB sensor).
2017-08-17 11:02:43 +02:00
mapellil 4f20cfc0be STM32: SPI: SPI3W / SPI_DIRECTION_1LINE management
In case MISO is not passed at SPI init, then we consider a 3 wires SPI
configuration is requested, which corresponds to SPI_DIRECTION_1LINE
configuration parameter in STM32 HAL layer.

We're then handling this specific case of SPI_DIRECTION_1LINE,
in spi_master_write or spi_master_block_write, we call to HAL API
2017-08-17 11:02:43 +02:00
bcostm 8273e371df STM32L053x8: Align system_clock.c files 2017-08-17 10:55:18 +02:00
bcostm 580c7cb0b6 STM32L053x8: cleanup ARM compiler files 2017-08-16 17:10:42 +02:00
bcostm 9b8bb9eec4 STM32L053x8: Move other folders and files 2017-08-16 17:10:42 +02:00
bcostm 04cefd300d STM32L053x8: Create folder and move objects.h 2017-08-16 17:10:42 +02:00
Jimmy Brisson 7653f65434 Merge pull request #4878 from jeromecoutant/PR_ADC_INTERNAL
STM32 : internal ADC channels
2017-08-14 11:42:30 -05:00