Commit Graph

3437 Commits (10af90ac0a09bd6dab980972e4d6dbc5cd8d7b03)

Author SHA1 Message Date
ccli8 13fec628d0 [NANO130] Change PLL clock source to HIRC instead of HXT
This change is to reduce delay of wake-up from power-down to pass Greentea test.
Because HIRC's accuracy is worse than HXT's, we must switch back to HXT for e.g. USBD application.
This can be done through setting NU_CLOCK_PLL to NU_HXT_PLL.
2018-07-03 15:37:53 +08:00
Marcus Chang 3f28fe2f54 Fix target definition for NRF52 series
* Removed RTC, NRF52840 doesn't support RTC API.
 * Reorganized DEVICE_HAS order for NRF52832.
2018-07-02 16:58:33 -07:00
Mahesh Mahadevan 34dab4a4d9 LPC546XX: Fix UART mux setting in the LPCXpresso board
Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2018-07-02 15:16:57 -05:00
Marcus Chang a0224ed794 Fix interrupt initialization for NRF52 series
In some cases the UARTE interrupt would be enabled with pending
interrupts. This commit ensures that interrupts are only enabled
from a known state.
2018-07-02 11:13:50 -07:00
Martin Kojtal 2353e7b1c6
Merge pull request #7029 from OpenNuvoton/nuvoton_5.9_ticker
Nuvoton: Adhere to reworked ticker spec to release with Mbed OS 5.9
2018-07-02 17:28:11 +02:00
Martin Kojtal 44acaf587b
Merge pull request #7369 from marcuschangarm/fix-nrf52-serial
Fix race condition in serial_api.c for NRF52 series
2018-07-02 17:24:16 +02:00
jeromecoutant 40da60b959 DISCO STM32L4 : Add TWO_RAM_REGIONS macro 2018-07-02 14:03:05 +02:00
bcostm b6beb74d9d DISCO_L496AG: update LEDs comments in PeripheralPins.c 2018-07-02 10:27:23 +02:00
bcostm a9ba4f9bf5 DISCO_L496AG: change LED1 and LED2 pins 2018-07-02 10:20:49 +02:00
PHST 9d9db81841 Make clock source changeable over mbed_app.json
By adding the missing include the clock source for EFM32-Targets is changeable over mbed_app.json.
2018-07-02 10:04:05 +02:00
Cruz Monrreal 2da597e56a
Merge pull request #7326 from bcostm/dev_lpuart1_clock_source
STM32: add lpuart_clock_source config
2018-06-29 20:09:09 -05:00
bcostm 0c417ab8b7 astyle 2018-06-29 10:12:40 +02:00
Martin Kojtal 58fa28b9b2
Merge pull request #7313 from mprse/NRF52840_ticker_width_fix
NRF_52840: Fix us ticker counter size
2018-06-29 10:10:40 +02:00
bcostm 9be8541a30 STM32: add lpuart_clock_source config
Keep same clock configuration as done before this PR (LSE and PCLK1).
Use a JSON file to change it.
2018-06-29 10:10:29 +02:00
Marcus Chang 2d71866028 Fix typo in NRF52 series README.md
UART configuration parameters mispelled.
2018-06-28 16:38:29 -07:00
Marcus Chang fc087ab32c Fix race condition in serial_api.c for NRF52 series
* Elevate RTC2 interrupt priority to same level as UARTE to prevent
race condition on shared variables.
* Remove unused TXDRDY event code.
* Fix typo in macro.
2018-06-28 16:36:16 -07:00
jeromecoutant 3721ac44d2 STM32 serial RX/TX active patch
In serial_tx_active and serial_rx_active functions,
we check the internal state value with

HAL_UART_STATE_BUSY_TX = 0x21U,
HAL_UART_STATE_BUSY_RX = 0x22U,

