Commit Graph

581 Commits (6ee4c7e21963b184b1f93c0bf9375b583dbc9051)

Author SHA1 Message Date
arostm bffe629563 DISCO_L072CZ_LRWAN1: Clock configuration => 30MHz to 32MHz 2017-05-02 12:53:25 +02:00
arostm 29d5818837 DISCO_L072CZ_LRWAN1: PreipheralPins.c corrections 2017-05-02 12:53:25 +02:00
arostm 97605ddd5a DISCO_L072CZ_LRWAN1: Change LED PIN definition 2017-05-02 12:53:25 +02:00
Alexis ROCHE 93bce7364c DISCO_L072CZ_LRWAN1: typo correction 2017-05-02 12:53:25 +02:00
Alexis ROCHE a59c4ff8a7 DISCO_L072CZ_LRWAN1: add LRWAN1 to the name 2017-05-02 12:53:25 +02:00
Alexis ROCHE 19109d9404 DISCO_L072CZ: Modifications and verifications to build 2017-05-02 11:50:24 +02:00
Alexis ROCHE 7529b8300b DISCO_L072CZ: Add all files (pinout, startup, etc...) 2017-05-02 11:46:40 +02: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
Bradley Scott 7f12ad2a8c STM32F3: Correct handling of USB ISTR and endpoint registers
The USB ISTR register consists of a mix of bits that are
write-zero-to-clear and read only bits.  As such, to clear a bit in
the ISTR, you should simply write the bitwise-NOT of the bit to clear.
Previously, the __HAL_PCD_CLEAR_FLAG() macro would do a bitwise-AND
with the ISTR register contents to clear a bit, but this could result
in another bit being inadvertently cleared if it is set by hardware
between the read and the write of the ISTR register.

