Commit Graph

556 Commits (7e9181cf578bf4b4159770273ab0b246bae0ac4f)

Author SHA1 Message Date
bcostm 172c02a856 STM32 serial: use get_uart_index function for F4 devices 2018-01-29 17:23:20 +01:00
Cruz Monrreal ebc8adbd4f
Merge pull request #5951 from jeromecoutant/PR_STDIO2
STM32 NUCLEO F413ZH and L433RC : STDIO configuration
2018-01-29 10:09:19 -06:00
jeromecoutant 8f647beacb STM32 : set all PinMap structures as weak
This allow custom overwrites
2018-01-29 09:26:49 +01:00
jeromecoutant c9c6857c7c STM32 NUCLEO F413ZH and L433RC : STDIO configuration
#5795 patches are missing for these 2 targets
STDIO_UART_TX and STDIO_UART_RX can be now user defined
2018-01-26 17:50:10 +01:00
Cruz Monrreal 7576813a7c
Merge pull request #5934 from jeromecoutant/PR_F401
NUCLEO_F401RE : PeripheralPins file update
2018-01-26 10:32:56 -06:00
jeromecoutant c26db91a09 MTB_XX : STDIO configuration
Here is a proposition
 - to align with other STM32
 - and to remove compilation warnings :
[Warning] PeripheralNames.h@38,0: "STDIO_UART" redefined
2018-01-25 15:46:36 +01:00
jeromecoutant e6ec285a6b NUCLEO_F401RE : PeripheralPins file update
Default SERIAL pins are now available for ADC and PWM
  when STDIO_UART_TX and STDIO_UART_RX are user defined
https://os.mbed.com/teams/ST/wiki/STDIO

Alternative pins have been also defined
2018-01-25 13:52:17 +01:00
Cruz Monrreal a6892da126
Merge pull request #5903 from jeromecoutant/PR_F407_ARM
STM32F407 : correct ARM scatter file
2018-01-24 11:28:28 -06:00
Cruz Monrreal 892e5e1b74
Merge pull request #5809 from ashok-rao/MTB_MXChip
Add MTB MXChip EMW3166
2018-01-23 11:33:47 -06:00
jeromecoutant 3cefae203c STM32F407 : correct ARM scatter file
Alignment with STM32Cube_FW_F4_V1.18.0 done
2018-01-23 12:41:35 +01:00
Cruz Monrreal 47a128a5e5
Merge pull request #5882 from ashok-rao/br-MTB_Dragonfly
Add MTB MTS_Dragonfly as a new target.
2018-01-19 13:58:03 -06:00
Ashok Rao 9ee69854ff Adding MTB MTS_Dragonfly as a new target 2018-01-18 17:08:59 +00:00
Cruz Monrreal f01fbde3c5
Merge pull request #5795 from jeromecoutant/PR_USER_DEFINED_STDIO
STM32 STDIO pins number are now configurable
2018-01-16 16:15:17 -06:00
jeromecoutant 0eede79e2b DISCO_F407VG : alignment with other STM32
- clock source is now a user choice
- IAR tool chain is available
2018-01-10 15:01:29 +01:00
Ashok Rao c138dedf73 Adding MTB MXChip EMW3166 as a new target 2018-01-08 21:07:38 +00:00
Jimmy Brisson 737f75a68f
Merge pull request #5608 from productize/nucleo-f413zh
NUCLEO_F413ZH: Add support for the NUCLEO-F413ZH board
2018-01-08 10:35:27 -06:00
jeromecoutant 9c6e7c0fa0 STM32F4: STDIO_UART_TX and STDIO_UART_RX can be now user defined
NB for UBLOX targets: usb_rx and usb_tx config name are still available
in order to not break current applications.
2018-01-08 11:42:46 +01:00
Jimmy Brisson af9e07357a
Merge pull request #5740 from ashok-rao/master
Adding MTB ublox ODIN W2 as a new target.
2018-01-04 10:05:02 -06:00
Jimmy Brisson 62a7ecddd3
Merge pull request #5570 from jeromecoutant/PR_STDIO
STM32 UART init update
2018-01-04 09:50:18 -06:00
Anna Bridge 20ad454f2b
Merge pull request #5613 from andreaslarssonublox/ublox_init_odin_evk_leds
Added init for ODIN EVK LEDs to be off by default
2017-12-29 14:30:50 +00:00
Adam Heinrich da81229186 NUCLEO_F413ZH: Add support for the NUCLEO-F413ZH board
Merged from the existing TARGET_DISCO_F413ZH code (which has the same MCU)
and TARGET_NUCLEO_F412ZG code (which has the same Nucleo-144 board and
pinout).
2017-12-29 15:30:10 +01:00
Ashok Rao e324d16fab Fixing indentation 2017-12-21 15:38:58 +00:00
Ashok Rao dc3c7fc11e Adding MTB ublox ODIN W2 2017-12-20 18:52:04 +00:00
Martin Kojtal 806b762473
Merge pull request #5677 from u-blox/c030_bq24295_voltage_fix
C030 Battery Charger Voltage Fix
2017-12-20 14:42:18 +00:00
jeromecoutant 8bc92bdd22 STM32F4 : compilation issue
Issue comes only when ST HAL macro USE_FULL_ASSERT is enabled
2017-12-13 13:57:26 +01:00
Bilal 0469dfb892 Bracket moved to next line 2017-12-13 16:37:19 +05:00
Bilal 5c1623c9e1 Licenses added in header files 2017-12-08 19:51:25 +05:00
Bilal a40469e7c5 C030 Battery Charger Voltage Fix 2017-12-08 17:39:21 +05:00
bcostm bfc4d68ae0 STM32 CAN3: remove test of CAN_2 and CAN_3
CAN_2 and CAN_3 are enum and not #define and this causes compilation error with GCC_ARM