It seems that value can also be :
HAL_UART_STATE_BUSY_TX_RX = 0x23U,
2018-06-28 18:05:52 +02:00
Cruz Monrreal bf21bac52d
Merge pull request #7351 from jeromecoutant/PR_ASTYLE
STM32 files with MBED astyle rules
2018-06-28 10:06:03 -05:00
ccli8 4f04ae489e [Nuvoton] Synchronize lp_ticker code to us_ticker
This is to make us_ticker/lp_ticker code consistent.
2018-06-28 16:34:45 +08:00
ccli8 1fa3374310 [Nuvoton] Remove special handling for dummy interrupt in lp_ticker
It is because dummy interrupt is very rare or pending time caused by it
is very short.
2018-06-28 16:27:37 +08:00
Cruz Monrreal 5bf483ee17
Merge pull request #7330 from KariHaapalehto/clean_up
Clean-up targets.json
2018-06-27 18:44:41 -05:00
Cruz Monrreal faa31de72e
Merge pull request #7323 from marcuschangarm/fix-serial
Improve serial performance for NRF52 series
2018-06-27 18:43:43 -05:00
Przemyslaw Stekiel 9966110dd9 NRF_52840: Fix us ticker counter size
It has been noticed that there is a problem with us ticker on NRF_52840 board after 32 bit counter has been used for us ticker on NRF52 family boards.
Currently NRF52 symbol is defined only for MCU_NRF52832 (not for MCU_NRF52840) and based on this symbol 16 or 32 bit counter is selected (16 bit for NRF51 family and 32 for NRF52 family).
Since MCU_NRF52840 defines NRF52840_XXAA and provides 32 bit counters, 32 bit counter should be selected also when NRF52840_XXAA symbol is defined.
2018-06-27 15:33:07 +02:00
jeromecoutant 78410e7032 TARGET_STM32L4 astyle 2018-06-27 14:46:00 +02:00
jeromecoutant ecffec8336 TARGET_STM32L1 astyle 2018-06-27 14:44:37 +02:00
jeromecoutant baf97d78aa TARGET_STM32L0 astyle 2018-06-27 14:43:59 +02:00
jeromecoutant e9d7128485 TARGET_STM32F7 astyle 2018-06-27 14:42:56 +02:00
jeromecoutant f50720e2a4 TARGET_STM32F4 astyle 2018-06-27 14:42:28 +02:00
jeromecoutant 6df23ee841 TARGET_STM32F3 astyle 2018-06-27 14:32:10 +02:00
jeromecoutant f9bd4768a5 TARGET_STM32F2 astyle 2018-06-27 14:31:31 +02:00
jeromecoutant c8313901fb TARGET_STM32F1 astyle 2018-06-27 14:31:04 +02:00
jeromecoutant 6066e68ec6 TARGET_STM32F0 astyle 2018-06-27 14:23:31 +02:00
jeromecoutant 433ba46132 TARGET_STM astyle 2018-06-27 14:21:07 +02:00
Kari Haapalehto 34abadc0f6 Cleaning MTB_USI_WM_BN_BM_22, MTB_ADV_WISE_1530 and MTB_MXCHIP_EMW3166 targets
These wiced targets are not supported at mbed-os 2 release, so removing
"2" from release_versions.
LWIP feature flag removed, since it isn't needed anymore.
EMAC removed from device_has_add, since it isn't needed with these targets.
"network-default-interface-type": "WIFI" has been added.
2018-06-26 14:31:26 +03:00
Boting Ren 6f9c76c949 fix LED_RED mapping on NUCLEO_F429ZI 2018-06-26 16:22:28 +09:00
ccli8 310a1fe318 [Nuvoton] Synchronize lp_ticker code to us_ticker
This is to make us_ticker/lp_ticker code consistent.
2018-06-26 13:47:30 +08:00
ccli8 8e11ddf3b6 [Nuvoton] Fix trap in lp_ticker ISR with non-blocking "clear interrupt flag" 2018-06-26 13:47:29 +08:00
ccli8 fe627cb722 [Nuvoton] Synchronize lp_ticker code to us_ticker
This is to make us_ticker/lp_ticker code consistent.
2018-06-26 13:47:27 +08:00
ccli8 86e194d075 [Nuvoton] Reduce blocking code in lp_ticker
1. Introduce S/W interrupt enable/disable to reduce calls to TIMER_EnableInt/TIMER_DisableInt.
2. Allow dummy interrupt because clear interrupt flag is not synchronized.
3. Enable LPTICKER_DELAY_TICKS to make lp_ticker_set_interrupt non-blocking.
2018-06-26 13:47:26 +08:00
ccli8 7caec46512 [NANO130] Adjust static/dynamic memory allocation for IAR toolchain to pass Greentea test 2018-06-26 13:47:23 +08:00
ccli8 12792fde27 [NANO130] Fix CLK_Idle incorrectly enters into deep sleep mode
This can happen with CLK_PowerDown() called first and then CLK_Idle() called.
2018-06-26 13:47:22 +08:00
ccli8 3f861425da [Nuvoton] Meet new lp_ticker HAL spec (Mbed OS 5.9)
1. Add LPTICKER in device_has option of targets.json file.
2. Disable ticker interrupt in lp_ticker_init
3. Add lp_ticker_free
4. Enable interrupt in lp_ticker_set_interrupt
2018-06-26 13:47:17 +08:00
ccli8 ebd93ba753 [Nuvoton] Meet new us_ticker HAL spec (Mbed OS 5.9)
1. Add USTICKER in device_has option of targets.json file.
2. Disable ticker interrupt in us_ticker_init
3. Add us_ticker_free
4. Enable interrupt in us_ticker_set_interrupt
2018-06-26 13:45:33 +08:00
Marcus Chang 6346ba87c0 Improve serial performance for NRF52 series
Time sensitive user callbacks are called through lowest priority
SWI handlers instead of the highest priority UART handler.
2018-06-25 17:15:40 -07:00
Marcus Chang ddc709acec Make serial_putc non-blocking for the NRF52 series
Previous implementation would block until character had been
completely sent, which is not what the API specifies.
2018-06-25 13:19:15 -07:00
Marcus Chang a42f1d7a81 Remove whitespace from NRF52 serial_api.c 2018-06-25 13:16:11 -07:00
Cruz Monrreal f3424da060
Merge pull request #7287 from SeppoTakalo/remove_feature_lwip
Remove FEATURE_LWIP
2018-06-25 11:23:15 -05:00
Mika Leppänen 50a130b61d On STM32F439xI IAR linker file decreased stack size and increased heap
Decreased stack size from 24kB to 1kB (stack is used on boot-up/interrupt
handler). Increased heap size from 65kB to 89kB.

Change is related to issue https://github.com/ARMmbed/mbed-os/issues/7137
where UBLOX_EVK_ODIN_W2 runs out of heap on WLAN.
2018-06-25 10:19:16 +03:00
TomoYamanaka 36ad12c403 Modify RAM size definition of ARMCC for GR-LYCHEE
I modified RAM size of ARMCC compiler for GR-LYCHEE.
In case of GR-LYCHEE, RAM size is 3M Byte(including Non-Cache area), but there was a typo at MACRO definition.
2018-06-25 15:44:01 +09:00
Cruz Monrreal 8e170ccbd1
Merge pull request #6925 from TomoYamanaka/feature-flashiap_bootloader
Support Flash iAP and Bootloader for GR-PEACH and GR-LYCHEE
2018-06-22 14:23:57 -05:00
Cruz Monrreal d160cc6cd0
Merge pull request #7284 from KariHaapalehto/wise1530_usi22_support
Add binary drivers for MTB_USI_WM_BN_BM_22 and MTB_ADV_WISE_1530
2018-06-22 10:16:16 -05:00
Cruz Monrreal 24daf18044
Merge pull request #7105 from codeauroraforum/mxrt_add_ivt
MIMXRT1050: Update to EVK Rev B
2018-06-22 10:15:33 -05:00
Cruz Monrreal 446de6947a
Merge pull request #7145 from drahnr/master
NRF52: add a separate .nvictable section and allow .noinit to be used…
2018-06-21 23:32:22 -05:00
TomoYamanaka 94c13c5362 Support Bootloader for GR-PEACH and GR-LYCHEE
The mainly changes is below:
- Update scatter file, linker file for bootloader support
- Update the file for RZ/A1 serial flash boot loader
- Add "device name" and "bootloader_supported" in targets.json
2018-06-22 10:40:45 +09:00
TomoYamanaka 18a8eac72b Support Flash iAP for GR-PEACH and GR-LYCHEE
The mainly changes is below:
- Add flash_api.c
- Add the definition of SPI multi I/O Bus controller that is used for flash access
- Add "FLASH" as device feature
- Add the macro regarding information of the incorporated Flash
- Add the processing to expand code to RAM
2018-06-22 10:40:45 +09:00
Cruz Monrreal e8ec3614b0
Merge pull request #7291 from aqib-ublox/master
adding USTICKER label for C027
2018-06-21 18:23:07 -05:00
Mahesh Mahadevan 632892d355 MIMXRT1050: Update to EVK Rev B
1. Add the IVT header to the binary as this is required for boot up
   This was earlier added by the DAPLink firmware. As it is no longer
   handled in DAPLink, the header needs to be added inside mbed.
