Commit Graph

1298 Commits (2c12c6c13cc288e8c55f3189439408978889a839)

Author SHA1 Message Date
kl-cruz 8698756c63 [nRF52840] Fixed length in trng in every mode 2017-06-07 15:32:12 -05:00
kl-cruz c32e2c262a [nRF52840] added trng implementation for nrf52840 2017-06-07 15:31:39 -05:00
Sam Grove 01e4520548 Merge pull request #4453 from c1728p9/lp_ticker_fix
Safely initialize RTC on kinetis devices
2017-06-07 09:58:49 -05:00
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 3c3e35dd44 Merge pull request #4423 from arostm/nucleo_f412zg_remove_hal_conf
NUCLEO_F412ZG: Remove hal_conf file from NUCLEO_F412ZG
2017-06-06 19:59:31 -05:00
Sam Grove 4d7c045753 Merge pull request #4424 from LMESTM/STM32_16bits_tickers
Fix corner cases in STM32 16bit tickers
2017-06-06 19:59:08 -05:00
Laurent MEUNIER 1c57df37d4 STM32 L4: Flash API typo 2017-06-06 18:10:38 -05:00
Laurent MEUNIER a9d237012c Removing duplicate defines
Those defines are already available in STM32 L4 SDK and don't need to
be (re)defined here.
2017-06-06 18:10:18 -05:00
Laurent MEUNIER ec89ea8ac9 Fix L432KC compilation error 2017-06-06 18:09:53 -05:00
Laurent MEUNIER b91c86ec3e Activate FLASH on STM32 L4 targets 2017-06-06 18:09:31 -05:00
Laurent MEUNIER b1ae8a9f9d STM32L4 : add Flash API support 2017-06-06 18:09:12 -05:00
Aksel Skauge Mellbye b30e665fc7 [Silicon Labs] Bugfixes to using bootloader with Series 1 devices. 2017-06-06 17:11:18 -05:00
Andreas Larsson 7a0778b7d2 Fixed wrong stack size start 2017-06-06 17:09:01 -05:00
Andreas Larsson 7e58474a4e Fixed comment, 439ZI to more generic 439xI 2017-06-06 17:08:51 -05:00
Andreas Larsson fe8afae0c1 Fixed comment alignments 2017-06-06 17:08:43 -05:00
Andreas Larsson 6f1a8a8515 Added MBED_APP_START and MBED_APP_SIZE used by the app when a boot loader is present 2017-06-06 17:08:28 -05:00
Andreas Larsson e91495dab1 Rebase of: 2d2f0a0b5c
Added missing bootloader_supported for NUCLEO_F439ZI
2017-06-06 17:07:54 -05:00
Aksel Skauge Mellbye 9e999bd43b [Silicon Labs] Fix bug with SPI MISO and CS handling 2017-06-06 16:36:15 -05:00
Mahadevan Mahesh 059affaf4e Add TRNG support for KW41Z
Signed-off-by: Mahadevan Mahesh <Mahesh.Mahadevan@nxp.com>
2017-06-06 16:33:53 -05:00
Aksel Skauge Mellbye 5d906a74e6 [Silicon Labs] Add bootloader support
* Make memory sections configurable in linker files
* Dynamically determine vector location in flash for NVIC relocation
* Advertise bootloader support in targets.json
2017-06-06 16:26:11 -05:00
Aksel Skauge Mellbye d5eaa1505c [Silicon Labs] Enable dynamic heap with ARMCC
When using ARM Compiler 5, the RTX config hard-coded the heap and stack
sizes to specific values. This prevented the RTX HAL from dynamically
allocating unused memory as heap space.

Specifically, the HEAP_START define prevents this logic in RTX_CM_lib.h
from activating. The rest of the defines are also set in that header,
and should be removed from here.
2017-06-06 16:21:55 -05:00
Aksel Skauge Mellbye 29bef6fd05 [Silicon Labs] Fix compile warnings and ticker test failure
* Using PinName as bitfield doesn't work without warnings, since NC
  needs all 32 bits to be represented.
* lp_ticker should not be freed when interrupt is disabled, since this
  will kill the timebase.