Similarly, the USB endpoint registers have two bits that are
write-zero-to-clear, USB_EP_CTR_RX and USB_EP_CTR_TX, but the
PCD_CLEAR_RX_EP_CTR() and PCD_CLEAR_TX_EP_CTR() macros wrote back the
last read value for one of these bits when clearing the other bit.
This could result in inadvertent clearing of one of these bits if it
were set by the hardware between the read and the write.  These macros
have now both been adjusted to always write one to the bit not being
cleared to prevent inadvertent clears.
2017-04-26 10:23:02 -04: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 1c77628149 Merge pull request #4153 from jeromecoutant/PR_AF2_LEVEL0
STM32F2: Internal ADC channels rework
2017-04-21 14:11:44 +01:00
Anna Bridge e3f457b4d5 Merge pull request #4154 from jeromecoutant/PR_F7_LEVEL0
STM32F7 Internal ADC channels rework
2017-04-20 16:50:34 +01:00
Anna Bridge 743ab7eb59 Merge pull request #4176 from jeromecoutant/PR_L4_LEVEL0
STM32L4 Internal ADC channels rework
2017-04-20 16:39:38 +01: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
jeromecoutant 03972ebb0c STM32L4 Internal ADC channels rework
Internal ADC pins are now out of PinMap_ADC array
2017-04-12 13:14:58 +02: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 d1fa95184f STM32F7 Internal ADC channels rework
Internal ADC pin are now out of PinMap_ADC array
2017-04-11 12:56:13 +02:00
jeromecoutant 43ab8812d7 STM32F2 Internal ADC channels rework
Internal ADC pin are now out of PinMap_ADC array
2017-04-11 11:16:46 +02:00
jeromecoutant 7da6960cfe NUCLEO_F207ZG: I2C_3 is not available 2017-04-11 10:41:57 +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
Sam Grove f3499f5014 Merge pull request #4109 from jeromecoutant/PR_L476RG
NUCLEO_L476RG : minor serial pin update
2017-04-06 10:56:50 -05:00
Sam Grove 58f4b4103f Merge pull request #4030 from jeromecoutant/PR_IAR_SMALL_HEAP
[STM32L0] reduce IAR heap and stack size for small targets
2017-04-06 08:49:02 -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 5303211056 STM32F3 USB configuration file move 2017-04-06 11:53:06 +02:00
jeromecoutant 3bbbabf202 STM32L4 USB configuration file move 2017-04-06 11:51:26 +02:00
jeromecoutant 36319969f4 STM32F7 USB configuration file move 2017-04-06 11:45:18 +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
jeromecoutant 0c2720bc19 NUCLEO_L476RG : minor serial pin update
SERIAL_TX and SERIAL_RX pins used for debug printf cannot be set as available
2017-04-04 14:38:17 +02:00
bcostm 3302a372ef DISCO_L053C8: Typo corrections 2017-03-30 14:55:18 +02:00
bcostm 2212b34bd0 DISCO_L053C8: add USBHAL_STM files 2017-03-30 14:50:13 +02:00
bcostm 1321dc8e71 DISCO_L053C8: enable HSI48 clock for USB 2017-03-30 14:50:13 +02:00
Sam Grove e3c0ac6c17 Merge pull request #4020 from jeromecoutant/PR_L011
NUCLEO_L011K4 remove unsupported tool chain files
2017-03-29 22:50:35 +01:00
Sam Grove d467f7d4bc Merge pull request #4012 from monkiineko/master
STM32: Correct I2C master error handling
2017-03-29 22:49:15 +01:00
0xc0170 424fd78161 flash: fix flash algo generated - protect with DEVICE_FLASH 2017-03-26 17:59:40 +01:00
Bradley Scott 2eb4048bbe STM32: Correct I2C master error handling
If I2C slave support is included, then the I2C error handler would
always reset the I2C address, resulting in incorrectly changing the
I2C state to listen for a controller configured as I2C master.  This
change conditionalizes the address setting to only occur if the
controller was in slave mode when the error occurred.
2017-03-24 10:16:34 -04:00
jeromecoutant 4193202f40 STM32 increase IAR heap size for big RAM targets 2017-03-24 14:51:13 +01:00
jeromecoutant d680c60fe9 [STM32L0] reduce IAR heap and stack size for small targets 2017-03-24 14:32:13 +01:00
jeromecoutant 2f8d54ab07 NUCLEO_L011K4 remove unsupported tool chain files 2017-03-23 17:56:45 +01:00
Sam Grove 75f6f2db30 Merge pull request #3969 from bcostm/fix_nucleo-f302r8_can_pins
NUCLEO_F302R8: Add missing PB_8/PB_9 CAN pins
2017-03-22 12:08:16 +00:00
Sam Grove 2ec6ee4a24 Merge pull request #3951 from jeromecoutant/PR_F303ZE
[NUCLEO_F303ZE] Correct ARDUINO pin
2017-03-22 12:06:51 +00: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
bcostm 7cc904bb19 NUCLEO_F302R8: Add missing PB_8/PB_9 CAN pins 2017-03-20 10:32:06 +01:00
jeromecoutant 2987340870 [NUCLEO_F303ZE] Correct ARDUINO pin 2017-03-16 16:40:30 +01: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 1a20b4f100 Fix after code review 2017-03-14 15:57:41 +01: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
Anna Bridge 213626d83a Merge pull request #3893 from jeromecoutant/PULL_REQUEST_CUBE_UPDATE_F7_V1.6.0
[STM32F7] Update STM32 Cube version v1.6.0
2017-03-14 14:40:38 +00:00
Sam Grove 88a4baa2ad Merge pull request #3902 from mazimkhan/master
Fix heap and stack size for NUCLEO_F746ZG
2017-03-09 16:51:40 -06:00
Mohammad Azim Khan bb197b29f3 Fix heap size for NUCLEO_F746ZG on IAR 2017-03-09 16:51:24 +00: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 68dc25331a Merge pull request #3843 from bcostm/fix_stm32l4_apb2_80MHz
STM32L476xG: set APB2 clock to 80MHz (instead of 40MHz)
2017-03-09 15:44:08 +00:00
Simon Vogl 1c4e0d7dcb can_write(): return error code when no tx mailboxes are available. (#3829) 2017-03-09 15:42:00 +00:00
Martin Kojtal 6aa62c1956 Merge pull request #3828 from jeromecoutant/PR_CAN_TYPE
STM32 CAN API: correct format and type
2017-03-09 15:40:01 +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
Laurent MEUNIER 400b89eeda Fix XDOT compilation error
Typo with misplaced closing parenthesis leads to compilation error,
which is fixed with this patch
2017-03-07 17:22:25 +01:00
Martin Kojtal b2726470f6 Merge pull request #3880 from adustm/fix_can2_only
DISCO_F469NI: allow the use of CAN2 instance when CAN1 is not activated
2017-03-06 16:57:57 +00:00
Martin Kojtal f39deb518c Merge pull request #3860 from MultiTechSystems/xdot-gpio-fix
Define GPIO_IP_WITHOUT_BRR for xDot platform
2017-03-06 16:56:29 +00:00
Martin Kojtal e6b8ed2754 Merge pull request #3850 from LMESTM/fix_spi_warn
STM32: change spi error to debug warning
2017-03-06 16:55:58 +00:00
Martin Kojtal aa6a71bd0c Merge pull request #3844 from bcostm/fix_comments_gpio_object
STM32 GPIO: Typo correction. Update comment (GPIO_IP_WITHOUT_BRR)
2017-03-06 16:54:39 +00:00
Martin Kojtal ede2a11be4 Merge pull request #3840 from LMESTM/fix_smt32_gpio_default_speed
STM32: gpio SPEED - always set High Speed by default
2017-03-06 16:54:08 +00:00
Martin Kojtal 8fb95a6507 Merge pull request #3780 from pmancele/master
STM32L4 : Fix GPIO G port compatibility
2017-03-06 16:51:03 +00:00
Martin Kojtal 750ac5152f Merge pull request #3741 from jeromecoutant/PR_TICK32
STM32 remove warning in hal_tick_32b.c file
2017-03-06 16:49:52 +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
jeromecoutant b77533dd51 STM32Cube_FW_F7_V1.6.0
CMSIS v1.1.2 => v1.2.0
    STM32F7 HAL v1.1.2 => v1.2.0
2017-03-06 16:48:23 +01:00
bcostm ae6899b448 STM32L4xx: set APB2 clock to 80MHz (instead of 40MHz) 2017-03-06 13:34:01 +01:00
jeromecoutant 67a75d96c6 STM32 CAN API: correct format and type
astyle done
2017-03-06 11:34:20 +01:00
adustm 18c1618637 DISCO_F469NI: allow the use of CAN2 instance when CAN1 is not activated 2017-03-03 17:05:28 +01: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
Mike Fiore 2613380854 [XDOT_L151CC] Define GPIO_IP_WITHOUT_BRR for xDot platform. Resolves #3823. 2017-03-01 12:53:31 -06: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 00bfa3bf4a STM32: change spi error to debug warning
In case the selected frequency is higher than the requested one, it is
better to send a debug warning rather than an blocking error.

In case of such warning, user may need to redefine the clock tree setting
at higher level (reducing peripheral's input clocks during init phase).
2017-02-28 17:00:29 +01:00
Laurent MEUNIER 3842f6ea0a STM32: fix formatting
Use the recommended style
if (condition) {
  do();
} else {
  do_else();
}
2017-02-27 17:07:05 +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
bcostm d03f96741e Typo: update comment (GPIO_IP_WITHOUT_BRR) 2017-02-27 16:32:44 +01:00
Laurent MEUNIER 8e5d2eb1dc STM32: pwm period and prescaler calculation
Correct the while loop limit and add a safe guard to avoid infinite loop.
2017-02-27 13:47:34 +01:00
Laurent MEUNIER 453b248bf4 STM32: gpio SPEED - always set High Speed by default
Up to now, speed was set for outputs and alternate, but this is
also valid for input configuration.

By default, let's configure high speed.

This is done firts, because speed for some families like F1 is mixed
with Input/Output mode settings, so can be later over-ridden if needed.
2017-02-27 11:11:02 +01:00
Sam Grove b6fe5abb10 Merge pull request #3743 from jeromecoutant/PR_RTC_UPDATE
STM32 RTC api minor update
2017-02-23 10:19:11 -06:00
Pierre-Marie Ancele 48c63cacdb Use #if defined TARGET_STM32L4 2017-02-23 09:32:12 +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
Sam Grove 5c28715fbd Merge pull request #3742 from jeromecoutant/PR_SLEEP
STM32 : minor update in sleep HAL file
2017-02-22 13:35:01 -06:00
Pierre-Marie Ancele 248dbaabe2 Fix GPIOG usage of STM32L4 by activating VDDIO2 power supply 2017-02-22 16:44:28 +01:00
jeromecoutant 3a83fc8a21 STM32 RTC api minor update
Add more detailed information in comments
Issue with sunday corrected
Issue with wrong rtc_isenabled status corrected
2017-02-22 08:50:58 +01: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 4b850e268a Merge pull request #3759 from LMESTM/fix_spi_freq
STM32: spi_frequency table index fix
2017-02-21 10:47:17 -06:00
Sam Grove 3c3e04f6d2 Merge pull request #3739 from jeromecoutant/PR_F7_HSE
STM32F7 : remove multiple HSE_VALUE define value
2017-02-21 10:47:00 -06:00
jeromecoutant 053072c2dc STM32 : set back US counter after deepsleep 2017-02-21 17:46:15 +01:00
jeromecoutant e8519416c1 STM32 sleep.c remove compilation warning 2017-02-21 17:46:11 +01: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
jeromecoutant 0259c1a2a7 STM32 remove warning in hal_tick_32b.c file 2017-02-21 16:43:20 +01:00
bcostm 30565cbe5e Revert "Coding style"
This reverts commit 32b801b40c.
2017-02-20 11:29:30 +01:00
bcostm 02653add15 Remove can_api.c file present in TARGET_STM32F2 folder (no more needed now) 2017-02-20 11:19:53 +01:00
bcostm 32b801b40c Coding style 2017-02-20 11:19:53 +01:00
bcostm eec6e10138 Add a #else to cover default STM32 devices for the IRQHandler functions.
Change also the coding style for the "{".
2017-02-20 11:19:53 +01:00
bcostm 8568b40887 F103 devices: Set CAN_RD pins in Input mode instead of A/F Push-Pull
Now MBED_A27/A28 tests are OK again.
Problem seen also by @mgiaco and discussed in PR 2988.
2017-02-20 11:19:53 +01:00
bcostm f527ff95ab Add support to L4 targets. 2017-02-20 11:19:53 +01:00
bcostm caef97c5e6 Add support to F7 targets. 2017-02-20 11:19:53 +01:00
bcostm 0c4688e7e8 Add support to F4 targets. 2017-02-20 11:19:53 +01:00
bcostm b6b21672e8 Add F3 differences. 2017-02-20 11:19:53 +01:00
bcostm 0fd596e0ab Add can_device.h for F2 targets 2017-02-20 11:19:53 +01:00
bcostm 1f47619e82 Add F2 differences. Mainly add support for CAN2 instance. 2017-02-20 11:19:53 +01:00
bcostm 5fa0c4e172 Remove can_api.c file for F1 targets 2017-02-20 11:19:53 +01:00
bcostm 311648ab6c Add F1 differences.
Create can_device.h files to define specific code for the STM32 family
2017-02-20 11:19:53 +01:00
bcostm 45c7e0dca9 Initial commit: copy can_api.c from F0 target 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
Sam Grove 825f9a4bc9 Merge pull request #3749 from c1728p9/linker_script_updates
Linker script updates
2017-02-17 09:13:16 -06:00
Sam Grove 99dda9a60b Merge pull request #3740 from jeromecoutant/PR_L4_RTC
STM32L4 HAL update for RTC Wake Up Timer
2017-02-17 09:12:01 -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 293b9fc297 STM32 L1: Define PWM Channels in PeripheralsPins.c
As done for other families, let's define the PWM channel in the PWM
pins table definition rather than driver.
2017-02-17 14:11:41 +01:00
Laurent MEUNIER d7902e53c2 Style consistency
Correcting the style format errors.
Also updating the copyright year.
2017-02-16 19:34:13 +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 18abfdb604 STM32: gpio: style consistency 2017-02-16 19:34:08 +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 5317ea5bb6 STM32: I2C - pin mode
The default pin mode shall be set as part of the pinamp_pinout, and
as defined in tables of PeripheralPins.c, but this is currently
over-written by a call to pin_mode(pin, PullNone); from
mbed_pinmap_common.c, so we need a set the mode again here, including
OpenDrain config as needed for I2C.
2017-02-16 18:57:34 +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 dce2ca75d8 STM32: gpio few performance improvements
Those are minor changes to increase performance of widely used
GPIO functions.
2017-02-16 18:55:56 +01:00
Laurent MEUNIER 3517eb108e STM32: Change Set_GPIO_Clock return type
Directly return a GPIO_TypeDef pointer to avoid extra casts.
Also move it to GPIO file.
2017-02-16 18:55:44 +01:00
Laurent MEUNIER 6bd488db4d STM32: gpio irq: Use LL registers access
Instead of using HAL_GPIO_Init / Deinit which makes a lot of registers
being written and re-written, and which creates extra gpio / pin / irq
dependencies, we directly set the IRQ related registers thanks for the
STM32 LL layers which provides APIs to modify registers.
2017-02-16 18:55:36 +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
Sam Grove e22f26ffa4 Merge pull request #3663 from helmut64/STM32L4_deepsleep_fix
Fixed a problem that the STOP2 was falling back to STOP1
2017-02-13 10:12:30 -06:00
Laurent MEUNIER a8f6970a9d STM32: spi_frequency table index fix
In case of prescaler_rank was 0, a -1 index was being used,
which resulted in initialization of the Init.BaudRatePrescaler with
random values.

Now let's better check index and avoid -1 operation, so that prescaler_rank
can be only from 0 to "last_index".
2017-02-13 16:17:33 +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
jeromecoutant 2433b1ad95 STM32L4 HAL update for RTC Wake Up Timer 2017-02-10 16:26:10 +01:00
jeromecoutant 565ad777b0 STM32F7 : remove multiple HSE_VALUE define value 2017-02-10 13:06:41 +01: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
Sam Grove e0fb062ae8 Merge pull request #3649 from adustm/STM32F7_folderstruct
[STM32F7] Modify folder structure
2017-02-09 09:30:28 -06:00
Helmut Tschemernjak 10bb94a365 Fixed code style violation needs '{' 2017-02-07 22:24:20 +01: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