2. Update drivers

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2018-06-21 13:34:12 -05:00
Cruz Monrreal 0b8f46763a
Merge pull request #7220 from melvinvdb/fix_nrf5x_interrupt_pull_mode
Fix mbed::InterruptIn.mode() in NRF5x targets
2018-06-21 10:31:48 -05:00
aqib nasim 8efe3b5bcd adding USTICKER label for C027 2018-06-21 17:00:26 +05:00
Bernhard Schuster 124e15f196 NRF52: attempt to complete 86ce955d96 for ARMCC and IAR 2018-06-21 13:24:49 +02:00
Kari Haapalehto 699811be72 Add binary drivers for MTB_USI_WM_BN_BM_22 and MTB_ADV_WISE_1530 2018-06-21 12:15:53 +03:00
Seppo Takalo e4d1a9a85a Remove FEATURE_LWIP. The LwIP stack is enabled on all builds now
Leave the FEATURE_LWIP enabled in build scripts so that it does
not break any builds.

Removed 'feature_add: ["LWIP"]' on all targets.
2018-06-21 11:00:00 +03:00
Marcus Chang 6cec180d0b Fix SPI initialization for NRF52 series
New changes to Mbed error reporting in 5.9 exposed bug in SPI
driver where an instance was uninitialized twice which triggered
an ASSERT.

This fix keeps track of which instance has been initialized and
only calls uninit when it is safe.
2018-06-20 15:09:14 -07:00
Cruz Monrreal 84d6b79dec
Merge pull request #7172 from mprse/NRF5x_updates
Unify RTC, lp ticker, and us ticker for NRF51 and NRF52 series
2018-06-20 16:08:05 -05:00
Cruz Monrreal c4113ae2f5
Merge pull request #7175 from jamesbeyond/fm_mbed_hal
Enable new HAL us_ticker API on fast model MPS2 platform
2018-06-20 12:58:18 -05:00
Cruz Monrreal badb79ee4b
Merge pull request #7272 from KariHaapalehto/emw3166_driver_support
Add binary drivers for MTB_MXCHIP_EMW3166
2018-06-20 12:56:03 -05:00
Cruz Monrreal 5420c46486
Merge pull request #7271 from innovavn/lpc43xx_serial
Fix lpc43xx serial pin map compiling error
2018-06-20 09:04:05 -05:00
Cruz Monrreal 093b4f05a2
Merge pull request #7241 from LMESTM/Fix_DeepsleepStackUsage
STM32: Reduce HAL_deepsleep stack usage
2018-06-20 08:38:56 -05:00
Cruz Monrreal cc1e4f0ff8
Merge pull request #7205 from bcostm/fix_hash_data_alignment
STM32: Fix data alignment issue in HASH function for F2, F7, L4
2018-06-20 07:55:57 -05:00
Kari Haapalehto ea2f53b03f Add binary drivers for MTB_MXCHIP_EMW3166 2018-06-20 12:42:08 +03:00
canhkha c64971c100
Fix lpc43xx serial pin map compiling error 2018-06-20 13:59:48 +07:00
Cruz Monrreal e8005f6d72
Merge pull request #7206 from mikaleppanen/k64f_async_powerup
K64f non-blocking powerup
2018-06-19 21:49:37 -05:00
Cruz Monrreal 567689c725
Merge pull request #7259 from SeppoTakalo/default_wifi
Provide default WiFi interfaces for Ublox and Realtek
2018-06-19 21:46:45 -05:00
Laurent MEUNIER 81adafb5a7 STM32: Reduce HAL_deepsleep stack usage
There are cases where a call hal_deepsleep would overflow the idle task
stack, especially in developper or debug profile.

In order to avoid this case, we split ForceClockOutofDeepSleep
into two separate functions the two structure RCC_ClkInitStruct and
RCC_OscInitStruct are not allocated at the same time.
2018-06-19 17:32:00 +02:00
Cruz Monrreal 31df3d2865
Merge pull request #7242 from davidsaada/david_uniform_text_region
Rename text region in ARM linker file for a few NXP CPUs
2018-06-19 09:45:23 -05:00
Seppo Takalo b4726cbca5 Provide default WiFi interface for Ublox EVK ODIN W2 2018-06-19 16:40:55 +03:00
Seppo Takalo e2d3769211 Provide default WiFI interface for REALTEK_RTL8195AM 2018-06-19 16:40:54 +03:00
Martin Kojtal c964f2ee66
Merge pull request #7226 from juhoeskeli/wise_1570_app_start
Make MTB_ADV_WISE_1570 respect MBED_APP_START & enable bootloader
2018-06-19 14:12:07 +02:00
Martin Kojtal 97c9925e8a
Merge pull request #7249 from maximmbed/fix-file-name-warning
Maxim: Rename files to fix warning
2018-06-19 14:11:21 +02:00
Melvin van den berg 4986daaa7d - Fixed coding style
- Set default pull mode to PullNone in gpio_irq_init
2018-06-19 13:11:31 +02:00
Przemyslaw Stekiel 02d7d25850 us_ticker_set_interrupt: fix bit-shift operation 2018-06-19 08:55:35 +02:00
Przemyslaw Stekiel 80fabcb125 Use lp_ticker.c for NRF51 and NRF52 boards 2018-06-19 08:47:06 +02:00
Przemyslaw Stekiel 4a8de084b9 Use common_rtc.h for NRF51 and NRF52 boards 2018-06-19 08:47:05 +02:00
Przemyslaw Stekiel b073720d62 NRF5x: Increase lp us ticker interrupt priority
Set the second highest user level, leaving the highest for UART (we are having constant overflows) and two levels below for everything else.
This should increase the timer accuracy.
2018-06-19 08:47:05 +02:00
Przemyslaw Stekiel 7e222f2994 NRF5x: Add bug fix for the first timer read.
It has been noticed that first read value can not be trusted.
2018-06-19 08:47:04 +02:00
Przemyslaw Stekiel 1583cbc78e Use common us_ticker.c for NRF51 and NRF52 boards 2018-06-19 08:47:04 +02:00
Przemyslaw Stekiel cca4090bf6 NRF51, NRF52: Implement us_ticker_free() function. 2018-06-19 08:46:44 +02:00
Cruz Monrreal f3e74974da
Merge pull request #7225 from bcostm/fix_hal_tick_comment
STM32: Add comments for HAL_InitTick function
2018-06-18 17:21:35 -05:00
Cruz Monrreal c3bdfad392
Merge pull request #7237 from li-ho/ev-cog-cache
Enable COG boards instruction cache
2018-06-18 17:18:51 -05:00
Keyur Hariya 762cafc2e1 Rename files to fix warning
"aes.c" file name conflict in Maxim platform and mbedtls.
2018-06-18 16:46:18 -05:00
Cruz Monrreal f2b72b9914
Merge pull request #7201 from codeauroraforum/Fix_ADC_LPC54628
LPC54628: Update the ADC clock divider based on the input clock source
2018-06-18 10:08:38 -05:00
Cruz Monrreal 938b924ceb
Merge pull request #7073 from maciejbocianski/sleep_enable_nrf52
NRF52_DK: SLEEP enable
2018-06-18 10:07:29 -05:00
David Saada 714d025f6c Rename text region in ARM linker file for a few NXP CPUs 2018-06-18 17:32:01 +03:00
Edmund Hsu bc6b145c1b Enable COG boards flash algo 2018-06-18 16:31:54 +10:00
Edmund Hsu 6feef97409 Enable COG boards instruction cache 2018-06-18 16:31:15 +10:00
Qinghao Shi 43242589de add comments about TIMER modes and set TIMER2 off by default 2018-06-15 16:26:00 +01:00
Anna Bridge 245a9aab4b
Merge pull request #7128 from davidsaada/david_lpc_flash_api_fix
Fix flash_program_page API in LPC boards.
2018-06-15 11:15:23 +01:00
Juho Eskeli 699601535e Make MTB_ADV_WISE_1570 respect MBED_APP_START & enable bootloader 2018-06-15 13:05:00 +03:00
bcostm 09b8b53b27 Remove text related to channel2 2018-06-15 11:27:52 +02:00
bcostm 1cef655687 Add comments for HAL_InitTick function 2018-06-15 11:19:52 +02:00
Mika Leppänen b7627e823b K64F, K66F: Update the ENET PHY driver
PHY init and autonegotation is split into own functions.
2018-06-15 10:41:31 +03:00
Cruz Monrreal 276588f9fa
Merge pull request #7098 from SeeedJP/feature-cellular-mux
[Wio 3G] Adding platform
2018-06-14 10:17:19 -05:00
Melvin van den berg 5fadb26f14 Fixed broken InterruptIn.mode() in NRF5x target which didn't do anything: interruptIn always remained with pullup resistor enabled. 2018-06-14 16:54:03 +02:00
Cruz Monrreal 0a528ff558
Merge pull request #6831 from mprse/hal_crc_test
Add HAL CRC test and header file
2018-06-13 08:47:11 -05:00
Cruz Monrreal 1cb298a1e2
Merge pull request #7151 from mrcoulter45/issue6543
Fixes for RZ_A1H issue 6543
2018-06-13 08:45:24 -05:00
bcostm b5a8dc513c fix hash alignment of F2, F7, L4 2018-06-13 11:51:24 +02:00
Mahesh Mahadevan 8c6098229b LPC54628: Update the ADC clock divider based on the input clock source
1. Problems were seen on the LPC54628 as the ADC clock source was too
   high
