Commit Graph

558 Commits (1da259af3b78a318023271169bb2bef1162b7ba0)

Author SHA1 Message Date
Vincenzo Frascino 4f5b191e74 [BEETLE] Fix US_Ticker read
MBED OS requires an us_ticker_read function that returns a 32bit
value in microseconds. This can not be represented directly on
the Beetle Timer Load register.

max_us_on_reg = (0xFFFFFFFF ticks)/DIVIDER_US

This patch introduces an intermediate layer that counts the timer wraps
around and returns the correct value of us to the MBED library.

Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
2016-07-21 10:38:20 +01:00
Vincenzo Frascino 1b364a1e52 [BEETLE] Fix Lp_Ticker read
MBED OS requires an lp_ticker_read function that returns a 32bit
value in microseconds. This can not be represented directly on
the Beetle Dual Timer Load register.

max_us_on_reg = (0xFFFFFFFF ticks)/DIVIDER_US

This patch introduces an intermediate layer that counts the timer wraps
around and returns the correct value of us to the MBED library.

Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
2016-07-21 10:38:20 +01:00
Christopher Haster e806b89df6 Fixed handling of const objects in Callback class
Before, the following results in a compilation error:

    const struct Object *obj;
    void obj_doit(const Object *obj);

    Callback<void()> cb(obj, obj_doit);

This is especially noticable when migrating from the old Thread
constructor, which previously _required_ const.

Short term fix for all cv qualifiers through a C cast:
void *_obj = (void*)obj;
2016-07-20 19:20:32 -05:00
Vincent Coubard a81b8b13dd Set correct compiler support for NRF51 and NRF52 based targets. 2016-07-21 00:10:52 +01:00
Vincent Coubard 406ac8f5f4 Makes room for old NRF51 implementation.
the unified target for NRF51 has been renamed MCU_NRF51_UNIFIED and
hal implementation has been moved from TARGET_MCU_NRF51822 to
TARGET_MCU_NRF51822_UNIFIED.

In the process, the only real taget kept for NRF51 based targets is
NRF51_DK.

It is too risky at this stage to switch NRF51822 (16K target) to the new
softdevice. The overhead of the RTOS is already too huge.
2016-07-21 00:02:44 +01:00
Neil Thiessen 22598341cd [LPC15XX] Modified μs_ticker to use critical API
Replaced __disable_irq() and __enable_irq() with core_util_critical_section_enter() and core_util_critical_section_exit().
2016-07-20 08:55:14 -06:00
Vincent Coubard c3ddc9aaca Merge pull request #25 from pan-/armcc_support
Armcc support
2016-07-20 15:43:44 +01:00
Vincent Coubard 847d0f6764 Remove app_timer and dependencies instead of adding a dependency to RTX. 2016-07-20 15:39:44 +01:00
Jarek Zgoda c005781063 [BLUEPILL] fix interrupt handler 2016-07-20 11:06:58 +02:00
Vincent Coubard 0bb2d3376f Merge pull request #24 from nvlsianpu/nrf5x_lf_clk_config
NRF5x LF clk config over mbed config system
2016-07-20 09:01:26 +01:00
Vincent Coubard ea0ae68c60 Update memory layout for nrf51 targets. 2016-07-19 23:39:52 +01:00
Vincent Coubard 6d214eb76a ARM cc has difficulties to link binary with undefined symbols, even if
those symbols are not used.

bootloader and log are not needed in our case, just remove files causing
troubles.

