Commit Graph

99 Commits (6ee4c7e21963b184b1f93c0bf9375b583dbc9051)

Author SHA1 Message Date
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 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
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
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
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
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
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
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
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
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
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 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
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 36319969f4 STM32F7 USB configuration file move 2017-04-06 11:45:18 +02:00
jeromecoutant 4193202f40 STM32 increase IAR heap size for big RAM targets 2017-03-24 14:51:13 +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 fd6fdd5f8c Merge pull request #3795 from LMESTM/fix_pwm_period_calc
Fix pwm period calc
2017-03-09 15:39:00 +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
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
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
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 caef97c5e6 Add support to F7 targets. 2017-02-20 11:19:53 +01: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
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
Michel Jaouen 4d59c8857d TARGET_STM :move usb config file to target dir 2017-02-03 10:32:19 +01:00
adustm 0e70959e4d Modify forder structure so that targets with the same device can share
files
2017-01-26 14:21:26 +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