2. Moved the pin configuration to set Analog mode to the end of the
   function

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2018-06-12 12:57:31 -05:00
David Saada 9e5efbcfd5 Fix flash_program_page API in LPC boards.
This API allocates a program buffer of 256 on the stack to ensure alignment.
However, FlashIAP driver already ensures this alignment of the user data.
2018-06-12 15:09:05 +03:00
Qinghao Shi 3ba635d233 change us_ticker_inited to static 2018-06-12 11:31:16 +01:00
Cruz Monrreal 89876311ae
Merge pull request #7176 from KariHaapalehto/data_aligment
Fix data aligment problem at STM32F4 hash write
2018-06-11 21:27:50 -05:00
Michael Coulter 3d3e89097d Fixes for RZ_A1H issue 6543
Removed debugging code, fixed errors indicated in the comments.
2018-06-11 13:30:17 -05:00
Cruz Monrreal b989afaf79
Merge pull request #6178 from andrewleech/nrf51_16k_s130_linker
Add target definition: nrf51 16k on MCU_NRF51_UNIFIED platform
2018-06-11 09:05:16 -05:00
Cruz Monrreal 3d61cb59ab
Merge pull request #6948 from jeromecoutant/PR_ETHER
STM32 ETH : remove TX RX locking interrupt perforation
2018-06-11 09:02:21 -05:00
Cruz Monrreal 23bc4e0fe2
Merge pull request #7088 from bcostm/dev_F7_flash_dual_bank
STM32F76x: Add support of dual bank flash mode
2018-06-11 08:58:55 -05:00
Cruz Monrreal 871489ebb4
Merge pull request #7106 from bcostm/fix_HAL_GetTick
STM32: Replace HAL_GetTick
2018-06-11 08:53:06 -05:00
Cruz Monrreal cbee41c6f7
Merge pull request #7150 from pan-/fix-armcc-nrf-sections
Nordic: Fix nrf sections on ARMCC
2018-06-11 08:52:10 -05:00
Cruz Monrreal 8c6a664380
Merge pull request #7086 from mikaleppanen/nxp_lpc17xx_emac
NXP lpc17xx emac driver
2018-06-11 08:43:43 -05:00
Qinghao Shi 0c8527f5c1 add disable interrupt function in us_ticker_free() 2018-06-11 12:01:49 +01:00
Qinghao Shi 810d534c07 update us_ticker driver and revert CMSDK headers changes 2018-06-11 11:49:02 +01:00
Yoshihiro TSUBOI 16e706ecd4 [Wio 3G] Changed suggested points
Changed accessibility cellular features member functions, fixed minor target issues
2018-06-08 20:13:58 +09:00
Qinghao Shi ad668a74dd Enable new HAL us_ticker API on fast model MPS2 platform 2018-06-08 11:39:02 +01:00
Cruz Monrreal bacf6a9dec
Merge pull request #6860 from andrewleech/nordic_ble_config
Nordic BLE: Allow configuration of softdevice parameters
2018-06-07 10:10:23 -05:00
Przemyslaw Stekiel 4d56b006d1 common_rtc_set_interrupt: Wrap <ticks_count> before comparisons
RTC counter is 24-bit. Upper layer handles counter size and wraps ticks count when interrupt is to be fired before passing it to common_rtc_set_interrupt(), but for consistency and safety reasons we can wrap it again in the NRF driver.
2018-06-07 16:06:08 +02:00
Przemyslaw Stekiel ccba52b45b NRF5x: Remove duplicate lp ticker initialization from I2C, flash, trng. 2018-06-07 16:05:56 +02:00
Przemyslaw Stekiel e5e53e5e48 NRF52_DK: Use 32 bit counter for us ticker (instead 16 bit counter) 2018-06-07 16:00:55 +02:00
Przemyslaw Stekiel a499341b2d K64F CRC driver: Fix coding style 2018-06-07 15:12:56 +02:00
Przemyslaw Stekiel ee6a07e7ab K64F CRC driver: Fix handling of CRC final XOR value
According to the test results final XOR was incorrectly handled by the CRC driver.
This patch fixes this issue.
2018-06-07 15:06:36 +02:00
Przemyslaw Stekiel da557a58a6 K64F CRC driver: hal_crc_is_supported() - fix condition which validates CRC width
It looks like the intention was to return false when CRC width is different than: {16, 32} bits.
2018-06-07 15:06:36 +02:00
Przemyslaw Stekiel 68631fcaa9 STM CRC driver: hal_crc_compute_partial() - validate input paramaters. 2018-06-07 15:06:35 +02:00
Vincent Coubard 16ece66f95 Nordic: Fix nrf sections on ARMCC
The nrf section features has different implementations for each compilers supported by mbed-os. The header guard was ruling out compiler other than GCC by checking if __GNUC__ is defined. This check is not applicable on mbed os as the ARM compiler compile sources with gnu compatibility.