Instead put back the test of CAN_NUM (which are defined in can_device.h).
2017-12-07 18:04:34 +01:00
Martin Kojtal c7e5eb2f97
Merge pull request #5397 from sakuraio/stm_sco-evb-01
add target SAKURAIO_EVB_01.
2017-11-30 18:16:09 +00:00
andreas.larsson 1eef1cd771 Added license header 2017-11-30 08:50:11 +01:00
andreas.larsson b5e9a5ca14 Added init for ODIN EVK LEDs to be off by default 2017-11-29 08:24:42 +01:00
andreas.larsson f2de0956b4 Updated ODIN drivers to v2.3 RC1 2017-11-28 12:22:45 +01:00
jeromecoutant 1cf47f6209 STM32 uart: update after code review 2017-11-24 13:39:33 +01:00
jeromecoutant 6d64c2fbf4 STM32 UART init update
- serial_init, serial_free and serial_baud function moved from serial_device.c (specific to each STM32 family) to serial_api.c (common STM32 file)
- default baudrate value was hardcoded to 9600
  - Value is set now to MBED_CONF_PLATFORM_STDIO_BAUD_RATE for STDIO
  - Value is set now to MBED_CONF_PLATFORM_DEFAULT_SERIAL_BAUD_RATE for other use
- UART init will not be stopped before calling serial_baud function
2017-11-23 14:47:54 +01:00
bcostm 1d3eb508bf STM32: fix linker error with adc_read() 2017-11-17 13:50:59 +01:00
bcostm 34fdcc926b STM32: move analogin_read functions in a common file 2017-11-17 13:50:59 +01:00
bcostm 4dbe95dded STM32: rename analogin_api.c in analogin_device.c 2017-11-17 13:50:59 +01:00
bcostm d5ff05a03b STM32F4 ADC: remove adc_inited flag 2017-11-17 13:50:59 +01:00
Martin Kojtal 114e019675
Merge pull request #5486 from bcostm/fix_CAN3
STM32: Add support of CAN3
2017-11-16 16:12:27 +00:00
Martin Kojtal dc6dd5961e
Merge pull request #5505 from LMESTM/fix_smartcard_HAL
STM32: HAL smartcard, fix memory corruption in Receive
2017-11-16 16:11:04 +00:00
Martin Kojtal 41eb565d9c
Merge pull request #5342 from ARMmbed/feature_cortex_a
Update CMSIS/RTX with Cortex-A support
2017-11-15 11:24:36 +00:00
Laurent MEUNIER be42c6de55 STM32: HAL smartcard, fix memory corruption in Receive
Re-casting with tmp the uint8_t* pData pointer to uint16_t* brings a
memory corruption and typically can corrupt the size parameter. This
is fixed with this commit.

STM32 Internal ticket reference : 39116
2017-11-15 10:50:21 +01:00
bcostm 2d8d8ae9e1 STM32: fix error with CAN_3 not defined 2017-11-15 10:36:03 +01:00
bcostm be2a6ae273 STM32: Use CAN3_BASE + typos 2017-11-14 09:48:02 +01:00
bcostm 0ef4e2881c STM32: Add support of CAN3 on STM32F413/F767 2017-11-14 09:48:02 +01:00
Bartek Szatkowski c5a5438256 Update params in calls to LD/STREXW to be uint32_t 2017-11-10 09:53:42 +00:00
Martin Kojtal 47bae16a5c
Merge pull request #5305 from andcor02/master
New Target: Mbed Connect Cloud board
2017-11-10 08:43:29 +00:00
Martin Kojtal 66054f4b62
Merge pull request #5455 from LMESTM/flash_2MB_GetSector_fix
STM32 Flash 2MB GetSector fix
2017-11-09 16:23:02 +00:00
jeromecoutant 17c86d1cd6 STM32F412 IAR linker file issue 2017-11-09 09:45:07 +01:00
Laurent MEUNIER 48a49b4a00 STM32: remove trailing white spaces 2017-11-08 10:28:46 +01:00
Laurent MEUNIER d9bda2800d STM32F4: Flash: fix 2MB GetSector computation
The computation of the sector number in GetSector for 2MB flash sizes
consists in adding an extra constant for 2MB dual bank (12 as in
ADDR_FLASH_SECTOR_12), then going through the same address check as if it
was an address of the first sector.

