Commit Graph

556 Commits (7e9181cf578bf4b4159770273ab0b246bae0ac4f)

Author SHA1 Message Date
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
Sam Grove a2a1581e2e Merge pull request #4263 from Pliny/master
stm32f4xx: Consider all DMA ready/busy states in conditionals
2017-05-19 01:45:00 -05:00
andreas.larsson e563fd477a Updated ODIN driver binaries for v1.3 rc2 2017-05-17 23:14:57 +02:00
andreas.larsson e177bcfd1f Refactored the driver class 2017-05-17 23:13:29 +02:00
andreas.larsson e0de402c77 Added BD_ADDR macros 2017-05-17 23:13:14 +02:00
andreas.larsson dcc303225c Added quality of service functions 2017-05-17 23:12:54 +02:00
andreas.larsson db2623d318 Added cbBSM_setStaticLinkKeyNvdsId 2017-05-17 23:12:19 +02:00
andreas.larsson 9e61a52c12 Added cbHW_setSysTickMode 2017-05-17 23:12:05 +02:00
andreas.larsson 233b92ce3f Added cbSTATUS_RECEIVE_DATA_MODE + macros 2017-05-17 23:11:50 +02:00
andreas.larsson fba7b7f6c1 Fixed startHandle type for cbGATT_addService 2017-05-17 23:11:25 +02:00
andreas.larsson 358fa5d564 Minor comment fixes 2017-05-17 23:11:01 +02:00
andreas.larsson 8d4e602313 Moved stream interface to cb_cert_utils.h 2017-05-17 23:10:25 +02:00
andreas.larsson 27f5806c37 Moved stream interface to cb_cert_utils.h 2017-05-17 23:09:42 +02:00
Martin Kojtal 1705d10790 Merge pull request #4272 from jeromecoutant/PR_F429_D11
STM32 NUCLEO boards with Ethernet connector: solve conflict with D11 arduino pin
2017-05-15 16:12:06 +01:00
Martin Kojtal d98da4089a Merge pull request #4231 from jamike/USBH0ST_TARGET_STM_HUB_SUPPORT
USBHOST hub support for TARGET_STM
2017-05-15 16:01:34 +01:00
Dave Desrochers 42f66eec60 stm32f4xx: Revert #3424
According to @betzw, #3424 was put in for I2S with DMA.  However, the latest I2S library now works without this patch.

The changes in DMA HAL for this potentially introduced corner case
scenarios. So it's best to revert the DMA changes.
2017-05-12 10:11:08 -07:00
jeromecoutant 92c55e7f31 Correct compilation issue 2017-05-12 15:38:25 +02:00
Bartosz Szatkowski 14cfe8bac8 Limit ISR stack to 4k on NUCLEO_F429ZI 2017-05-11 18:11:36 -05:00
jeromecoutant 927cba8fa5 STM32F4: remove deprecated macro 2017-05-11 12:38:49 +02:00
jeromecoutant 00163067fb STM32 NUCLEO boards with Ethernet connector: solve conflict with D11 arduino pin
If you are using Ethernet, and not SPI Arduino pins:
=> keep your board with the default configuration

If you are using SPI Arduino pins, and not Ethernet:
=> you should remove the JP6 bridge on the front side of the board