This patch makes sure that the right implementation is selected for the right compiler . The previous patch has been reverted as it is not reliable.
2018-06-06 17:18:28 +01:00
bcostm 11d0a8399b Add license 2018-06-06 14:05:22 +02:00
Bernhard Schuster 86ce955d96 NRF52: add a separate .nvictable section and allow .noinit to be used by the application 2018-06-06 14:04:15 +02:00
jeromecoutant 202fc8af18 STM32 : few targets does not support LPTICKER 2018-06-06 13:33:18 +02:00
Mika Leppänen 4d055abea5 Added EMAC configuration for UBLOX_C027 2018-06-06 14:29:49 +03:00
Mika Leppänen a5a8b350ce Ported NXP LPCxx ethernet driver to unified EMAC 2018-06-06 14:29:49 +03:00
bcostm b087390a1a Remove HAL_TICK_DELAY (no more used) 2018-06-05 16:53:40 +02:00
bcostm e09e1147d8 Cleanup
- Remove calls to HAL_SuspendTick and HAL_ResumeTick
- Rename stm_common.c in hal_tick_common.c
2018-06-05 14:48:54 +02:00
Kari Haapalehto 0c3047f4cc Fix data aligment problem at STM32F4 hash write 2018-06-05 15:03:37 +03:00
bcostm 74c29cb0e5 Remove code related to timer channel 2 2018-06-05 11:21:02 +02:00
Cruz Monrreal 20a4412082
Merge pull request #7089 from paul-szczepanek-arm/fix-master
BLE fixes (SM whitelist creation, Nordic scatter file fix, missing TLS initialisation)
2018-06-04 10:44:54 -05:00
Cruz Monrreal abed3dfb1a
Merge pull request #7060 from ithinuel/fix-c027
UBLOX_C027: init us_ticker in the target initialization
2018-06-04 10:43:08 -05:00
bcostm 91e826d459 Replace HAL_GetTick 2018-06-04 16:00:56 +02:00
jeromecoutant b79be416c8 Dual Bank Flash support update 2018-06-04 13:37:59 +02:00
bcostm cc14540140 Add support of Flash dual bank mode on DISCO_F769NI 2018-06-04 13:37:59 +02:00
bcostm b647ecf80c Add support of Flash dual bank mode on NUCLEO_767ZI 2018-06-04 13:37:59 +02:00
Anna Bridge 2d0e5f04b1
Merge pull request #6022 from andrewleech/nrf_asserts_error
nrf5x: Enable asserts -> mbed_error
2018-06-04 12:24:58 +01:00
ytsuboi e5b8591818 [Wio 3G] Adding platform 2018-06-04 15:55:43 +09:00
Cruz Monrreal cabcdcf133
Merge pull request #7062 from jeromecoutant/PR_F413
DISCO_F413ZH : map SPI3 to WIFI module
2018-06-02 20:53:18 -05:00
Cruz Monrreal 07fb7c1adc
Merge pull request #6987 from jeromecoutant/PR_ADC
STM32 ADC update
2018-06-02 19:52:51 -05:00
Vincent Coubard dfcdbbfb14 Nordic FIX: place observers sequentially in flash. 2018-06-01 16:59:09 +01:00
Anna Bridge 8c26e463ae
Merge pull request #7056 from M-ichae-l/fix-realtek_rtl8195am-IPv6-build-fails-functional-update
fix realtek_rtl8195am IPv6 build fails update
2018-06-01 12:20:21 +01:00
Anna Bridge 9986abe499
Merge pull request #6803 from chuanga/wise-1510-uart-config
Wise 1510 uart config
2018-06-01 11:52:34 +01:00
Andrew Leech bf313aa1db Move mbed_lib.json from targets folder to feature_ble folder
The functionality added all affects BLE features in use so this location is a better fit.
2018-06-01 13:37:16 +10:00
Andrew Leech c1c425af08 Expose softdevice configurations via new nordic-ble library definition file 2018-06-01 13:37:15 +10:00
Cruz Monrreal 0abf0cfa5b
Merge pull request #7039 from shuoo/feature-cm3ds-misc
FPGAIO: Add MISC IO initialization support
2018-05-31 10:56:43 -05:00
Cruz Monrreal dbc42f696a
Merge pull request #7031 from OpenNuvoton/nuvoton_5.9_rtc
Nuvoton: Adhere to reworked RTC spec to release with Mbed OS 5.9
2018-05-31 10:12:50 -05:00
Maciej Bocianski f6d3058899 NRF52_DK: SLEEP enable 2018-05-31 14:32:02 +02:00
jeromecoutant 2d0890b989 DISCO_F413ZH : pin value error 2018-05-31 13:55:55 +02:00
jeromecoutant 422e124854 DISCO_F413ZH : map SPI3 to WIFI module 2018-05-30 17:56:46 +02:00
Wilfried Chauveau 1c7b91aa8c us_ticker is not yet initialised at this stage 2018-05-30 15:01:18 +01:00
zzw 4fc8eb1591 fix realtek_rtl8195am IPv6 build fails update
fix for #6909
    -remove the "dhcps.h" and "dhcps.c" files
    -edit "wifi_conf.c" "wifi_conf.h" and "rtw_emac.cpp" to fix compile error