That means that we need to modify tmp and address as if it was a first bank
address, which we're doing here by sub_stracting 0x100000 delta.
2017-11-08 10:24:36 +01:00
Andrea Corrado 53c476acf2 introduced mbed Connect Cloud board based on ODIN-W2 Module rety commit, added ublox changes
Corrected error

Corrected error in targets json

Reworked JSON

Added lwip-eth to Connect ODIN removes ARM CC error

Fixed formating issues

Correct formating error in  .json

Indentation errors
2017-10-31 11:24:28 +00:00
jeromecoutant c51f0f3d5f STM32F4/STM32L4: remove MSP template file
HAL_MspInit/HAL_MspDeInit/HAL_PPP_MspInit/HAL_PPP_MspDeInit weak functions can now be overwritten as it is expected
2017-10-30 10:38:43 +01:00
misodengaku 1c28898ed1 add target TARGET_SAKURAIO_EVB_01. 2017-10-23 12:55:58 +09:00
bcostm ad55bc26dc STM32: Remove GCC_ARM compilation warnings 2017-10-17 14:04:59 +02:00
Jimmy Brisson f596c714bd Merge pull request #5287 from andreaslarssonublox/ublox_odin_driver_os_5_v2.2_rc1
Updated u-blox ODIN-W2 binaries to 2.2 rc1
2017-10-13 09:27:29 -05:00
Jimmy Brisson 6a74cdb39c Merge pull request #5263 from bcostm/fix_init_struct
STM32: Fix analogout structure/variable wrong initialization
2017-10-13 09:25:59 -05:00
Pavel Sorejs 97cb8519c8 Add bootloaderd support to NUCLEO_F446RE target 2017-10-12 19:44:02 +02:00
bcostm 88b82e312d fix init struct analogout 2017-10-05 16:35:05 +02:00
andreas.larsson bc3fd12a0d Updated u-blox ODIN-W2 binaries to 2.2 rc1 2017-10-04 16:41:59 +02:00
andreas.larsson 120c9ad56c Moved STDIO_UART defines to targets.json for UBLOX_EVK_ODIN_W2 instead of hardcoded. 2017-10-02 17:45:41 +02:00
Jimmy Brisson cc0b3d05aa Merge pull request #5130 from bcostm/freeze_timer_in_debug
STM32: Freeze master timer on stop/breakpoint
2017-10-02 10:38:57 -05:00
Jimmy Brisson 60ca4e9615 Merge pull request #5029 from kegilbert/odin-pinNames-whitespace-adjust
Adjust whitespace in Odin PinNames file to fit verbose LED pin mappings
2017-09-29 10:07:46 -05:00
Jimmy Brisson 6cb0258344 Merge pull request #5026 from LMESTM/flash_init_issue_4967
STM32: Lock / Unlock flash for each operation
2017-09-27 15:17:26 -05:00
Jimmy Brisson c24fed135b Merge pull request #5032 from 0xc0170/fix_mts_debug
mts targets: fix debug() usage
2017-09-27 09:07:53 -05: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
bcostm 9f86a32baf Add freeze timer on debug for all STM32 devices
This is a continuation of the work done on the STM32F401xE devices only.
2017-09-18 13:31:46 +02: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 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
Martin Kojtal 52f84810a7 mts targets: fix debug() usage
Instead of using #if NDEBUG, we can directly invoke debug() function. Fixes #5013
2017-09-06 15:56:01 +01:00
Kevin Gilbert 6fa766da50 Adjust whitespace in Odin PinNames file to fit verbose LED pin mappings 2017-09-05 13:43:06 -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 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 f5aa7c7c82 STM32: Lock / Unlock flash for each operation
Rather than Unlocking flash during flash object creation, and leaving
the flash possibly continuously unlocked a(s object might bever be freed),
we decide to Unlock then Lock again at each erase or program call.
2017-09-05 17:49:07 +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 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
Kevin Gilbert 41000e091c Add LED color remapping definitions to Odin target 2017-09-01 17:00:24 -05: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
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 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
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
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
Jimmy Brisson 7653f65434 Merge pull request #4878 from jeromecoutant/PR_ADC_INTERNAL
STM32 : internal ADC channels
2017-08-14 11:42:30 -05:00
Jimmy Brisson 95ca29930f Merge pull request #4851 from janjongboom/stm32f4_wrong_erase
STM32F4_HAL_MMC erase command check is wrong. == has higher precedence than &
2017-08-10 09:38:25 -05:00
jeromecoutant 803ab189fc STM32F4 : internal ADC channels 2017-08-09 11:01:27 +02:00
Martin Kojtal f200db3e84 STM32F4: fix for 2nd back sector
Use ADDR_FLASH_SECTOR_12 as this is defined by target (the flash size varies, for
instance for some F437xx is up to 2MB (2nd bank might not be there)).
2017-08-08 09:50:19 +01:00
Martin Kojtal c7dd95d9b8 STM32F437: remove flash api implementation
STM32F4 already contains generic flash api implementation, use it.
2017-08-08 00:13:47 +02:00
Jimmy Brisson 0e1c20d8e7 Merge pull request #4854 from adustm/STM32F412_flash_boot
NUCLEO_F412ZG add flash driver and bootloader support
2017-08-07 10:28:14 -05:00
Jimmy Brisson 9c81ba8766 Merge pull request #4835 from u-blox/c030_bootloader
Add bootloader support for the UBLOX_C030 platforms.
2017-08-07 10:27:56 -05:00
adustm 9d0e9dd8de Move DEVICE_FLASH define to avoid compilation issues for non FLASH devices 2017-08-04 10:09:27 +02:00
adustm 44c8d16243 Add bootloader support 2017-08-03 15:07:14 +02:00
adustm 8bd7b595d8 Move flash_api.c to STM32F4 level + add flash_data.h for STM32F412 device
add FLASH to targets.json
2017-08-03 14:14:05 +02:00
Jan Jongboom 54929f6aee STM32F4_HAL_MMC erase command check is wrong. == has higher precedence than & 2017-08-03 13:03:36 +02:00
Jimmy Brisson f08d5a496c Merge pull request #4623 from LMESTM/analogin_handle
Improve management handling of multiple instances of analogin ojects
2017-07-31 15:23:31 +00:00
Jimmy Brisson f4de24bae1 Merge pull request #4793 from jeromecoutant/PR_F4_I2C
STM32 I2C : correct async issue
2017-07-24 10:59:03 -05:00
Jimmy Brisson 9e443e9d14 Merge pull request #4734 from LMESTM/stm32_uart_irq
Avoid data loss with serial interrupt used at high baudrates
2017-07-24 10:55:07 -05:00
jeromecoutant c8cba15be7 STM32 I2C : correct async issue 2017-07-21 13:35:58 +02:00
Laurent MEUNIER 7414b1266b STM32: ADC: Fix PinMap_ADC_Internal
The instance needs to be searched in PinMap_ADC_Internal, not PinMap_ADC.
This was a copy paste error...
2017-07-20 14:15:37 +02:00
Jimmy Brisson 953b9250f1 Merge pull request #4751 from andreaslarssonublox/ublox_remove_redundant_odin_target_folder
Remove redundant ODIN-W2 target folder
2017-07-17 11:09:58 -05:00
Jimmy Brisson a0231db0b9 Merge pull request #4727 from u-blox/c030_peripheral_pins
Update UART3 pins for UBLOX_C030 platform.
2017-07-17 11:09:19 -05:00
Laurent MEUNIER efbeb0d057 STM32: analogin: adc struct member not needed anymore
The adc in analogin_t has the same value as the Instance member of
ADC_HandleTypeDef. So we can only rely on the later one.
2017-07-17 13:27:22 +02:00
Laurent MEUNIER 8540e8a1dd STM32: Analogin - define handle in object not as a global
In this commit, the analogin_s structure is moved to commonn_objects.h file
to limit the duplicaion.