define app_timer symbols with the RTX implementation.
2016-07-19 22:40:18 +01:00
Sam Grove d89c3c18f9 Merge pull request #2158 from c1728p9/singleton_support
Singleton support
2016-07-19 16:34:20 -05:00
Vincent Coubard 3368fa8b0d Merge pull request #22 from nvlsianpu/anpu_arm_cc_sandbox
fix nRF5x IAR build, files for keil build
2016-07-19 22:21:52 +01:00
Andrzej Puzdrowski fa5937fce8 Add configuration of LF clk source in targer.json for targets MCU_NRF51 & MCU_NRF52
Fix typo
2016-07-19 20:29:38 +02:00
Neil Thiessen d5f09859de [LPC15XX] Fixed µs_ticker implementation for GCC
Modified SCT3 match register critical section for compatibility with GCC toolchain.
2016-07-19 11:41:44 -06:00
neilt6 9f6b2c47ca [LPC15XX] Fixed µs_ticker implementation
Re-wrote µs_ticker implementation to use SCT3 instead of RIT in order to
fix a serious rollover bug at 1:11:34.
2016-07-19 10:24:02 -06:00
Erwan GOURIOU f7120413ec [STM32L4xx] Sleep API factorization
In order to enable sleep API factorization, HAL_Suspend/ResumeTick
functions have been implemented in hal_tick.c for each platform.
2016-07-19 16:36:33 +02:00
Erwan GOURIOU 75bbc0a3e1 [STM32L1xx] Sleep API factorization
In order to enable sleep API factorization, HAL_Suspend/ResumeTick
functions have been implemented in hal_tick.c for each platform.
2016-07-19 16:36:27 +02:00
Erwan GOURIOU 34c37c8b94 [STM32L0xx] Sleep API factorization
In order to enable sleep API factorization, HAL_Suspend/ResumeTick
functions have been implemented in hal_tick.c for each platform.
2016-07-19 15:28:21 +02:00
Erwan GOURIOU 8f6090d002 [STM32F7xx] Sleep API factorization
In order to enable sleep API factorization, HAL_Suspend/ResumeTick
functions have been implemented in hal_tick.c for each platform.
2016-07-19 15:28:19 +02:00
Erwan GOURIOU 3ab56972bc [STM32F4xx] Sleep API factorization
In order to enable sleep API factorization, HAL_Suspend/ResumeTick
functions have been implemented in hal_tick.c for each platform.
2016-07-19 15:28:16 +02:00
Erwan GOURIOU 2afde47b46 [STM32F3xx] Sleep API factorization
In order to enable sleep API factorization, HAL_Suspend/ResumeTick
functions have been implemented in hal_tick.c for each platform.
2016-07-19 15:28:08 +02:00
Erwan GOURIOU a227a9438c [STM32F1xx] Sleep API factorization
In order to enable sleep API factorization, HAL_Suspend/ResumeTick
functions have been implemented in hal_tick.c for each platform.
2016-07-19 15:13:49 +02:00
Erwan GOURIOU c1e0663922 [STM32F0xx] Sleep API factorization
In order to enable sleep API factorization, HAL_Suspend/ResumeTick
functions have been implemented in hal_tick.c for each platform.
2016-07-19 15:13:32 +02:00
0xc0170 c8fc07928a Merge branch 'fix_int_handler' of https://github.com/svastm/mbed into svastm-fix_int_handler
Conflicts:
	hal/targets/hal/TARGET_STM/TARGET_STM32F0/pwmout_api.c
	hal/targets/hal/TARGET_STM/TARGET_STM32F7/pwmout_api.c
2016-07-19 14:10:25 +01:00
Andrzej Puzdrowski be4687540c startup configuraton of LF oscilator over mbed configuration system. 2016-07-19 10:50:10 +02:00
Andrzej Puzdrowski d99843745b lf clock config prove of concept 2016-07-19 10:49:53 +02:00
0xc0170 edf015ad92 Merge branch 'master' into release
Conflicts:
	tools/export/uvision4.py
	tools/export/uvision5.py
2016-07-19 08:44:34 +01:00
Christopher Haster ad07ab8174 Marked FunctionPointer and friends as deprecated
FunctionPointer/FunctionPointerArg0/FunctionPointerArg1 has been
replaced by the more flexible Callback template class.

For the motivation behind adopting the Callback class:
https://github.com/mbedmicro/mbed/pull/1783
2016-07-18 16:22:21 -05:00
Russ Butler 348b32c3c6 Create singleton class and update code to use it
Create the wrapper class SingletonPtr.  This provides a safe way to
declare and use singletons.  This class allows both the lazy
initialization of a singleton, and allows the singleton to be
garbage collected by the linker if it is never referenced.