If you need SPI Arduino and Ethernet:
=> you have to patch the NUCLEO board on the back side: set solder bridge SB121 to off, and SB122 to on
=> D11 is no more connected to PA_7 but to PB_5
=> overwrite d11_configuration config value in json file
2017-05-10 11:15:14 +02:00
jeromecoutant 39d981cf70 STM32Cube_FW_F4_V1.16.0
CMSIS v2.5.0 => v2.6.1
STM32F4 HAL v1.5.0 => v1.7.1
2017-05-10 10:00:42 +02:00
Michel Jaouen c581230cd3 USBHOST: TARGET_STM fix in hal for hub support 2017-05-09 16:18:33 +02:00
Anna Bridge a85873c863 Merge pull request #4248 from screamerbg/fix/stm32-usb-support
Fixed STM32 USB Device support for mbed Classic
2017-05-05 13:51:38 +01:00
Anna Bridge 2d22db23db Merge pull request #4169 from 0x6d61726b/master
[NXP LPC176X] flash_api.c implementation
2017-05-04 15:41:17 +01:00
Jimmy Brisson 0c2af26523 Merge pull request #4249 from kegilbert/button-mapping-kg
Add consistent button names across targets
2017-05-03 11:26:36 -05:00
Jimmy Brisson 23c86fc539 Merge pull request #4236 from LMESTM/packed_warning
STM32 Fixed warning related to __packed redefinition
2017-05-02 11:24:38 -05:00
Adam Green 5f13d955ad Fix C++11 build error w/ u-blox EVK-ODIN-W2
When attempting to perform a test build of various mbed-os targets with
GCC configured to build -std=gnu++11, all of the targets built
successfully except for this one. It gave errors like this:
    ../mbed-os/targets/TARGET_STM/TARGET_STM32F4/TARGET_UBLOX_EVK_ODIN_W2/sdk/wifi_emac/wifi_emac_api.cpp: In function 'emac_interface_t* wifi_emac_get_interface()':
    ../mbed-os/targets/TARGET_STM/TARGET_STM32F4/TARGET_UBLOX_EVK_ODIN_W2/sdk/wifi_emac/wifi_emac_api.cpp:331:38: error: use of deleted function 'emac_interface::emac_interface()'
             _intf = new emac_interface_t();
                                          ^
    In file included from ../mbed-os/targets/TARGET_STM/TARGET_STM32F4/TARGET_UBLOX_EVK_ODIN_W2/sdk/wifi_emac/wifi_emac_api.cpp:9:0:
    ../mbed-os/hal/emac_api.h:150:16: note: 'emac_interface::emac_interface()' is implicitly deleted because the default definition would be ill-formed:
     typedef struct emac_interface {
                    ^
    ../mbed-os/hal/emac_api.h:150:16: error: uninitialized const member in 'struct emac_interface'
    ../mbed-os/hal/emac_api.h:151:32: note: 'const emac_interface_ops_t emac_interface::ops' should be initialized
         const emac_interface_ops_t ops;

This commit contains a proposed change which fixes this issue by not
using the new operator to allocate the emac_interface_t structure but
instead using the malloc() function since the construction is being
handled explicitly in the subsequent lines of the
wifi_emac_get_interface() function anyway.

I also added code which only completes the initialization of the _intf
object if its allocation succeeds and just returns NULL otherwise.

I see no deallocation of the _intf object occurring so no change from
delete to free() needed to be made.
2017-04-28 14:09:31 -07:00
Kevin Gilbert 28d1ac5a44 Added mapping to USER_BUTTON-labelled switches
Revert HRM1017 file source deletion

Added in small comment next to additions

Added mapping to BTN-labelled switches

Added mapping to USER_BUTTON-labelled switches

Undo incorrect mapping to SWIO pin in NORDIC target
2017-04-28 11:37:23 -05:00
Mihail Stoyanov 301ce550c9 Fixed STM32 USB Device support by migrating all specific target headers to unsupported features where they belong until USB support is officially introduced in mbed OS 5 2017-04-28 17:23:07 +01:00
Laurent MEUNIER 4eea8fa863 STM32 Fixed warning related to __packed redefinition
Before this patch, many warnings like below were generated
during compilation with ArmCC
[Warning] lwip_ethernet.h@57,0:  #3135-D: attribute does not apply to any entity

This happens here as ``--gnu`` option of ArmCC is being used, which
enables the GNU compiler extensions that the ARM compiler supports.

This is solve by adding a extra check on __CCARM .
2017-04-27 10:32:00 +02:00
Indrek Ardel 16a1693534 Move target files 2017-04-22 20:49:20 +03:00
Indrek Ardel 189083eeb0 Add USB capabilities to NUCLEO-F446RE board 2017-04-22 20:47:55 +03:00
Anna Bridge 6a6455dfc2 Merge pull request #4031 from jeromecoutant/PR_IAR_BIG_HEAP
STM32 increase IAR heap size for big RAM targets
2017-04-20 15:50:21 +01:00
Sam Grove 7bd8c32f2d Merge pull request #4133 from u-blox/c030-debug-8mhz-xtal
U-BLOX_C030: Default XTAL is now 12MHz onboard. Option to use Debug 8MHz
2017-04-19 02:14:51 -05:00
0x6d61726b 029736612b typo corrected
typo corrected
2017-04-11 21:28:11 +02:00
0x6d61726b 8c6dd8949b Update flash_api.c
mbed_critical.h replaced with "platform/mbed_critical.h" (to match template)
typo corrected
2017-04-11 21:24:40 +02:00
0x6d61726b b0451324c4 deprecated include updated
critical.h is deprecated, replaced with "platform/mbed_critical.h"
typo corrected
2017-04-11 21:23:19 +02:00
jeromecoutant 613cc3d6d9 STM32F4 Internal ADC channels rework
Internal ADC pin are now out of PinMap_ADC array.
2017-04-11 10:12:25 +02:00
Sam Grove 2352ee49a4 Revert "STM32F4 Internal ADC channels rework" 2017-04-10 12:08:15 -05:00
Sam Grove 0559aa431c Merge pull request #4126 from jeromecoutant/PR_F4_PIN_LEVEL0
STM32F4 : remove SERIAL_TX and SERIAL_RX from available pins
2017-04-10 11:09:51 -05:00
Sam Grove bfb86a7f51 Merge pull request #4125 from jeromecoutant/PR_F4_USB_CONFIG_FILE
STM32 USB configuration file move
2017-04-10 11:07:59 -05:00
Sam Grove 516f32fc86 Merge pull request #4118 from jeromecoutant/PR_REWORK_INTERNAL_ADC_F4
STM32F4 Internal ADC channels rework
2017-04-10 11:06:12 -05:00
Rob Meades a39ed809c4 U-BLOX_C030: Default XTAL is now 12MHz onboard. Option to use Debug 8MHz
XTAL by using Macro USE_DEBUG_8MHz_XTAL
2017-04-07 12:01:46 +01:00
Sam Grove 7a35a4df51 Merge pull request #3992 from u-blox/c030-dev
Introducing UBLOX_C030 platform.
2017-04-06 11:07:58 -05:00
jeromecoutant d740bde646 STM32F4 : remove SERIAL_TX and SERIAL_RX from available pins
Pins are used for debug printf
2017-04-06 13:58:06 +02:00
jeromecoutant c2636b3269 STM32F4 USB configuration file move 2017-04-06 11:33:49 +02:00
jeromecoutant d599579328 STM32F4 Internal ADC channels rework
Internal ADC pin are now out of PinMap_ADC array.
2017-04-06 10:59:49 +02:00
Rob Meades 7387c09872 Introducing UBLOX_C030 platform. 2017-04-04 16:22:50 +01:00
0xc0170 424fd78161 flash: fix flash algo generated - protect with DEVICE_FLASH 2017-03-26 17:59:40 +01:00
jeromecoutant 4193202f40 STM32 increase IAR heap size for big RAM targets 2017-03-24 14:51:13 +01:00
Sam Grove 3d50554105 Merge pull request #3920 from mazimkhan/master
Heap size adjusted to work for both tls-client and mbed-client
2017-03-22 12:04:01 +00:00
Mohammad Azim Khan 5a9ea2c1e6 Heap size adjusted to work for both tls-client and mbed-client
Targets NUCLEO_F429ZI and UBLOX_EVK_ODIN_W2 have 192K RAM.
Heap size in PR #3871 was increased from 48K to 96K as tls-client
example failed with 48K heap. But this resulted in compilation failures
in mbed-client that requires 71K for global/static data.
Hence this PR reduces heap to 64K that minimum required by tls-client
to work. This also meets mbed-client data segment requirements.
2017-03-15 11:22:24 +00:00
Michel Jaouen fc972f0a98 fix STM USB config after L4 ,F4, F7 file tree changes 2017-03-14 15:57:40 +01:00
Michel Jaouen 873cacfc73 Revert "Revert "Target stm usb config""
This reverts commit ec329be6f2.
2017-03-14 15:57:28 +01:00
Martin Kojtal 45c99e69ca Merge pull request #3879 from bcostm/fix_nucleo-f446ze_adc_pins
NUCLEO_F446ZE: Add missing AnalogIn pins on PF_3, PF_5 and PF_10.
2017-03-09 15:48:10 +00:00
Martin Kojtal fd6fdd5f8c Merge pull request #3795 from LMESTM/fix_pwm_period_calc
Fix pwm period calc
2017-03-09 15:39:00 +00:00
Martin Kojtal f168f6233a Merge pull request #3716 from adustm/disco_f429zi_debug
fix for issue #3715: correction in startup files for ARM and IAR, alignment of system_stm32f429xx.c files
2017-03-06 16:49:19 +00:00
bcostm e70d985fa3 Add AnalogIn pins on PF3, PF5 and PF10.
Don't know why it was missing ?
2017-03-03 16:57:16 +01:00
Mohammad Azim Khan 1f0d73162c Increase HEAP size for UBLOX_EVK_ODIN_W2 and NUCLEO_F429ZI 2017-03-02 14:11:21 +00:00
adustm d69c5edbd4 fix for issue #3715: correction in startup files for ARM and IAR, alignment of system_stm32f429xx.c files 2017-02-28 18:15:06 +01:00
Laurent MEUNIER 747e8e1ea1 STM32: move pwmout device tables to C file
In order to avoid possible multiple definitions errors, move the table
initialization to the C file instead of header file
2017-02-27 17:07:01 +01:00
Christopher Haster aff49d8d1e Renamed files in platform to match source names
critical.h     -> mbed_critical.h
sleep.h        -> mbed_sleep.h
toolchain.h    -> mbed_toolchain.h
rtc_time.h     -> mbed_rtc_time.h
semihost_api.h -> mbed_semihost_api.h
wait_api.h     -> mbed_wait_api.h
2017-02-22 18:17:54 -06:00
Sam Grove a8a31da2e8 Merge pull request #3737 from bcostm/dev_can_factorization
STM32: can_api.c files factorization
2017-02-22 13:36:59 -06:00
Russ Butler 071235415e Add K64F, KL46Z, F429, F439 and odin flash algos
Check in flash algos for the K64F, KL46Z, F429, F439  and Odin board
and enable these features accordingly in targets.json. This
implementation uses flash algo blob that are generated via scripts.
The K64F and KL46Z were generated directly from packs, while the
KL46Z, F429, F439 and odin were generated from code checked into
the FlashAlgo repo.
2017-02-21 14:09:06 -06:00
Sam Grove d14aa74b8c Merge pull request #3798 from c1728p9/fix_st_vtor
Fix vector table bug when using bootloader on ST
2017-02-21 11:02:17 -06:00
Sam Grove b7dce71510 Merge pull request #3665 from LMESTM/dev_stm32_gpio_pins_rework
Dev stm32 gpio pins rework
2017-02-21 10:41:16 -06:00
bcostm 0c4688e7e8 Add support to F4 targets. 2017-02-20 11:19:53 +01:00
Russ Butler 242909cf9a Fix vector table bug when using bootloader on ST
The address of the vector table is hardcoded to the start of flash in
many, if not all, ST targets. This causes a crash in applications that
are using a bootloader.  This patch updates the boards STM32F429xI,
STM32F439xI and Odin so they properly handle updating the VTOR with
a bootloader.
2017-02-17 22:53:04 -06:00
Laurent MEUNIER 1cbb3e18ac STM32: make PWM driver into a common file
The pwmout driver is very similar for each STM32 family.

The only family specific part is defined in pwmout_device.h file.
It mainly contains few specific information:
- The mapping of PWM/TIMERS to APB1 or APB2 so that we can get the clock
- The clock calculation uses the right APB clock, which was sometimes
not the case before and could have lead to errors in case dividers were
enabled on APB clock settings. This case is now covered.
- Inactivation of inverted support on feaw families
2017-02-17 14:11:56 +01:00
Laurent MEUNIER 32ecd00c3a STM32: move pin_lines_desc to c file
Move the const table initialization from the header file
to a new C file to avoid any multiple defined errors.
2017-02-16 19:34:11 +01:00
Laurent MEUNIER 73955b678e STM32: pins: move pin_lines_desc table to const 2017-02-16 19:34:05 +01:00
Laurent MEUNIER 273ac81680 stm32: use default in switch case
As commented during PR review, better use default case.
2017-02-16 19:34:01 +01:00
Laurent MEUNIER 21bc5af3c2 STM32: common pinmap using LL layer to access registers
this first makes pinmap.c a common file

then rework it with several goals:
- avoid gpio / irq / pin management extra dependencies
- improve performances when switching between pin modes

This change is based on LL layer to access to registers level
instead of using HAL higher level API.

The family specific functions are implemented in pin_device.h
of each family. Mostly this is F1 family that is differnt
from other ones.
2017-02-16 18:57:18 +01:00
Laurent MEUNIER 74774f9424 STM32 Make gpio_irq_api.c a common files
This requires the creation of gpio_irq_device.h file, where
family specific EXTI IRQ mapping is defined
2017-02-16 18:55:28 +01:00
Laurent MEUNIER 0e2cc3824b STM32 : Make port_api.c a common file 2017-02-16 18:55:20 +01:00
Russ Butler bcab66c26d Update Odin linker scripts for bootloader
Add MBED_APP_START and MBED_APP_SIZE to the Odin's linker script
so the start and size of an image can be specified. This allows the
ROM to be split into a bootloader region and an application region.
2017-02-10 18:29:01 -06:00
Russ Butler ca8873b160 Update stm32f429 linker scripts for bootloader
Add MBED_APP_START and MBED_APP_SIZE to the stm32f429's linker script
so the start and size of an image can be specified. This allows the
ROM to be split into a bootloader region and an application region.
2017-02-10 18:28:59 -06:00
Sam Grove ec329be6f2 Revert "Target stm usb config" 2017-02-09 15:37:19 -06:00
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
Jaeden Amero 378655f40c uVisor: Standardize available legacy heap and stack
With the RTOS, the STACK_SIZE specified here is unrelated to the stack
size available for the main thread (that runs pre_main). Save memory by
reducing the stack size to a more reasonable amount.

On uVisor, HEAP_SIZE is both a minimum available and maximum available
heap size. The heap can't grow beyond the end of the heap into the
neighboring stack. On all uVisor-supported platforms, guarantee at least
0x6000 bytes of heap space. This increases the portability of uVisor
applications as the memory available for legacy heap allocations is
guaranteed. This helps to avoid out of memory errors on platforms that
were previously guaranteeing less memory.
2017-02-07 16:46:38 +00:00
Michel Jaouen 4d59c8857d TARGET_STM :move usb config file to target dir 2017-02-03 10:32:19 +01:00
adustm a9ef00231c STM32F410xB folder structure update 2017-01-27 15:41:49 +01:00
adustm 00f80b0abe STM32F401xE folder structure update 2017-01-27 15:41:49 +01:00
adustm 2a4ef3f464 STM32F469xI folder structure update 2017-01-27 15:41:49 +01:00
adustm 0883430bba STM32F412xG folder structure update 2017-01-27 15:41:49 +01:00
adustm 5c3bf54928 STM32F407xG folder structure update 2017-01-27 15:41:49 +01:00
adustm 756aaf6dfd STM32F401xC folder structure update 2017-01-27 15:41:49 +01:00
adustm dd7c00f1b6 STM32F429 / F439 folder rework 2017-01-27 15:41:49 +01:00
adustm 62433aba36 STM32F411xE folder structure update 2017-01-27 15:41:49 +01:00
adustm 43f508947d STM32F446xE folder structure update 2017-01-27 15:41:49 +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
Martin Kojtal c14d7154e6 Merge pull request #3397 from AlessandroA/stm32f4_support
Add uVisor support for the DISCO_F429ZI
2017-01-16 16:24:33 +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
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
adustm 3a53a5adc8 DISCO_F429ZI: Add support for uVisor 2017-01-10 13:15:54 +00:00
bcostm 31e6e5c182 Add CAN object structure 2017-01-10 11:15:38 +01:00