The ADC handle is moved from a global variable to a struct member of the
analogin object. This allows multiple ADC instances to work correctly.

Note that State needs to be explicitely set to HAL_ADC_STATE_RESET
because the object is not zero initialized.
2017-07-17 13:23:45 +02:00
Laurent MEUNIER b5cbaaa0d0 STM32: Serial - use TXE as tx_irq instead of TC
TXE indicates that a byte can be written to UART register for sending,
while TC indicates that last byte was completely sent. So the TXE flag
can be used in case of interrupt based Serial communication, to allow
faster and efficient application buffer emptying.

Also TXE flag will be erased from the interrupt when writing to register.
In case there is nothing to write in the register, the application is
expected to disable the interrupt.
2017-07-17 08:46:00 +02:00
Laurent MEUNIER 85711eb09e STM32: Serial - do no clear RXNE flag
The RXNE flag is getting cleared when reading Data Register so it should
not be cleared here. Especially in case of high data rate, another byte of
data could have received during irq_handler call and clearing the flag
would read and discard this data which would be lost for application.
2017-07-17 08:46:00 +02:00
Martin Kojtal 1e821499df Merge pull request #4668 from bcostm/update_f429zi_pinouts
DISCO/NUCLEO_F429ZI: Enable all alternate functions and pins
2017-07-13 16:45:59 +02:00
Martin Kojtal 42548f3dce Merge pull request #4691 from LMESTM/analogin_sample_time
STM32: F4: Increase ADC sampling time for VBAT
2017-07-13 16:43:40 +02:00
Rob Meades 1c7a7bc6a3 Add bootloader support for the UBLOX_C030 platforms. 2017-07-13 15:42:54 +01:00
andreas.larsson 969d44d833 Remove redundant ODIN-W2 target folder 2017-07-12 15:05:25 +02:00
Jimmy Brisson 3d86959dd8 Merge pull request #4485 from kegilbert/f429_sdk_flash_driver-rebase
Replace CMSIS flash driver by SDK flash driver
2017-07-10 12:03:03 -05:00
Rob Meades f920cc65af UBLOX_C030: correct UART 3 Tx & Rx pins (they were the wrong way around) and add the flow control lines for UART 3. 2017-07-08 11:32:46 +01:00
bcostm 98aa178127 NUCLEO_F429ZI: comments corrections 2017-07-05 10:03:30 +02:00
bcostm a86fc17e99 DISCO_F429ZI: Typo correction 2017-07-05 10:03:27 +02:00
bcostm e8c817b105 NUCLEO_F429ZI: Add alternate pins and enable all pins 2017-07-05 10:03:23 +02:00
bcostm 20ef523195 DISCO_F429ZI: Typo corrections + add missing ALT pins 2017-07-05 10:03:21 +02:00
bcostm b11151a96d DISCO_F429ZI: Add missing ADC alternate pins 2017-07-05 10:03:17 +02:00
bcostm 3cdf90dc2f DISCO_F429ZI: Add alternate pins and enable all pins 2017-07-05 10:03:15 +02:00
bcostm 7b09a10360 DISCO_F429ZI: Add 'Connected to' comment 2017-07-05 10:03:11 +02:00
Laurent MEUNIER f8d6f95102 STM32: F4: Increase ADC sampling time
To get a valid VBAT measurement on F4 targets, it is required to increased
the sampling time to its maximum value.
2017-07-03 15:51:14 +02:00
Jimmy Brisson d382d44f06 Merge pull request #4529 from LMESTM/issue_1083
Manage multiple instances of analog out
2017-06-30 13:53:46 -05:00
adustm 90bc8ca7ae Replase CMSIS flash driver by SDK flash driver 2017-06-29 14:25:27 -05:00
adustm 4860e6a485 Rebase of: cb3907ef70
typo in flash_s struct
2017-06-29 14:24:40 -05:00
adustm e7fb5b4edd Rebase of: dfd0cf63e9
fix STM32F439 flash HAL
2017-06-29 14:24:40 -05:00
adustm 64e902edda Rebase: 0d1c6c2d34
This commit completely rewrote flash_api.c in a few places so kicked out changes from Master and accepted the branch changes.