rebase for #6974
2018-05-30 18:53:08 +08:00
Cruz Monrreal 231f4cf9c1
Merge pull request #7034 from TomoYamanaka/master
Fix redeclaration of type name "bool_t" for Renesas
2018-05-29 10:44:29 -05:00
Cruz Monrreal cb3f8a5ad3
Merge pull request #7022 from marcuschangarm/fix-gpio
Fix array overflow in gpio configuration code for NRF5x
2018-05-29 10:43:23 -05:00
Cruz Monrreal 42b3ef7bd5
Merge pull request #6991 from amq/efm32-universal-rtx
EFM32: make mbed_rtx.h depend of families instead of targets
2018-05-29 10:39:27 -05:00
Cruz Monrreal 88d863aaeb
Merge pull request #6984 from stevew817/'efm32_irq_bugfix'
EFM32 IRQ handling fix
2018-05-29 10:38:55 -05:00
Cruz Monrreal 1a0c2d0600
Merge pull request #6970 from stevew817/efm32_flash_bugfix
Fixes to EFM32 port
2018-05-29 10:38:30 -05:00
Cruz Monrreal fe43377939
Merge pull request #6947 from evva-sfw/hotfix/EFM32PG12_STK3402_Expansion_Header
EFM32PG12_STK3402 - Correct wrong Expansion-Header pin namings
2018-05-29 10:36:31 -05:00
ccli8 6065e3a943 [Nuvoton] Fix RTC cannot cross reset cycle 2018-05-29 17:22:02 +08:00
ccli8 ee7efb556d [Nuvoton] Add back RTC to device_has target configuration 2018-05-29 10:37:03 +08:00
ccli8 2cefe7d8d5 [Nuvoton] Power down RTC access from CPU domain in rtc_free
After rtc_free, RTC gets inaccessible from CPU domain but keeps counting.
2018-05-29 10:33:01 +08:00
Karl Zhang 5be69f3143 FPGAIO: Add MISC IO initialization support 2018-05-29 10:12:04 +08:00
TomoYamanaka f34857792a Fix redeclaration of type name "bool_t"
I fixed redeclaration of type name "bool_t" for target Renesas because this typedef has been defined in rtx_core_ca.h by #6273.
2018-05-28 18:55:13 +09:00
Bartek Szatkowski a1ff22d439 Disable FLASH algo for AD boards 2018-05-27 23:31:20 -05:00
Bartek Szatkowski dc6ad34994 Disable FLASH for AD boards as they fail the tests intermittently 2018-05-27 23:31:20 -05:00
Bartek Szatkowski 1224b3894d Disable RTC on MAX32630FTHR due to failing tests 2018-05-27 23:31:20 -05:00
Bartek Szatkowski 195ef38618 Fix missmatch between targets.son 2018-05-25 13:59:04 -05:00
Jesse Marroquin 11d418b749 mbed-os v5.9 RTC implementation 2018-05-25 13:06:56 -05:00
Bartek Szatkowski 7624a6625c Sleep was not ported to MAX32630FTHR 2018-05-25 13:06:56 -05:00
Bartek Szatkowski 7dbd025ba1 NRF52 is not compatible with new RTC HAL spec 2018-05-25 13:06:56 -05:00
Bartek Szatkowski a305d849a8 Rename LOWPOWERTIMER to LPTICKER 2018-05-25 13:06:56 -05:00
Martin Kojtal e1fc81dc41 max32600: fix lp ticker functions - do not inline
Wrong linkage specified, causing build to fail.
2018-05-25 13:04:23 -05:00
Martin Kojtal 73de4e6e48 efm32: remove unused undefined function from rtc 2018-05-25 13:04:23 -05:00
Martin Kojtal 6781ee88cd maxim: fix rtc if lp ticker not defined
lp ticker handler defined only if lp ticker is defined. In case not,
use only overflow, rtc0 not used.
2018-05-25 13:04:23 -05:00
Bartek Szatkowski 9b53c1e9e1 Fix target definition for Odin boards 2018-05-25 13:04:23 -05:00
Edmund Hsu e2fe49d403 Preserve RTC counter value while re-initialization 2018-05-25 13:04:23 -05:00
Edmund Hsu 8d670001f2 Remove trailing spaces of adi_rtc.c 2018-05-25 13:04:23 -05:00
Edmund Hsu dbebc71d95 ADI: Re-enable DEVICE_RTC for EV_COG_AD3029LZ and EV_COG_AD4050LZ 2018-05-25 13:04:23 -05:00
Mahesh Mahadevan f7c6e555f3 MCUXpresso: Enable RTC on LPC54114 and LPC546XX
Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2018-05-25 13:03:46 -05:00
Mahesh Mahadevan a17cf07a35 MCUXpresso: Enable RTC support
Same MCUXpresso SDK driver used for Kinetis devices

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2018-05-25 13:03:16 -05:00
Bartek Szatkowski 2826e4e416 Disable platforms not supporting new RTC 2018-05-25 13:01:19 -05:00
Steven Cooreman 81e6c96014 Code style fixes requested by @0xc0170
Tests still passing
2018-05-25 12:59:19 -05:00
Steven Cooreman 4b3bde1082 Re-implement RTC for Silicon Labs targets
mbed RTC specifications now dictate that the RTC needs to retain and keep on counting through reset. On Silicon Labs parts, this means the RTC API can not be backed by the Silicon Labs RTC peripheral, since that doesn't provide retention functionality.
Therefore:
* On EFM32GG, EFM32WG, EFM32LG: mbed RTC API is now backed by BURTC.
* On EFM32PG, EFR32MG, EFM32PG12, EFR32MG12: mbed RTC API is now backed by RTCC.
* On EFM32ZG, EFM32HG: mbed RTC API is sadly no longer supported, since these chips don't have retained memory.
2018-05-25 12:57:30 -05:00
TomoYamanaka f55becef9a Implement of RTC feature for Renesas mbed boards
I implemented the RTC feature.
The mainly changing is here.
- rtc_init()
  Previously, I have initialized the time information register in the function, so the time count was cleaned by every calling rtc_init().
  Currently, rtc_init() doesn't stop RTC from counting, and rtc_init() is safe to call repeatedly.
  Therefore in order to satisfy specifications,I removed the initialization process of the time information register in the function.

- rtc_free()
  Previously, I have initialized the RTC related register same as rtc_init(), so the time count was cleaned by calling rtc_free().
  Currently, rtc_free() doesn't stop RTC from counting.
  Therefore in order to satisfy specifications,I removed the process and decided not to do anything in the function.
  If powerdown the RTC, Supply of the clock to the RTC is stopped, cannot keeping the count.