This patch also updates the HAL to use SingletonPtr when declaring
singleton mutexes.
2016-07-15 14:37:43 -05:00
Martin Kojtal 38ae4f9289 Merge pull request #2128 from LMESTM/fix_F4_serial_it_issue2119
[STM32] Serial interrupt TC vs. TXE
2016-07-15 15:21:49 +01:00
Martin Kojtal 1201f4a09c Merge pull request #2127 from svastm/fix_rtc_min_year
[STM32XX] Fix RTC minimum date
2016-07-15 15:03:14 +01:00
Andrzej Puzdrowski 62543f1337 remove unrichable return statment 2016-07-15 13:16:01 +02:00
Andrzej Puzdrowski d433b55763 changes from CR of IAR fixes for nRF5x port 2016-07-15 13:10:20 +02:00
Martin Kojtal ee2f9174ad Merge pull request #2097 from jamike/STM32F3
Target STM32F3
2016-07-15 11:05:02 +01:00
Martin Kojtal 829289bdd9 Merge pull request #2129 from jamike/Fix_for_#2124
Fix issue #2124: IAR no rtos
2016-07-15 10:48:53 +01:00
Martin Kojtal 46057c5d70 Merge pull request #2103 from LMESTM/fix_pwmout_period
Fix pwmout period
2016-07-15 10:26:08 +01:00
Andrzej Puzdrowski 7eaef66ba2 rename scater file for nRF52 ARM_5 2016-07-14 17:09:30 +02:00
Andrzej Puzdrowski 5d7c5cf9c1 Corect nRF51 IAR scatre files in order to be compatible with softdevice 130 2.0.0 2016-07-14 17:03:06 +02:00
Andrzej Puzdrowski 7861cefb05 Fix: IAR build for NRF5x produce proper combined intel-hex file. 2016-07-14 16:37:02 +02:00
Martin Kojtal edd539b499 Merge pull request #2123 from jamike/remove_uARM_sys_cpp
[TARGET_STM] : remove sys.cpp not used in TOOLCHAIN_ARM_MICRO
2016-07-14 10:08:41 +01:00
Andrzej Puzdrowski 3c8c82b06c make posible IAR compilation
IAR dosen't support "flexible array member" in c++ compilation
pm_peer_data_local_gatt_db_t::data[] -> pm_peer_data_local_gatt_db_t::data[1]
2016-07-13 13:16:36 +02:00
Vincent Coubard 9745eff74c Merge commit 'ce830296d0297a8da543c24134bf859710fd7698' into epr_integration
Merge the EPR tag and the nordic branch together.
2016-07-13 12:06:02 +01:00
jeromecoutant 616494bcc1 Minor updates after ST internal review 2016-07-13 11:35:27 +02:00
jeromecoutant d32c215f4e Add new NUCLEO_F207ZG (CMSIS)
source: STM32Cube_FW_F2_V1.4.0
- CMSIS v2.1.1 => v2.1.2
- HAL   v1.1.2 => v1.1.3
2016-07-12 16:40:30 +02:00
jeromecoutant 4f579ecf7f Add new NUCLEO_F207ZG (HAL) 2016-07-12 16:38:23 +02:00
jeromecoutant 7ab31e8524 Add new STM32F2 family (HAL) 2016-07-12 16:38:19 +02:00
jeromecoutant cc729709fb Update targets.json to add NUCLEO_F207ZG 2016-07-12 16:38:02 +02:00
Andrzej Puzdrowski 5d5ea9a050 CR changes for PWM of nRF52 part 3. 2016-07-12 15:30:32 +02:00
Andrzej Puzdrowski 3c93283dc0 CR changes for PWm nRF52 part 2. 2016-07-12 15:23:25 +02:00
Andrzej Puzdrowski 3519122760 cCR changes for nRF52 PwmOut implementation. 2016-07-12 15:12:09 +02:00
Bogdan Marinescu 6f86064ece Merge pull request #2140 from mbedmicro/k64f_flow_control
Added flow control for K64F
2016-07-12 13:07:11 +03:00
Bogdan Marinescu 089b67cc79 Merge pull request #2144 from geky/stdio-baud-config
Add config option for stdio baud rate
2016-07-12 13:06:29 +03:00
Andrzej Puzdrowski 9f337875bb PWM for nRF52 full debuged. 2016-07-12 11:47:34 +02:00
Andrzej Puzdrowski 7798651719 nRF52 PwmOut implementation debug 2016-07-12 11:44:42 +02:00
Andrzej Puzdrowski 07ce12fcc5 nrf52 PwmOut in progress. 2016-07-12 11:44:42 +02:00
Martin Kojtal 4b441c9e9e Merge pull request #2121 from rgrover/develop
introduce a context structure to encompass global state in the K64F Storage driver
2016-07-12 10:22:36 +01:00
Hasnain Virk a4475a0cf8 Use correct mask for CTS flow control 2016-07-12 11:31:58 +03:00
Russ Butler 0343ad2674 KSDK2 - set ADC mux before taking measurement
Set the channel mux before taking a reading rather than on
initialization.  This allows ADC pins on both mux A and B to be used in
the same application.
2016-07-11 20:34:58 -05:00
Christopher Haster 126de5b07a Added config option for stdio baud rate 2016-07-11 18:42:44 -05:00
Bogdan Marinescu 998af81092 Added flow control for K64F
This commit adds hardware flow control capabilities for the K64F family
of MCUs. This is a backport of these commits:

9bfcfd0572
77042cc945

with a few changes:

- since the current version of KSDK doesn't seem to have APIs for
  manipulating the flow control settings, we change the peripheral
  registers directly.
- updated pin maps for RTS/CTS in accordance to the K64F datasheet.
2016-07-11 16:41:07 +03:00
jeromecoutant 72f4aa5e2b Add new STMF2 family (CMSIS)
source: STM32Cube_FW_F2_V1.4.0
- CMSIS v2.1.1 => v2.1.2
- HAL   v1.1.2 => v1.1.3
2016-07-11 15:24:02 +02:00
Martin Kojtal 967b45a3ec Merge pull request #2029 from adustm/b_fix_MBED_16_STM32F4
Fix #2027 Add timeinfo.tm_isdst = -1 to pass MBED_16 test with IAR.
2016-07-11 11:07:40 +01:00
Bogdan Marinescu 2d41d9b013 Merge pull request #2138 from ohagendorf/progen_correction
[target.json - progen] changing a wrong config
2016-07-11 12:54:22 +03:00
0xc0170 359d33cc16 Revert part of the FPU change
We keep target.core names, it defines if CPU contains FPU, as it's common - Cortex M4F/M7F.
We add Cortex M7FD for double precision FPU.
2016-07-11 10:39:23 +01:00
Martin Kojtal 8188684cab Merge pull request #2136 from lrks/fix_i2c_slave_addr_ksdk2
[KSDK2_MCUS] Fix I2C slave address
2016-07-11 09:50:57 +01:00
ohagendorf 7388b446d4 [target.json - progen] changing a wrong config
ARCH_MAX has a STM32F407 mcu
2016-07-10 20:58:35 +02:00
Sam Grove 254ae0e109 Remove macro for operators. Enable these as default behavior 2016-07-10 13:47:13 -05:00
lrks 4b77054940 Fix I2C slave address
Remove the needless bit shift for I2C slave address.
2016-07-10 10:34:13 +09:00
Christopher Haster 98d55e71d8 Moved core_util_atomic_*_ptr functions out of cortex switch 2016-07-09 11:14:16 -05:00
Christopher Haster 70013d03b6 Fixed casts around calls to atomic u32 functions
- uint32_t -> void *
- void ** -> uint32_t *

For whatever reason `uintptr_t` and `uint32_t` expand to incompatible
types `unsigned int` and `unsigned long int`. This is implicitely casted
when passed by value, but causes a warning in gcc and error in iar when
passed by pointer.

This issue is not present on x86_32 gcc
2016-07-09 11:13:20 -05:00
Michel JAOUEN e29aa6a7fa Fix issue #2124: IAR no rtos
Remove the 2nd call of mbed_sdk_init in __iar_argc_argv
2016-07-08 13:45:52 +02:00
svastm a101c4f3d8 [STM32XX] Fix RTC minimum date 2016-07-08 13:22:15 +02:00
Michel JAOUEN 6dfb37eafc [TARGET_STM] : remove sys.cpp not used in TOOLCHAIN_ARM_MICRO 2016-07-08 10:00:45 +02:00
Laurent MEUNIER 9c33f70157 [STM32] Serial interrupt TC vs. TXE
Reported in Issue #2119

There was some inconsistency in serial interrupt handling accross STM32
serial_api.c implementation. In case application wants to be notified of
Tx interrupt, it is mainly interested in transmission complete information,
which is the _TC interrupt.