F429 + F439 : changes after code review
GetSector has been rewritten
2017-06-29 14:24:40 -05:00
adustm 565c3c11ad Allow UBLOX to use SDK flash driver 2017-06-29 14:24:40 -05:00
jeromecoutant 2ae2d9896e STM32F4: json clock source configuration
- default value is the same as before patch
- system_stm32f4xx.c file is copied to family level with all other ST cube files
- specific clock configuration is now in a new file: system_clock.c
- nvic_addr.h file is now in TARGET_STM level, and can be used everywhere
2017-06-29 09:57:40 +02:00
Jimmy Brisson e907079456 Merge pull request #4603 from jeromecoutant/PR_OVERRIDE
STM32 : mbed_overrides.c is common for all families
2017-06-27 14:59:24 -05:00
Laurent MEUNIER 4238216ad8 STM32: STM32F413xH dac_s common definition
Fixing conflict as STM32F413xH target has been merged after the first
version of moving dac_s structure definition to common_ojects.h
2017-06-27 09:30:45 +02:00
Laurent MEUNIER 024b3da5f1 STM32: analog_out: generalize code for multiple instance handling
Moving some code in common to be able to manage several ADC instances,
or several channels of an instance.

The change involves:
- moving dac_s structure definition to common_object.h
- create TARGET_STM/analogout_api.c and move fully common analog_out
functions in there
- rename analogout_api.c of each target family into analogout_device.c
to keep platform specific code
- update analogout_device.c to rely on obj->handle and obj->channel
- align analogout_init function as much as possible between families in
analogout_device.c files
2017-06-27 09:27:46 +02:00
Jimmy Brisson fc39ad1625 Merge pull request #4422 from jeromecoutant/PR_F4_HSE_TIMEOUT
STM32F4 set HSE timeout value to 100ms
2017-06-26 10:29:13 -05:00
Anna Bridge f1d0314783 Merge pull request #4410 from arostm/dev_disco_f413ZH
DISCO_F413ZH: Add new platform
2017-06-23 11:41:50 +01:00
Anna Bridge 55355d7374 Merge pull request #4401 from jeromecoutant/PR_USB_PIN
STM32 : Add USB used pins in PinNames.h files
2017-06-23 11:37:19 +01:00
Anna Bridge 4f5d4f040e Merge pull request #4375 from LMESTM/STM32_SPI_LL
Stm32 spi : use LL API to improve performances
2017-06-23 11:33:55 +01:00
arostm b5af4c40ec DISCO_F413ZH: Add include of LL timer file 2017-06-22 09:23:09 +02:00
arostm c0725aa3e8 DISCO_F413ZH: Deleted cmsis_nvic.c and modified cmsis_nvic.h 2017-06-22 09:23:08 +02:00
arostm 9a34c72bc5 DISCO_F413ZH: Remove hal_conf file
The board have to use th hal_conf file from F4/device directory
2017-06-22 09:23:08 +02:00
arostm 46949d054f DISCO_F413ZH: add UART9 and 10 in serial_api.c 2017-06-22 09:23:08 +02:00
bcostm 6426d277d2 DISCO_F413ZH: Change I2C and SPI instances for Arduino default pins
Needed to pass ci-test-shield tests.
2017-06-22 09:23:07 +02:00
bcostm 8e798a9f35 DISCO_F413ZH: typo corrections in peripheralpins.c 2017-06-22 09:23:07 +02:00
bcostm b62005ebb8 DISCO_F413ZH: Fix wrong NVIC RAM end address in IAR icf file 2017-06-22 09:23:07 +02:00
bcostm e8ceb3bfa1 DISCO_F413ZH: correct ram length in GCC ld file 2017-06-22 09:23:07 +02:00
bcostm a89c0ab1c0 DISCO_F413ZH: Add BUTTON1 definition 2017-06-22 09:16:32 +02:00
arostm b862b653d3 DISCO_F413ZH: corrections
- leds definition
- add sw4stm32 exporter
- recomment mco debug
2017-06-22 09:16:32 +02:00
arostm 4a87436db2 DISCO_F413ZH: modifications in peripheralPins.c 2017-06-22 09:16:32 +02:00
arostm 781db4f265 DISCO_F413ZH: add some files and modification (targets.json, rtx...) 2017-06-22 09:16:32 +02:00
arostm 5e3350ce38 DISCO_F413ZH: Modification needed to build 2017-06-22 09:07:00 +02:00
arostm af6f9aaee0 DISCO_F413ZH: Creation folders and files (pinout, startup, etc...) 2017-06-22 09:07:00 +02:00
jeromecoutant 18572cc65b STM32 : mbed_overrides.c is common for all families 2017-06-21 16:03:05 +02:00
Martin Kojtal d121a43e37 Merge pull request #4597 from theotherjimmy/travis-upcase-asm
Assert that all assembly files are named correctly in travis
2017-06-21 09:50:47 +02:00
Jimmy Brisson c7d6bbe295 Upcase all assembler file extensions 2017-06-20 14:50:08 -05:00
Anna Bridge 525debc63b Merge pull request #4567 from u-blox/ublox_odin_driver_os_5_v2.1_rc1
Updated u-blox ODIN-W2 driver binaries to 2.1 rc1
2017-06-20 17:09:13 +01:00
Anna Bridge 810e16f88e Merge pull request #4337 from u-blox/cellular_feature_br_ublox_pr1
Platform support for new CellularInterface in UBLOX_C027 and UBLOX_C030_U201.
2017-06-20 14:00:11 +01:00
Jimmy Brisson 737a64c988 Merge pull request #4502 from LMESTM/issue_899
STM32: serial: clear Overrun flag if it is set when checking if readable
2017-06-19 11:00:23 -05:00
andreas.larsson e12efc073d Moved u-blox ODIN-W2 cb_cert_utils.h to the correct place 2017-06-16 11:18:37 +02:00
andreas.larsson a33f65d5f5 Updated binaries to 2.1 rc1 2017-06-16 10:44:16 +02:00
Laurent MEUNIER 20bd774a6c STM32 SPI specific mode for higher performance
This commit implements a SPI mode which will offer better performance
thanks to usage of Lower Layer API which use fewer registers access,
at the cost of lower robustness (no error management).
2017-06-16 10:23:48 +02:00
Rob Meades fdf8a7980f Platform support for OnboardCellular modem and u-blox cellular interface drivers. This change allows the u-blox C027 and C030 boards to use both the mbed-os OnboardCellular modem driver and the u-blox cellular interface drivers (which support both PPP and AT data modes). 2017-06-15 14:32:09 +01:00
Andreas Larsson 6a270fb348 Moved ODIN target files into STM32F439xI folder to avoid duplicate code 2017-06-14 13:21:04 -05:00
Russ Butler 47b78a2d17 Fix STM32 crashes on boot due to unset VTOR
Remove HAL_Init and related code from SystemInit and move it to
mbed_sdk_init. The function SystemInit is called early in the boot
sequence before RAM is initialized or the VTOR is setup, so it should
not be used to perform the HAL initialization.