2018-05-25 12:53:06 -05:00
Przemyslaw Stekiel 1e46895f75 K64F: adapt RTC drivers to the new standards (is_enabled function)
Make rtc_isenabled() to return 1 if the RTC is initialized and the time has been set; 0 otherwise.
Disable clock gate on exit from this function if RTC was initialized.
2018-05-25 12:52:40 -05:00
Przemyslaw Stekiel 377db73100 K64F: adapt RTC drivers to the new standards (free function)
rtc_free() does not stop the RTC from counting. Only disables clock gate since processor no longer needs to read RTC registers.
2018-05-25 12:52:40 -05:00
Przemyslaw Stekiel 4fc3d07bd0 Enable RTC support for K64F board. 2018-05-25 12:52:39 -05:00
Przemyslaw Stekiel 7f451c6705 Disable RTC support for UBLOX_EVK_ODIN_W2.
This board inherits from STM_FAMILY, but drivers for this board are not consistent with the new standards.
This board needs to be disabled for now.
2018-05-25 12:52:02 -05:00
Przemyslaw Stekiel c93ab168bd Enable RTC support for FAMILY_STM32. 2018-05-25 12:49:48 -05:00
Russ Butler 6d90c2716d Turn off RTC until updated
Turn off RTC for all devices. When support for a device is added this
should be re-enabled.
2018-05-25 12:49:11 -05:00
Russ Butler a0a9626420 Keep rtc code if low power timer is used
Keep the RTC code if either DEVICE_RTC or DEVICE_LOWPOWERTIMER is
defined on the devices which use the RTC for both the rtc api and the
low power timer api. This allows DEVICE_LOWPOWERTIMER to be enabled while
DEVICE_RTC is turned off.
2018-05-25 12:37:19 -05:00
Przemyslaw Stekiel 3850c80b43 Make common_rtc.c compatible with SDK 14.2 and move it common dir 2018-05-25 12:33:43 -05:00
Przemyslaw Stekiel f32f866f00 NRF52840_DK: Enable lp us ticker support 2018-05-25 12:33:42 -05:00
Ashok Rao 96ca7c22ed Adding usticker to MTB_ODIN 2018-05-25 12:33:42 -05:00
Jesse Marroquin 0ddec48efc mbed-os v5.9 LPTICKER implementation 2018-05-25 12:33:42 -05:00
Jesse Marroquin b88329acb8 mbed-os v5.9 USTICKER implementation 2018-05-25 12:33:42 -05:00
Przemyslaw Stekiel 11748bf95c Enable us lp ticker support for entire MCU_NRF52832 family 2018-05-25 12:33:42 -05:00
Przemyslaw Stekiel 1d1b6cd571 NRF52_DK: disable us ticker in deep-sleep mode
This functionality is required by new sleep standards.
2018-05-25 12:33:42 -05:00
Przemyslaw Stekiel b0153574d4 NRF52_DK: Enable lp ticker and us ticker support 2018-05-25 12:33:42 -05:00
Przemyslaw Stekiel 9ef0083f92 NRF52_DK: use new ticker driver designed for NRF51_DK 2018-05-25 12:33:41 -05:00
Mahesh Mahadevan fb622a2081 MIMXRT1050_EVK: Update lpticker implementation
Use only the GPT module and avoid using RTC.

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2018-05-25 12:33:41 -05:00
Mahesh Mahadevan 3b7b0f1307 KW41Z, KL43Z, KL27Z: Enable LPTICKER
Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2018-05-25 12:33:41 -05:00
Mahesh Mahadevan d46af14bb6 KL27Z: Update usticker to use TPM instead of LPTMR for ticker
This will free up the LPTMR to be used as lpticker

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2018-05-25 12:33:41 -05:00
Mahesh Mahadevan a21d21e700 KL43Z: Update usticker to use TPM instead of LPTMR for ticker
This will free up the LPTMR to be used as lpticker

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2018-05-25 12:33:41 -05:00
Mahesh Mahadevan 62254c2bae KW41Z: Update usticker to use TPM instead of LPTMR for ticker
This will free up the LPTMR to be used as lpticker

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2018-05-25 12:33:41 -05:00
Edmund Hsu e514c2c70d Fix us_ticker.c to support "USTICKER"
- Disable microsecond ticker interrupt on reinitialization
- Skip us_ticker_set_interrupt() if timestamp is already past
- Eliminate tmr2Config since tmrConfig is adequate for all timer config
2018-05-25 12:32:38 -05:00
Mahesh Mahadevan 774de11d1f MCUXpresso: Enable usticker on MIMXRT1050_EVK
Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2018-05-25 12:32:38 -05:00
Mahesh Mahadevan 659be61e4b MCUXpresso: Enable usticker for LPC546XX and LPC54114
Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2018-05-25 12:32:38 -05:00
Mahesh Mahadevan 4eb8841dc1 MCUXpresso: Update the usticker implementation
Enabled usticker for K22F, K24F, K66F, K82F, KL82Z, KW24D

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2018-05-25 12:32:38 -05:00
Mahesh Mahadevan 0d0321a7f0 MCUXpresso: Update Low Power Ticker
1. Enable LPTICKER for K22, K24, K64, K66, K82, KL82F, KW24D
2. Change the implementation to only use the LPTMR which reduces
   the amount of interrupts generated which is required for tickless
   operation

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2018-05-25 12:32:38 -05:00
Mahesh Mahadevan 132dc87f3e KL05, KL25, KL26, KL46: Enable usticker
Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2018-05-25 12:30:53 -05:00
Mahesh Mahadevan 870600400d LPC1768: Enable usticker
Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2018-05-25 12:30:53 -05:00
Przemyslaw Stekiel 7d969326d6 Enable support for NRF51 boards.
Make it consistent with master.
2018-05-25 12:30:52 -05:00
Przemyslaw Stekiel fac7d744d5 Disable us ticker in deep-sleep mode. 2018-05-25 12:30:52 -05:00
Przemyslaw Stekiel ffd09f8a70 Enable support for NRF51 boards. 2018-05-25 12:30:52 -05:00
Przemyslaw Stekiel 77f738baac Move common_rtc.c and us_ticker.h files to the valid directory.
I decided to move these files to the targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_NRF51 since us_ticker.h is for sure specific for NRF51_DK and common_rtc.c might be valid also for NRF52, but this needs to be checked while porting NRF52_DK board.
2018-05-25 12:29:55 -05:00
Bartek Szatkowski 1e71515471 Disable MAX targets failig to build 2018-05-25 12:29:55 -05:00
Bartek Szatkowski e6bb77085c Disable failig Nordic targets 2018-05-25 12:29:55 -05:00
Przemyslaw Stekiel bdfbad8422 Rename DEVICE_LOWPOWERTIMER to DEVICE_LPTICKER. 2018-05-25 12:29:55 -05:00
Przemyslaw Stekiel af2863a9e5 Update lp ticker to be consistent with the new standards.
Provide the following modifications for lp ticker driver:
- According to NRF51_DK reference manual rtc interrupt cannot be controlled by rtc event. In the previous implementation interrupts were enabled permanently and specific interrupt was enabled/disabled by enabling/disabling the specific event. If event is enabled, then event signal is provided to Programmable Peripheral Interconnect (PPI). If interrupt is enabled, then interrupt signal is provided to Nested Vector Interrupt Controller (NVIC). Disable all events permanently. Enable lp ticker overflow interrupt permanently(needed for RTC), disable lp ticker capture/compare interrupt on init (lp_ticker_init) , enable lp ticker interrupt when lp ticker interrupt is set (lp_ticker_set_interrupt), disable lp ticker interrupt on disable request(lp_ticker_disable_interrupt).
- Provide lp ticker data for higher level (freq: 32kHz / len: 24 bits),
- Add the following features to init routine: disable lp ticker interrupt.
- Make ticker driver to operate on ticks instead of us.
- Simplify lp ticker read and set interrupt routines (upper layers handle conversion to us and interrupt scheduling).
2018-05-25 12:29:54 -05:00
Przemyslaw Stekiel 007a707527 Enable us/lp ticker support for NRF51_DK board 2018-05-25 12:29:54 -05:00
Przemyslaw Stekiel 533ad59669 NRF5 - make us ticker to be driven by high speed 1MHz timer
According to new ticker standards the following requirements for us ticker are not met on RRF5 boards:
- has a frequency between 250KHz and 8MHz (currently is driven by 32kHz clock)
- ticker increments by 1 each tick (currently is scaled to 1 MHz by incrementing counter by ~31)