2017-06-06 16:14:19 -05:00
Sam Grove 6002bdd533 Merge pull request #4439 from sg-/proper-realtek-fix
Proper fix for 1fa30b7403
2017-06-06 16:00:55 -05:00
Laurent MEUNIER affab79f13 STM32 L0: Add Flash API support
This is the introduction of Flash API support for STM32 L0 family.
2017-06-06 15:47:54 -05:00
Laurent MEUNIER 7ec9fe23c1 Update stm32l476rg linker scripts for bootloader
Add MBED_APP_START and MBED_APP_SIZE to the linker scripts
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-06-06 15:43:54 -05:00
Laurent MEUNIER 5fbe3299d7 Rebase of: e51c40c061
Fix vector table

The address of the vector table is hardcoded to the start of flash.
This patch updates make it properly handle updating the VTOR with
a bootloader.
2017-06-06 15:43:17 -05:00
Laurent MEUNIER b1a56bedf4 Enable bootloader on NUCLEO_L476RG 2017-06-06 15:42:40 -05:00
Russ Butler f749a2990b Safely initialize RTC on kinetis devices
When initializing the RTC on Kinetis devices, handle the case where
the time overflow interrupt is pending and the case where the time
alarm flag is pending. These flags persist across reset and if not
handled will cause a crash when powering up the low power ticker.

This problem manifested as a lp_ticker test failure on the K22F and
K64F on CI only when running a nightly. This problem has been present
but was made obvious by PR #4094 which configures all tickers to
interrupt at least every MBED_TICKER_INTERRUPT_TIMESTAMP_MAX_DELTA
(~31 minutes). This caused the RTC alarm to fire 31 minutes after the lp_ticker
or lp_timeout test and caused the next run of the lp_ticker test to
crash on boot.
2017-06-06 15:30:41 -05:00
Anna Bridge a41e08c7bf Merge pull request #4365 from LMESTM/fix_i2C_pcf_F1F2F4L1
Fix i2c communication with pcf8574 on stm32 targets of f1, f2, f4 and l1 families
2017-06-05 14:41:36 +01:00
Anna Bridge f6d19726b2 Merge pull request #4368 from MultiTechSystems/iar_fix
MTS_DRAGONFLY_F411RE/MTS_MDOT_F411RE: add IAR to post_binary_hook toolchains
2017-06-05 14:40:02 +01:00
Laurent MEUNIER ea2cc1d0e1 STM32 16bits tickers: consider all corner cases in us_ticker_set_interrupt
The present commit comes from monkiineko mbed contributor.
The comments in code explains in details all the possible case and
how they are handled.
2017-06-05 13:12:20 +02:00
Laurent MEUNIER fbfbb5e982 STM32 16 bits ticker: fix grammar issues in comments 2017-06-05 13:12:20 +02:00
Laurent MEUNIER 572a096c08 STM32 16 bits tickers: save useless instance init
TimMasterHandle.Instance initialization can be removed from here,
because it will either have been already done previously,
or it will be done in the us_ticker_init() call immediately below.
2017-06-05 13:12:20 +02:00
Laurent MEUNIER 7bcabf7cc0 STM32 16 bits tickers: remove unused prototype
Since rework, this prototype is not needed anymore.
2017-06-05 13:12:20 +02:00
Laurent MEUNIER 27be2e1884 STM32 16 bits ticker: don't check FLAG just clear it
Not having the check will make the code more efficient.
2017-06-05 13:12:20 +02:00
Laurent MEUNIER 1b684ca4e9 STM32 16 bits tickers, no need to check TIM_FLAG_CC1OF FLAG
Following previous fixes on 16 tickers handling, the overflow flag
condition will not happen anymore, so the work-around in place is
not needed anymore
2017-06-05 13:12:20 +02:00
Laurent MEUNIER 35c68859c0 STM32: 16 bits ticker, fixes in set function and handler
This commit simplifies ticker interrupt set function and handler.

There were issues around the 16 bits timer wrap-around timing as we were
aligning interrupts with wrap-around limits (0xFFFF) and then reading
TIM_MST->CNT again in timer_update_irq_handler which could lead
to crossing case with the wrap-around (TIM_FLAG_UPDATE) case.

Now we're using the 16 lower bits of the timestamp as the reference from
using in set_compare and never changing it. There is also no need to set
comparator again in timer_update_irq_handler. This is more robust and
also more efficient.
2017-06-05 13:12:20 +02:00
Laurent MEUNIER b9b5f0b929 STM32 16bits ticker: rework us_ticker_read()
Move to a single more reliable implementation of us_ticker_read()
There were historically 2 versions of us_ticker_read() implementation.