The _TXE (Transmit Data REgister Empty) is used only within driver
in case SERIAL_ASYNCH is being supported to make the transmission
more efficient.
2016-07-08 09:53:32 +02:00
Christopher Haster 2c78dca69c Fixed typo in incr/decr function
Result of last minute change, interestingly only emits a
warning in gcc.
2016-07-07 22:51:31 -05:00
Sam Grove c55c07a890 Merge pull request #2054 from geky/critical-cas-ptr
Added cas instrinsics for pointer values
2016-07-07 16:59:56 -05:00
Rohit Grover 887aa833b3 rename CONFIG_HARDWARE... to have a prefix of DEVICE_STORAGE_ 2016-07-07 14:55:56 +01:00
0xc0170 24916505e1 mbed lib revision - 122 2016-07-07 12:04:54 +01:00
Andrzej Puzdrowski 17c72504ca os_tick for iar 2016-07-07 12:16:11 +02:00
Rohit Grover 14a14a07dc make compile-time decision about async. vs. sync. operation 2016-07-07 08:53:36 +01:00
Rohit Grover a2b683677d introduce a context structure to encompass global state 2016-07-07 08:53:36 +01:00
Rohit Grover 53def56426 get rid of an un-necessary call to NVIC_ClearPendingIRQ 2016-07-07 08:53:36 +01:00
Rohit Grover d60021ca3e remove the call to FLASH_Init() 2016-07-07 08:53:35 +01:00
Christopher Haster 946199183c Minor documentation updates for critical
- extra dereference in cas example
- clarification of incr/decr
2016-07-06 13:06:37 -05:00
Christopher Haster 9067148618 Standardized style of critical.h
per @0xc0170
2016-07-06 13:06:37 -05:00
Christopher Haster 26726cc170 Added proper usage of standard types for critical pointer functions 2016-07-06 13:06:34 -05:00
Christopher Haster cf6f8e33fb Added cas instrinsics for pointer values
- core_util_atomic_cas
- core_util_atomic_incr
- core_util_atomic_decr
2016-07-06 13:04:36 -05:00
Martin Kojtal 704c042707 Merge pull request #2109 from 0xc0170/dev_lpc2368_arm
Targets - LPC23678 ARM fails to build, remove from supported toolchains
2016-07-06 11:40:14 +01:00
Bogdan Marinescu 087b8fa648 Added proper definition for NRF51_MICROBIT_B 2016-07-06 12:31:30 +03:00
0xc0170 668dd17784 Targets - LPC23678 ARM fails to build, remove from supported toolchains
Tracking issue: https://github.com/mbedmicro/mbed/issues/2108
2016-07-06 09:41:32 +01:00
Martin Kojtal 7c00a75b05 Merge pull request #2105 from bridadan/ignore-target-specific-test
Adding .mbedignore for target specific test
2016-07-06 09:05:49 +01:00
Martin Kojtal 8d1024433a Merge pull request #2096 from 0xc0170/fix_release_targets
Fix release targets in the build_release.py
2016-07-06 09:02:44 +01:00
Andrzej Puzdrowski bd8c335c07 add scater files forARM CC and IAR for nRF52
add the startup file for IAR
modyfi object.h for strict compiler
2016-07-06 09:53:53 +02:00
Brian Daniels af7da146a9 Adding .mbedignore for target specific test 2016-07-05 11:05:57 -05:00
Michel Jaouen 1794463a06 [STM32F3]: fix for uart baudrate. 2016-07-05 14:30:25 +01:00
Andrzej Puzdrowski a8c27bde69 startup file for nRF52 basing on nRF51 and nordic SDK v11. 2016-07-05 15:27:57 +02:00
Laurent MEUNIER 6dc9501153 [STM32L4] Handle higher range pwm periods
As first reported on STM32F3 family in #1682, we need to cope
with periods in the seconds range as well. This is fixed here in
the same way as was done for STM32F3 by using the pre-scaler.
2016-07-05 14:32:56 +02:00
Laurent MEUNIER 6eab29cc09 [STM32L1] Handle higher range pwm periods
As first reported on STM32F3 family in #1682, we need to cope
with periods in the seconds range as well. This is fixed here in
the same way as was done for STM32F3 by using the pre-scaler.
2016-07-05 14:32:54 +02:00