This fixes crashes due the vector table being used before it has been
relocated.
2017-06-13 12:12:20 -05:00
jeromecoutant 8301ee04ca STM32 Add USB pins name in PinNames.h files 2017-06-13 17:15:27 +02:00
Laurent MEUNIER f77ecf4e12 STM32: Put some serial code in common between families 2017-06-09 13:30:54 +02:00
Sam Grove ee8bd05ff6 Merge pull request #4481 from kegilbert/add_bootloader_support_stm32f439xI-rebase
Add bootloader support stm32f439xI - Rebase
2017-06-08 15:55:59 -05:00
Laurent MEUNIER c5c33f1d0f STM32: serial: clear Overrun flag if it is set when checking if readable
Note that this could have side effects on the application as it would
not be aware that data has been missed. This may be later solved by
adding an error management parameter to the Serial API in mbed.

The advantage is that the serial link can work again.
2017-06-08 17:01:30 +02:00
Sam Grove 8232afa53e Merge pull request #4216 from fmanno/issue-4189
STM32s Serial: Correct handling of parity bits
2017-06-06 20:00:19 -05:00
Sam Grove 72de85c62f Merge pull request #4417 from monkiineko/master
STM32: Fix 32-bit us ticker interrupt scheduling
2017-06-06 19:59:52 -05:00
Sam Grove 3c3e35dd44 Merge pull request #4423 from arostm/nucleo_f412zg_remove_hal_conf
NUCLEO_F412ZG: Remove hal_conf file from NUCLEO_F412ZG
2017-06-06 19:59:31 -05:00
Andreas Larsson 7a0778b7d2 Fixed wrong stack size start 2017-06-06 17:09:01 -05:00
Andreas Larsson 7e58474a4e Fixed comment, 439ZI to more generic 439xI 2017-06-06 17:08:51 -05:00
Andreas Larsson fe8afae0c1 Fixed comment alignments 2017-06-06 17:08:43 -05:00
Andreas Larsson 6f1a8a8515 Added MBED_APP_START and MBED_APP_SIZE used by the app when a boot loader is present 2017-06-06 17:08:28 -05:00
Anna Bridge a41e08c7bf Merge pull request #4365 from LMESTM/fix_i2C_pcf_F1F2F4L1
Fix i2c communication with pcf8574 on stm32 targets of f1, f2, f4 and l1 families
2017-06-05 14:41:36 +01:00
Sam Grove 5f138810a9 Merge pull request #4294 from ARMmbed/feature_cmsis5
Update CMSIS-Core and RTX to version 5
2017-06-02 23:44:32 -05:00
Laurent MEUNIER a1f7a36461 STM32 HAL I2C fix RXNE case
As reported in issue #4214, there are seen issues seen first on
NUCLEO_F103RB in case of successive Reads of 1 byte at a time.