Since BLE softdevice uses TIMER0 the proposition is to use high speed TIMER1 for us ticker configured as follows:
- TIMER counter width: 16 bits (max)
- TIMER frequency: 1MHz
This solution also uses Timer's capture/compare register 0 to specify interrupt time and Timer's capture/compare register 1 to read current timer value.
2018-05-25 12:29:54 -05:00
jeromecoutant e3deaecc27 STM32 LPTICKER update for targets supporting RTC 2018-05-25 12:29:54 -05:00
jeromecoutant 39a9801675 STM32 LPTICKER : clean include file 2018-05-25 12:29:54 -05:00
jeromecoutant c31a7c2277 STM32 LPTICKER : enable all STM32 targets supporting the feature
(All STM32 except F1 and F2 families)
2018-05-25 12:29:54 -05:00
jeromecoutant 1c4174d3eb STM32 RTC Init minor update 2018-05-25 12:26:05 -05:00
jeromecoutant 12b3df7773 #6536 rebase correction 2018-05-25 12:26:05 -05:00
jeromecoutant 2b8d6cbcc5 STM32 LPTICKER : read counter 2018-05-25 12:26:05 -05:00
jeromecoutant 8179d96d4d LPTICKER targets json update for STM32 supporting LPTIMER
STM32L0, STM32L4, STM32F7 and few STM32F4
2018-05-25 12:26:05 -05:00
jeromecoutant 5701fd5ab6 STM32 LPTICKER update for targets supporting LPTIMER 2018-05-25 12:22:35 -05:00
Bartek Szatkowski 1e13d8765a Rename LOWPOWERTIMER to LPTICKER after merge 2018-05-25 12:22:35 -05:00
TomoYamanaka b528fbdfb3 Implementation of USTICKER feature for Renesas mbed boards
I implemented USTICKER feature.

The mainly changing is here.
- I added a macro to mbed_drv_cfg.h for commonalizing code for GR-PEACH and GR-LYCHEE with different clock frequencies, and referenced it's macro at us_ticker.c.
- ticker_init()
  Currently, ticker_init() keep counting, disables the ticker interrupt, and is safe to call repeatedly.
  Therefore, in order to satisfy specifications, I removed GIC_EnableIRQ at end of function and added GIC_DisableIRQ at begin of function.
  When an interrupt is required, it will be set with ticker_set_interrupt().
  If executing the following, the counter has been initialized. So it will not call after executing the first time.
    OSTM1TT   = 0x01;    /* Stop the counter and clears the OSTM1TE bit.     */
    OSTM1TS   = 0x1;    /* Start the counter and sets the OSTM0TE bit.     */

- ticker_free()
  this function stops the counting and powerdown the us_ticker.
  To satisfy the mbed specificationm, I implemented free() function.

- ticker_read()
  Currently, Mbed spec's frequeny is between 250KHz and 8MHz, but the frequency that is used at my ticker is 33MHz.
  Therefore, in order to satisfy specifications, I changed the process to return the timer counter value divided by 32(33MHz / 32).
  Since the calcurate function by using 64 bit is no longer necessay, I removed it.

- ticker_set_interrupt()
  Same as the above read(),
  In order to satisfy specifications, I changed the process to set the value multiplied by 32.

- ticker_fire_interrupt()
  In order to satisfy specifications, I implemented fire_interrupt() function.
  Also I added GIC_EnableIRQ for allowing the interrupt at end of function.

- ticker_get_info()
  To satisfy the mbed specificationm, I implemented ticker_get_info() function. The value of freq includes rounding off.
2018-05-25 12:22:06 -05:00
Laurent MEUNIER beda4904d3 Make us_ticker common between 16 and 32 bits counters 2018-05-25 12:20:10 -05:00
Laurent MEUNIER c3d5daf80a Update STM32 16 bits us_tickers in line with new mbed HAL
The new HAL allows to share the timer bit width and frequency,
the actual handling of mapping 16 bits counter up to 32 bits or
64 bits is now managed by mbed common layer.

This makes this ticker layer very similar to 32bits one and much
easier than before.
2018-05-25 12:20:10 -05:00
Steven Cooreman 1448f81620 Re-implement us_ticker and lp_ticker for Silicon Labs targets
Re-implemented both us_ticker and lp_ticker to match the new API and specifications.
Details:
* On EFM32GG, EFM32WG, EFM32LG, EFM32HG, EFM32ZG: Use the RTC peripheral to back lp_ticker, and a TIMER to back us_ticker.
* On EFM32PG, EFR32MG, EFM32PG12, EFR32MG12: Use the RTCC peripheral to back lp_ticker (dual-purpose, also used to back RTC), and a TIMER to back us_ticker.
2018-05-25 12:20:10 -05:00
Steven Cooreman 5590f2b495 Re-implement RTC for Silicon Labs targets
mbed RTC specifications now dictate that the RTC needs to retain and keep on counting through reset. On Silicon Labs parts, this means the RTC API can not be backed by the Silicon Labs RTC peripheral, since that doesn't provide retention functionality.
Therefore:
* On EFM32GG, EFM32WG, EFM32LG: mbed RTC API is now backed by BURTC.
* On EFM32PG, EFR32MG, EFM32PG12, EFR32MG12: mbed RTC API is now backed by RTCC.
* On EFM32ZG, EFM32HG: mbed RTC API is sadly no longer supported, since these chips don't have retained memory.

# Conflicts:
#	targets/TARGET_Silicon_Labs/TARGET_EFM32/lp_ticker.c
#	targets/TARGET_Silicon_Labs/TARGET_EFM32/rtc_api.c
#	targets/targets.json
2018-05-25 12:20:10 -05:00
Bartek Szatkowski 88ba94221a Remove nrf51_dk from supported platform 2018-05-25 12:20:09 -05:00
Bartek Szatkowski d2a5e30a46 Disable platfroms that fail without LPTICKER 2018-05-25 12:20:09 -05:00
Bartek Szatkowski 2d19ac1d60 Make sure LPTICKER symbols are not used for builds without it for Nordic 2018-05-25 12:20:09 -05:00
Bartek Szatkowski 2d11b05756 Disable Maxim boards as LP_TICKER is used in RTC and they don't respect device_has 2018-05-25 12:20:09 -05:00
Bartek Szatkowski 6e9f04bf2f Rename DEVICE_LOWPOWERTIMER to DEVICE_LPTICKER
That's to match DEVICE_USTICKER.
2018-05-25 12:20:09 -05:00