Commit Graph

25420 Commits (eb4b323e2e91dd382f8f44fa68e2acea16ca815b)

Author SHA1 Message Date
Filip Jagodzinski a6dd6f0bde STM32F7: Fix serial IRQ handling
Check that the RX or TX interrupt is enabled before calling
a registered handler with RxIrq or TxIrq arg.
2019-07-11 11:40:53 +01:00
Filip Jagodzinski f158ac0077 K64F: Fix serial IRQ handling
Check that the RX or TX interrupt is enabled before calling
a registered handler with RxIrq or TxIrq arg.
2019-07-11 11:40:53 +01:00
Jaeden Amero 5b47bb030a crypto: Enable use on non-PSA targets
Move PSA Crypto implementation files outside of a TARGET_PSA folder,
enabling use of PSA Crypto APIs on more Mbed OS targets.
2019-07-11 11:40:53 +01:00
Hugues Kamba 0aa289d8b2 microlib support: Fix build with Arm Compiler 6 and MicroLib
Building binaries with MicroLib and Arm compiler 6 has been failing
because of a bug in Arm compiler 6. The compiler introduces a
symbol, `__scanf_mbtowc`, which is not present in MicroLib C library.

The present commit adds a weak reference to the symbol to allow a
successful linkage. This is a temporary fix until the bug in the
compiler is fixed. It should be removed after the compiler bug is fixed.
2019-07-11 11:40:53 +01:00
Amanda Butler 9f09eb908d Edit MbedCRC.h
Review changes, and edit file while I'm at it.
2019-07-11 11:40:53 +01:00
Bartek Szatkowski 9460de5319 Extend MbedCRC class doxygen to add more operational details 2019-07-11 11:40:53 +01:00
Bartek Szatkowski d8907da90c Fix doxygen for MbedCRC 2019-07-11 11:40:53 +01:00
jeromecoutant ad3b345aa4 STM32: enable CRC for all L0/L4/F7 2019-07-11 11:40:53 +01:00
Chun-Chieh Li f81516f6d5 M23: Fix compile error with mbed fault handler
M23 doesn't implement Main Extension. So like M0/M0+, these registers HFSR/
MMFSR/BFSR/UFSR/DFSR are not present on M23. Remove access to them in mbed
fault handler for M23 targets.
2019-07-11 11:40:53 +01:00
Tymoteusz Bloch be4d40b1b3 Fixed LWIPStack socket_sendto member to fail if interface IP4/6 version differ from destination adress IP version 2019-07-11 11:40:53 +01:00
Hugues Kamba e30060a217 mem pool size: Fix calculation of memory pool size for portability
Replace the hardcoded value calculation of the memory pool block size
with the RTX preprocessor macro (via a shim layer).
This is in preparation for the replacement of the direct access of RTX
functionalities in Mbed OS with an access via CMSIS.
2019-07-11 11:40:53 +01:00
Laurent Meunier f1601b0ad7 Check Properties have been set 2019-07-11 11:40:53 +01:00
Martin Kojtal 74d2b8e5b9 cellular: fix file permission 2019-07-11 11:40:53 +01:00
Maciej Bocianski 121f28da0f HAL I2C: adds missing DEVICE_I2C guards 2019-07-11 11:40:53 +01:00
jeromecoutant 4b751b3245 Wrong timeout value in greentea tests 2019-07-11 11:40:53 +01:00
Mirela Chirica 227013f7cc Cellular: Added handling for BG96 network PDP context deactivation 2019-07-11 11:40:53 +01:00
Laurent Meunier 4a6310a26b Add extra idle debug stack size in case all STATS are enabled 2019-07-11 11:40:53 +01:00
Kimmo Vaisanen 8a86811f1a Cellular: Fix PLMN debug trace for IAR
IAR does not allow printing from null pointer as parameter for %s. PLMN string
can be null depending on user configuration.
2019-07-11 11:40:53 +01:00
Teppo Järvelin 050af7c49c Cellular: fix athandler to use correct timeout in case of multiple urc's
Start time was not updated when multiple urc's were found and so timeout
was set to zero. Now that start time is updated, timeout is correct.
2019-07-11 11:40:53 +01:00
mudassar-ublox 6acf1d70cc Style issue fixed 2019-07-11 11:40:53 +01:00
mudassar-ublox 1e29490dba socket close callback 2019-07-11 11:40:52 +01:00
Kevin Bracey 15b103e5e5 NSAPI/lwIP: Use netconn_recv_tcp_pbuf
Slight RAM+speed efficiency improvement - read the TCP implementation's
native pbufs, rather than forcing netconn_recv to generate netbuf
wrappers for us. Saves one small lwIP heap allocation per TCP packet
received.
2019-07-11 11:40:52 +01:00
Qinghao Shi bb726b3be6 modify targets.json to trun off MPU 2019-07-11 11:40:52 +01:00
Qinghao Shi 9745d04d5f correct CMSDK for M0Plus due to MPU is not presented 2019-07-11 11:40:52 +01:00
d-kato d88af0e69d Fix bugs by optimization 2019-07-11 11:40:52 +01:00
d-kato 099617dfd9 tests-mbed_drivers-crc: Increase the task stack 2019-07-11 11:40:52 +01:00
Volodymyr Medvid 3bc1d20bc4 PSOC6: add SOFTFP to standard component list
This allows Cypress to deliver middleware libraries with
precompiled libraries for SoftFP ahd HardFP, separated by
component-specific sub-directories:

COMPONENT_SOFTFP/TOOLCHAIN_GCC_ARM/libcy_capsense.a
COMPONENT_HARDFP/TOOLCHAIN_GCC_ARM/libcy_capsense.a
2019-07-11 11:40:52 +01:00
Marten Lootsma 50eae59dd9 Changed to one more info to debug 2019-07-11 11:40:52 +01:00
Marten Lootsma 54cebf9116 Add trace logging with size of block device 2019-07-11 11:40:52 +01:00
Marten Lootsma 839b23194b Cleaned up SPIF trace log.
- Test most SPIF log to DEBUG level.
- Removed DEBUG/ERROR/INFO tags.
- Removed not needed line endings.
2019-07-11 11:40:52 +01:00
Laurent Meunier 7062d6ba7a Fixes in Sys Timer test
Do not call sleep from the test thread, but let scheduler do it.
And also include the deep sleep latency in the computation of the allowed
delta for deep sleep test case.
2019-07-11 11:40:52 +01:00
Chun-Chieh Li f62010d026 Override wait_ns to provide more accurate implementation
At high HCLK rate, M2351 cannot provide zero-wait-state flash performance. Besides,
cache is forcibly turned off for non-secure land for internal reason. We locate
'delay_loop_code' from flash to SRAM to achieve zero-wait-state performance.
2019-07-11 11:40:52 +01:00
Filip Jagodzinski 771658953b Add a top level README file for USB tests
Add setup instructions and aggregate all the info from README files
related to USB testing.
2019-07-11 11:40:52 +01:00
Przemyslaw Stekiel 39ec779ee8 Ticker common layer: run interrupt reschedule if the inserted event has already expired.
On some platforms, if low power ticker interrupt is set to very close value (e.g. timestamp < current tick + 3), then interrupt may not fire. This is one use case of lp ticker wrapper, but not all platforms use the wrapper. Some platforms cheat a bit and in this case, simply schedules interrupt a bit later. The problem has been found while working on the low-level lp ticker wrapper for ST boards which run lp ticker using LPTIM. These platforms have such limitation.

Failing test: tests-mbed_drivers-lp_timeout (Test Case: Zero delay)

In the test scenarion, the lp ticker callback is attached with 0.0 s delay in the loop. The new events are put in the front of the lp ticker event list and interrupt reschedule is performed. Usually, the new event is already expired, interrupt fires immediately and next event from the list is then scheduled (e.g. system tick). When the next event (e.g. system tick) is very close to the current time it might be scheduled a bit later (because of lp ticker limitation). Let's assume that system tick has been delayed by 3 ticks and while inserting new zero delay event, absolute system tick time on the event list has already expired. In this case, zero delay event may be added after the expired system tick event and no reschedule is performed (because the head of the list has not changed). Interrupt also didn't fire yet since it has been delayed, so after return from attach_callback(0) we are still waiting for the delayed interrupt and zero delay callback has not been called instantly.