This issue is due to a wrong state management in the end of read sequence.
Also F1 i2c driver was not fully aligned to others, which is updated here.
2017-06-02 17:28:48 +02:00
Bradley Scott 260378e774 STM32: Fix 32-bit us ticker interrupt scheduling
For STM32 targets using a 32-bit timer for the microsecond ticker, the
driver did not properly handle timestamps that are in the past.  It
would just blindly set the compare register to the requested timestamp,
resulting in the interrupt being serviced up to 4295 seconds late
(i.e. after the 32-bit timer counts all the way around to hit the
timestamp again).

This problem can easily be reproduced by creating a Timeout object
then calling the timeout's attach_us() member function to attach a
callback with a timeout of 0 us.  The callback will not get called for
over 2147 seconds, and possibly up to 4295 seconds late if no other
microsecond ticker events are getting scheduled in the meantime.

Now, after the compare register has been set, the timestamp is checked
against the current time to see if the timestamp is in the past, and
if so, the compare event is manually set.

NOTE: By checking if the timestamp is in the past after configuring the
capture register, we ensure proper handling in the case where the timer
updates past the timestamp while setting the capture register.
2017-06-01 12:52:03 -04:00
arostm ab87e7a65c NUCLEO_F412ZG: Remove hal_conf file
The board have to use th hal_conf file from F4/device directory
2017-06-01 16:52:22 +02:00
jeromecoutant 476d2e6be5 STM32F4 set HSE timeout value to 100ms 2017-06-01 14:11:34 +02:00
Martin Kojtal 8a870a66c0 Merge pull request #4119 from hasnainvirk/cellular_feature_br
Cellular feature br
2017-06-01 14:01:17 +02:00
Jimmy Brisson 944a17fe3c Merge pull request #4402 from LMESTM/STM32_F2_CUBE_v160
Stm32 f2 cube sdk update to v1.6.0
2017-05-31 11:28:36 -05:00
Hasnain Virk 24de27c989 Major Refactoring & extensions
For keep supporting external APIs with the same name (supposedly there are a larger
number of users of those APIs), BufferedSerial and ATParser are being renamed.
BufferedSerial becomes UARTSerial, will complement a  future USBSerial etc.
ATParser becomes ATCmdParser.