The one removed here was not reliable because us_ticker_read() can be
called in interrupt context which means that TIM_MST->CNT would have
wrapped around while SlaveCounter is not yet updated. So there is a need
to check the TIM_FLAG_UPDATE inside this function, which was not done in
the implementation that is removed here.
2017-06-05 13:12:20 +02:00
Sam Grove 02bf926ffb Proper fix for 1fa30b7403
Replace #define with typedef
2017-06-04 11:26:21 -05:00
Sam Grove be35b3fb81 spi: Added default spi_master_block_write implementation to REALTEK_RTL8195AM
There is an easy default implementation of spi_master_block_write that
just calls spi_master_write in a loop, so the default implementation
of spi_master_block_write has been added to all targets.
2017-06-03 17:14:11 -05:00
Yuguo Zou 3c3a9a67fe fix STRINGIFY redefining issue 2017-06-03 20:15:05 +01:00
Yuguo Zou fdea7b146c fix icf file misspelling 2017-06-03 20:15:05 +01:00
Yuguo Zou b76c8a93c5 clean up GPL license with APACHE2.0 2017-06-03 20:15:05 +01:00
Yuguo Zou 7602d2749a remove unsupported device_name 2017-06-03 20:15:05 +01:00
Yuguo Zou f71f578435 Switch to rtx2
remove rtx and switch to rtx2
2017-06-03 20:15:05 +01:00
Yuguo Zou c31d5479be fix multiple i2c peripherals possible conflicting issue 2017-06-03 20:15:04 +01:00
Yuguo Zou 92ca664fda Add support for mbed exporter
(uvision, gcc_arm, iar)
2017-06-03 20:15:04 +01:00
Yuguo Zou 4eda93e760 resolve RTWInterface initialization run after error issue 2017-06-03 20:15:04 +01:00
Yuguo Zou e2891647f2 add comment for the delay in analogout_api.c
see analogout_init()
2017-06-03 20:15:04 +01:00
Yuguo Zou 0c046a4c38 improve coding style 2017-06-03 20:15:04 +01:00
Yuguo Zou 005ce58f44 cmsis5\rtx5 put NVIC vector ops in mbed_boot.c 2017-06-03 20:15:04 +01:00
Yuguo Zou e8fd5bbdf4 move archives into target specific directories 2017-06-03 20:15:03 +01:00
Yuguo Zou c160d5b1cd Ported code of CMSIS5/RTX2
temporarily comment out these code to prevent conflict with RTX
2017-06-03 20:15:02 +01:00
Yuguo Zou 6c82b51f78 an I2C fix
an I2C fix for updated CI-test
2017-06-03 20:15:01 +01:00
Yuguo Zou f000eb3401 Restore TCPIP_THREAD_STACKSIZE and thread_stack_main
move some TCPIP stack data to heap;
switch off GDMA for SPI (only for SPI);
TCPIP_THREAD_STACKSIZE and thread_stack_main are identical to ARMmbed
2017-06-03 20:15:01 +01:00
Yuguo Zou c3bf1c5006 remove unused class member from RTWInterface 2017-06-03 20:15:00 +01:00
Yuguo Zou 6f24e9e8e9 Clear Wlan code in permissive-binary-license
These code are put in binary library or they are unused .h files
2017-06-03 20:15:00 +01:00
Yuguo Zou 0430b94896 code style fix #2 2017-06-03 20:14:59 +01:00
Yuguo Zou d18735dd31 code style fix
replace tab with 4 spaces;
remove "#ifndef CONFIG_MBED_ENABLED" code;
make if else pretty;
add comment to PinNames.h;
2017-06-03 20:14:59 +01:00
Yuguo Zou 0650ad1384 greentea heap&stack fix 2017-06-03 20:14:59 +01:00
Yuguo Zou 15d58690e9 fold static variables in RTWInterface.cpp to .h, modify lwipopts.h TCPIP_THREAD_STACKSIZE 2017-06-03 20:14:59 +01:00
Yuguo Zou f87eca8a2b remove sleep_api.c 2017-06-03 20:14:59 +01:00
Yuguo Zou 2dd9415e89 Fold ADC0 into trng; delete comment code 2017-06-03 20:14:58 +01:00
Yuguo Zou ba03499b21 reslove conflict UINT definition between basic_types.h & filesystem 2017-06-03 20:14:58 +01:00
Yuguo Zou 08489e4f18 Fix on Wifi 2017-06-03 20:14:58 +01:00
Yuguo Zou 1141c7a08b fix C++11 warning 2017-06-03 20:14:58 +01:00
Yuguo Zou 680dec521e fix a bug in PWM
PWM period larger than 60ms has significant time error
2017-06-03 20:14:58 +01:00
Yuguo Zou 074dd9f9fd fix a bug brought by previous commit
commit dfe0a97 brought some new problem, this commit fix that
2017-06-03 20:14:57 +01:00
Archcady 3736313c39 Update RTWInterface.cpp 2017-06-03 20:14:57 +01:00
Yuguo Zou dbcd36f242 fix bugs found in CI test
HalTimerOp has been changed to HalTimerOpExt
2017-06-03 20:14:57 +01:00
ianqianting b1d999178a fix wifi example fail issue 2017-06-03 20:14:57 +01:00
Yuguo Zou d96de9c21a update to lwip_stack issue 2017-06-03 20:14:56 +01:00
Yuguo Zou de8f2ad1f1 switch off tcm_heap usage 2017-06-03 20:14:56 +01:00
Yuguo Zou 57f385a2fd mute some debug message in wlan lib 2017-06-03 20:14:56 +01:00
Yuguo Zou 7c2e73df4c Add Arduino pins 2017-06-03 20:14:55 +01:00
Yuguo Zou 8d20c35508 Update lib (enum issue) 2017-06-03 20:14:55 +01:00
Yuguo Zou 29e11a1cb9 move REALTEK_RTL8195AM.py, remove progen in targets.json 2017-06-03 20:14:54 +01:00
Yuguo Zou 02687b5ec5 A fix to enum issue 2017-06-03 20:14:54 +01:00
Yuguo Zou 9a0cb73447 mute debug message in RAM1 (changed) 2017-06-03 20:14:52 +01:00
Yuguo Zou f8019f4526 Mute RAM1 messages 2017-06-03 20:14:52 +01:00
Yuguo Zou 7867a816d7 WiFi test fix for GCC
right now still need to add flag in gcc.py, we are fixing!
2017-06-03 20:14:51 +01:00
Yuguo Zou d75c5dbef0 minor fixes
correct heap size in icf file;
improve REALTEK_RTL8195AM.py
2017-06-03 20:14:50 +01:00
Yuguo Zou b20d635882 fix the issue that GCC builds extra-large bin file
also a minor fix to IAR icf file
2017-06-03 20:14:50 +01:00
Yuguo Zou 3e9dafa853 remove "default_build" from targets.json 2017-06-03 20:14:50 +01:00
Yuguo Zou ad85a1409b Remove IPV4 from features in targets.json 2017-06-03 20:14:49 +01:00
Yuguo Zou 41f20d6913 remove useless definitions in device.h
also fix a minor building error
2017-06-03 20:14:49 +01:00
Yuguo Zou 0d84a8d0d0 move network Interface API out 2017-06-03 20:14:49 +01:00
Archcady 173315ddf3 remove unused code 2017-06-03 20:14:49 +01:00
Yuguo Zou c72257cbf8 update other file headers 2017-06-03 20:14:48 +01:00
Yuguo Zou 3395ebc520 update lib 2017-06-03 20:14:48 +01:00
Yuguo Zou 5e47ad075d Fix headers issue in TARGET_AMEBA\sdk\common folder 2017-06-03 20:14:46 +01:00
Yuguo Zou 4d52f985eb change proprietary headers (APACHE2.0)
correct proprietary headers for some of our codes
2017-06-03 20:14:46 +01:00
Archcady c20809492d Rename rtl8195a_rom.so to rtl8195a_rom.o 2017-06-03 20:14:45 +01:00
Archcady 04ede46486 Add rtl8195a_rom.so 2017-06-03 20:14:45 +01:00
Yuguo Zou 53e837bce2 add support for REALTEK_RTL8195AM 2017-06-03 20:14:45 +01:00
Archcady bbbecd7090 Update targets.json 2017-06-03 20:14:43 +01:00
Archcady bc948ca672 Create mbed_rtx.h 2017-06-03 20:14:43 +01: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
Laurent MEUNIER a1f7a36461 STM32 HAL I2C fix RXNE case
As reported in issue #4214, there are seen issues seen first on
NUCLEO_F103RB in case of successive Reads of 1 byte at a time.

This issue is due to a wrong state management in the end of read sequence.
Also F1 i2c driver was not fully aligned to others, which is updated here.
2017-06-02 17:28:48 +02:00