This may also affect other platforms which use such delays (Cypress, NORDIC, etc.).

The proposition is to add extra condition while adding an event to the event list. If the inserted event is already expired, then perform reschedule immediately.
2019-07-11 11:40:52 +01:00
Przemyslaw Stekiel aba5ca72cd tests-mbed_drivers-lp_timeout: Rework "Zero delay" test case
Execute test case 100 times in loop since one run is not enough to catch possible failure.
2019-07-11 11:40:52 +01:00
Przemyslaw Stekiel f1044a7de5 tests-mbed_hal-sleep: add exception for STM LPTIM targets.
On some targets like STM family boards with LPTIM enabled an interrupt is triggered on counter rollover.
We need special handling for cases when next_match_timestamp < start_timestamp (interrupt is to be fired after rollover).
In such case after first wake-up we need to reset interrupt and go back to sleep waiting for the valid one.

On some targets like STM family boards with LPTIM enabled there is a required delay (~100 us) before we are able to reprogram LPTIM_COMPARE register back to back.
This is handled by the low level lp ticker wrapper which uses LPTIM_CMPOK interrupt. CMPOK fires when LPTIM_COMPARE register can be safely reprogrammed again.
This means that on these platforms we have additional interrupt (CMPOK) fired always ~100 us after programming lp ticker.
Since this interrupt wake-ups the board from the sleep we need to go to sleep after CMPOK is handled.

Background:
There is an errata in LPTIM specification that explains that CMP Flag
condition is not an exact match (COUNTER = MATCH) but rather a
comparison (COUNTER >= MATCH).

As a consequence the interrupt is firing early than expected when
programing a timestamp after the 0xFFFF wrap-around.

In order to
work-around this issue, we implement the below work-around.
In case timestamp is after the work-around, let's decide to program the
CMP value to 0xFFFF, which is the wrap-around value. There would anyway be
a wake-up at the time of wrap-around to let the OS update the system time.
When the wrap-around interrupt happen, OS will check the current time and
program again the timestamp to the proper value.
2019-07-11 11:40:52 +01:00
Chris Trowbridge 2679f2b6fc Moved DEFAULT_DELAY_BETWEEN_AT_COMMANDS constant to cpp file 2019-07-11 11:40:52 +01:00
Chris Trowbridge 8329fc1d52 Remove unnecessary init AT commands 2019-07-11 11:40:52 +01:00
Chris Trowbridge a214a3cb59 Modify ME910 driver to follow power on/off best practices and add custom get_context() function 2019-07-11 11:40:52 +01:00
Chris Trowbridge cbea74820e Add default soft/hard power on/off sequences for ME910 2019-07-11 11:40:52 +01:00
Chris Trowbridge 761ab4dd75 Remove ME910 trace group #define 2019-07-11 11:40:52 +01:00
Chris Trowbridge 19997f6013 Remove ME910 flow control debug message 2019-07-11 11:40:52 +01:00
Chris Trowbridge 1b28301f11 Remove unnecessary #includes 2019-07-11 11:40:52 +01:00
Chris Trowbridge 808d0c3a8e Remove default power on/off functions 2019-07-11 11:40:52 +01:00
Chris Trowbridge 179a4163d7 Add Telit ME910 driver 2019-07-11 11:40:52 +01:00
Tymoteusz Bloch 4fe355e1d2 UDPSOCKET_ECHOTEST_NONBLOCK performance improvement. 2019-07-11 11:40:52 +01:00
George Beckstein 738cbb798d Removed mbed.h global include 2019-07-11 11:40:52 +01:00
George Beckstein 680625b6b7 Removed incorrect comment 2019-07-11 11:40:52 +01:00
aglass0fmilk 689e6877ee Added spdx identifiers and fixed indentation in targets.json 2019-07-11 11:40:52 +01:00
George Beckstein 2e4f74222c Astyle fixed USBPhy_Nordic.cpp 2019-07-11 11:40:52 +01:00