* UARTSerial moves to /drivers

* APN_db.h is moved from platform to cellular/util/.

* Original CellularInterface is restored for backward compatability (again, supposedly there
  are users of that).

* A new file, CellularBase is added which will now servce as the base class for all
  upcoming drivers.

* Special restructuring for the driver has been undertaken. This makes a clear cut distinction
  between an on-board or an off-board implementation.
  	- PPPCellularInterface is a generic network interface that works with a generic FileHandle
          and PPP. A derived class is needed to pass that FileHandle.
        - PPPCellularInterface provides some base functionality like network registration, AT setup,
          PPP connection etc. Lower level job is delegated to the derived classes and various modem
          specific APIs are provided which are supposed to be overridden.
        - UARTCellularInterface is derived from PPPCellularInterface. It constructs a FileHandle and
          passes it back to PPPCellularInterface as well as provides modem hangupf functionality.
          In future we could proive a USBInterface that would derive from PPPCellularInterface and could
          pass the FileHandle back.
	- OnboardCellularInterface is derived from UARTCellularInterfae and provides hooks to
          the target provided implementation of onbard_modem_api.h. An off-board modem, i.e, a modem on
          a shield has to override the modem_init(), modem_power_up() etc as it cannot use
          onboard_modem_api.h.
2017-05-31 15:02:11 +03:00
Hasnain Virk ccbf00571f Introducing hal/modem_api.h
This provides a HAL layer for Modem bearing devices.
Provides a standard interface to upper layer drivers.
Platform providers will be implementing this API under their
specific targets.

As a reference, two implementations are provided under TARGET_C027 (UBLOX)
and TARGET_MTS_DRAGONFLY_F411RE (MultiTech).

targets.json now contains a tag "MODEM" which tells that this target
has a modem and the modem_api is protected by a flag DEVICE_MODEM
(following the DEVICE_SERIAL fashion ).
2017-05-31 15:02:11 +03:00
Hasnain Virk fcbcfafec5 Preparing grounds for modem api
* Lays down ground for mbed modem_api
* Standardizes pin names relating to modem device for UBLOX C027 and MTS_DRAGONFLY_F411RE
  devices
* Ublox modem api is changed to use a standard, platform independent name so that same
  api could be used with multiple ubloc modems.
* DCD Polarity macro is added to assist the driver in knowing correct polarity
2017-05-31 15:02:11 +03:00
Hasnain Virk 925f54bfce Heap size reduced to 64k for IAR
IAR heap sizes were hard configured to be 96k which is 75% of the
total RAM available. Reduced it to be 64k which is half of the available RAM.
2017-05-31 15:02:11 +03:00
andreas.larsson abcae6f01e Updated driver binaries for feature_cmsis5 as v2.0 rc1 2017-05-30 18:55:55 +01:00
Bartek Szatkowski b97ffe8fdc CMSIS5: Replace target defined NVIC_Set/GetVector with CMSIS implementation 2017-05-30 18:55:51 +01:00
Francisco J. Manno 5e98da14d3 STM32s Serial does not properly handle parity bits
Reworked the serial_format() function for STM32F0x
devices to take the format in the form:
data_bits - parity - stop_bits

E.g. 8 - N - 1

where data_bits exclude the parity bit.
Added a case for 7 bits data as at least the chips
STM32F0x1/STM32F0x2/STM32F0x8 support 7 bits data.

Consolidated serial_format() and uart_init()
functions into a general TARGET_STM serial_api.c
file since the functions are common to all STM targets.

Fixes #4189
2017-05-30 17:17:20 +01:00
Laurent MEUNIER 8576993a1a Introduce stm32_assert.h for MBED port
When we want to activate USE_FULL_ASSERT macro in STM32 CUBE, there is a
need to have the assert map to MBED.

The easiest way to have this definition in a single place for all STM32
HAL and LL files using it, is to add a specific header file where the
porting to MBED is done.
2017-05-29 13:48:29 +02:00
adustm 897625cc96 Give access to HAL_GetTick function 2017-05-29 10:24:03 +02:00
Sam Grove 2561e0bff4 Merge pull request #4299 from jeromecoutant/PULL_REQUEST_CUBE_UPDATE_F4_V1.16.0
STM32F4 cube update from v1.12.0 to v1.16.0
2017-05-26 17:13:08 -05:00
Martin Kojtal 5d0ce3c531 Merge pull request #4338 from andreaslarssonublox/ublox_odin_driver_os_5_v1.3_rc2
u-blox ODIN driver v1.3 rc2 for mbed OS 5
2017-05-19 08:42:14 +01:00