Commit Graph

32 Commits (de9f9dd3a248b8e4b06894b3d52d81bdace6b5e1)

Author SHA1 Message Date
jeromecoutant df6a570a41 STM32F2 : json clock source configuration
- default value is the same as before patch
- system_stm32f2xx.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 (target level)
2017-07-19 16:23:41 +02: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
Jimmy Brisson c7d6bbe295 Upcase all assembler file extensions 2017-06-20 14:50:08 -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
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
Bartek Szatkowski b97ffe8fdc CMSIS5: Replace target defined NVIC_Set/GetVector with CMSIS implementation 2017-05-30 18:55:51 +01:00
Laurent MEUNIER 5b510a35a6 F2 CUBE V1.6.0
This PR updates STM32 Cube SDK to
- HAL V1.2.1
- LL V1.2.1
- CMSIS 2.2.0
2017-05-29 13:48:29 +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
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
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
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
Michel Jaouen 873cacfc73 Revert "Revert "Target stm usb config""
This reverts commit ec329be6f2.
2017-03-14 15:57:28 +01:00
Sam Grove ec329be6f2 Revert "Target stm usb config" 2017-02-09 15:37:19 -06:00
Michel Jaouen 4d59c8857d TARGET_STM :move usb config file to target dir 2017-02-03 10:32:19 +01:00
Sam Grove def8b32121 Merge pull request #3181 from ohagendorf/nucleo_f207_peripheralpinsextension
NUCLEO_F207ZG extending PeripheralPins.c: all available alternate functions can be used now
2017-02-02 10:38:37 -06: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
bcostm 896293d5be Replace TIM_MST_GET_PCLK_FREQ macro with TIM_MST_PCLK macro 2016-11-14 09:31:14 +01:00
bcostm 0524811c75 STM32xx - Remove hal_tick.c files and update hal_tick.h with new macro 2016-11-14 09:31:14 +01:00
Olaf Hagendorf 49fcc3b627 NUCLEO_F207ZG extending PeripheralPins.c: all available alternate functions can be used now
Through some minor extensions it is now possible to use all available alternate functions of a specific gpio pin. These alternatives exist up to now only as commented lines in PeripheralPins.c.
An API change is not necessary for this new functionality, only several pin definitions.

The new definitions now looks like:

    {PA_0,            ADC_1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 0, 0)},  // ADC1_IN0
    {PA_0_ALT0,  ADC_2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 0, 0)},  // ADC2_IN0 // choice: PA_0 with ADC_1
    {PA_0_ALT1,  ADC_3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 0, 0)},  // ADC3_IN0 // choice: PA_0 with ADC_1

PA_0, PA_0_ALT0 or PA_0_ALT1 has to be used as pin names for the usage of the three possible ADC blocks (ADC1, ADC2, ADC3) connected to the pin (PA_0).
2016-11-01 18:04:55 +01:00
Michel Jaouen 759837aff4 STM32F207: GCC_ARM remove zero bss, in startup.
zero bss is done in libc init after call to _start.
2016-10-19 14:54:41 +02:00
Sam Grove 864ff7754b Merge pull request #2924 from bcostm/adcintch_F2
STM32F2xx - Add support of ADC internal channels (temperature, VRef, VBat)
2016-10-07 11:33:11 -05:00
bcostm dfc2a2d097 Add VBat channel and manage better the internal channels configuration 2016-10-05 14:58:01 +02:00
bcostm 007aac86ca Add channel 17 for VRef 2016-10-05 11:02:11 +02:00
bcostm ad431dc613 STM32F2xx - Add support of ADC internal channels (temperature) 2016-10-05 10:25:03 +02:00
Christopher Haster 26ced98734 restructure - Restructured cmsis directory
targets/cmsis -> cmsis
targets/cmsis/TARGET_* -> targets/TARGET_*/device
targets/cmsis/TARGET_*/mbed_rtx.h -> targets/TARGET_*/mbed_rtx.h
2016-10-04 17:51:44 -05:00
Christopher Haster 0bad622a16 restructure - Moved targets out to top level
hal/targets -> targets
hal/targets.json -> targets/targets.json
2016-09-30 19:18:09 -05:00