Commit Graph

25127 Commits (24efeb84fe437aadf97cad58c72db83afa6e10cc)

Author SHA1 Message Date
Mahesh Mahadevan 24efeb84fe Kinetis MCUXpresso: Update the clock drivers
Updated driver includes
1. Bug fixes
2. Formatting updates.
3. Fix for warnings
4. Better code commenting

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2019-07-11 11:40:54 +01:00
Kevin Bracey d65a7d36dc STM: Correct macro test in us_ticker_defines.h
Avoids build warning caused by #10609
2019-07-11 11:40:54 +01:00
Chun-Chieh Li e0b40a042f Fix idle thread stack underflow in debug build
In rtos/mbed_lib.json:
Enlarge idle-thread-stack-size-debug-extra for all Nuvoton targets.

In rtos/TARGET_CORTEX/mbed_rtx_conf.h:
MBED_DEBUG also must be defined for this configuration parameter to take effect.
2019-07-11 11:40:54 +01:00
Mathias Brossard 19babe2178 LPC55S69: fix cosFactor data size in header file
The file 'fsl_powerquad_data.h' declares several dctXXX_cosFactor
arrays with sizes twice larger compared to the actual definitions in
'fsl_powerquad_data.c'.
2019-07-11 11:40:54 +01:00
jeromecoutant dc6441bfc8 NUCLEO_H743ZI2 new target support 2019-07-11 11:40:54 +01:00
Sebastian Stockhammer 5f0b6dac3d Fix astyle 2019-07-11 11:40:54 +01:00
Sebastian Stockhammer b0997ad7a9 Allow IPV4V6 stack type 2019-07-11 11:40:54 +01:00
Sebastian Stockhammer 55243ae027 Require exact context type match 2019-07-11 11:40:54 +01:00
Malavika Sajikumar 4251b8cf5e Removing I2C and SPI pin names in SDP-K1 PinNames.h file. This is to ensure the use of Arduino pin names Dxx for I2C and SPI pins in programs written for SDP-K1 board. 2019-07-11 11:40:54 +01:00
Paul Thompson a6b90e30dd Make the sys_arch_protect() mutex be recursive.
Fixes #9744

Appears to be a lwIP porting bug. Comments in our porting layer say:

    This function should support recursive calls from the same task or interrupt. In other words, sys_arch_protect() could be called while already protected.
2019-07-11 11:40:54 +01:00
George Beckstein f160dd5e90 Fix alignment 2019-07-11 11:40:54 +01:00
George Beckstein 6b539e99bc Fixed bug causing Nordic drivers to use a different critical section API from Mbed. This caused conflicts when Nordic's critical section API would globally reenable interrupts while Mbed still expected to be in a critical section. 2019-07-11 11:40:54 +01:00
Kimmo Vaisanen 7a5f1984ee Fix netconn_recv_tcp_pbuf ARMC6 linker error
If "lwip.tcp-enabled" is set to false, ARMC6 compilation fails to error
Error: L6218E: Undefined symbol netconn_recv_tcp_pbuf

LWIP::socket_recv() is TCP socket specific method so implementation can be
enabled only when LWIP_TCP flag is set.
2019-07-11 11:40:54 +01:00
Kimmo Vaisanen cf7911d4d6 Increase dns-response-wait-time
In some cellular networks or with some modems, DNS response can take longer than 5 seconds to arrive.
2019-07-11 11:40:54 +01:00
mudassar-ublox 0e6e1a6309 cellular socket flags updated 2019-07-11 11:40:54 +01:00
Kevin Bracey a8fdcdee69 Remote "static" from MBED_FORCEINLINE
Static keyword causes problems when trying to use force-inlined
functions from normal inlined functions. This is not legal:

    static inline void forced() { }

    inline void normal() { forced(); }

You cannot reference internal-linkage things from external-linkage
inline functions.

Removal of the static implies that in C there would need to be a
non-inline definition in case anyone calls it non-inlined, but if the
force attribute is doing its job, that should not happen.

Only significant in-tree user of the MBED_FORCEINLINE macro is
the atomic operations - making this change permits atomic operations
from non-static inline functions.
2019-07-11 11:40:54 +01:00
Kevin Bracey d571990298 wait_ns micro-optimisation
Use `+ 1` to set the "Thumb" indicator on the `delay_loop` routine
address, rather than `| 1`. That makes it something that can be done
by the linker, rather than needing to be done at run-time.

Saves one instruction and one cycle.
2019-07-11 11:40:54 +01:00
Kevin Bracey 77877614b8 STM: optimize us_ticker
Provide new optimizations for us_ticker and wait_us.
2019-07-11 11:40:54 +01:00
Kevin Bracey 49b98a5b2a Freescale MCUXpresso: optimize us_ticker
Provide new optimizations for us_ticker and wait_us.
2019-07-11 11:40:54 +01:00
Kevin Bracey 0d12800b9f wait_us optimization
As the timer code became more generic, coping with initialization on
demand, and variable width and speed us_ticker_api implementations,
wait_us has gradually gotten slower and slower.

Some platforms have reportedly seen overhead of wait_us() increase from
10µs to 30µs. These changes should fully reverse that drop, and even
make it better than ever.

Add fast paths for platforms that provide compile-time information about
us_ticker. Speed and code size is improved further if:

* Timer has >= 2^32 microsecond range, or better still is 32-bit 1MHz.
* Platform implements us_ticker_read() as a macro
* Timer is initialised at boot, rather than first use

The latter initialisation option is the default for STM, as this has
always been the case.
2019-07-11 11:40:54 +01:00
Maciej Bocianski cae15715f9 usb_device-msd test: OS type detection fix 2019-07-11 11:40:53 +01:00
Maciej Bocianski 7d0e7a65c7 usb_device-msd test: astyle fix 2019-07-11 11:40:53 +01:00
Maciej Bocianski b28c37684f usb_device-msd test: docs update 2019-07-11 11:40:53 +01:00
Maciej Bocianski 8a667702da usb_device-msd test: disable host side unmount on windows machines 2019-07-11 11:40:53 +01:00
Maciej Bocianski faa3fb5438 usb_device-msd test: improve error handling 2019-07-11 11:40:53 +01:00
Maciej Bocianski b4e2ea63df usb_device-msd test: fix powershell unmount script issue
Running PowerShell script on some windows machines is blocked.
To avoid this problem script was replace by the code run directly in PowerShell console.
2019-07-11 11:40:53 +01:00
Alexandre Bourdiol 22a8e19ebe STM32: pwmout_write: configure channel only when not already enabled
Fix PWM glitch on write(), TARGET_STM/pwmout_api.c, #10734
2019-07-11 11:40:53 +01:00
Filip Jagodzinski 5e9a2a7b2a Tests: SleepManager: Fix test_check for NRF5X
Add missing `lp_ticker_clear_interrupt()` in the interrput handler used
in `test_lock_unlock_test_check()` test.
Remove redefined `us_to_ticks()`.
2019-07-11 11:40:53 +01:00
Laurent Meunier b21d0de725 Update test_lock_unlock_test_check() assertion to cope with new timings
With the DEEP_SLEEP_TEST_CHECK_WAIT_DELTA_US increased,
we now have TEST_ASSERT_UINT64_WITHIN(delta=1000, expected=1000, actual=1000)
so this assertion needed to be updated.

What we need is the deep sleep to be enabled after the programed interrupt
has fired and before a 2ms timeout expiration, which means >= 1000 and < 2000.
2019-07-11 11:40:53 +01:00
Laurent Meunier 9aa859c68d Increase DEEP_SLEEP_TEST_CHECK_WAIT_DELTA_US
now that sleep_manager_can_deep_sleep_test_check() is based on wait_ns
2019-07-11 11:40:53 +01:00
Przemyslaw Stekiel b20fb99e5d sleep_manager_can_deep_sleep_test_check(): do not use ticker common layer to count elapsed time. 2019-07-11 11:40:53 +01:00
Przemyslaw Stekiel caed5aac99 Further modifications in Sleep Manager test.
Changes:
- restore the original form of setup/teardown handlers,
- test_lock_unlock_test_check(): do not use common ticker layer (Timer, Timeout). Use only ticker HAL layer.
- Increase DEEP_SLEEP_TEST_CHECK_WAIT_DELTA_US delta.
2019-07-11 11:40:53 +01:00
Laurent Meunier d82346e5ca Remove unused variable
and avoid associated warning ...
2019-07-11 11:40:53 +01:00
Laurent Meunier 25e5f2c68c Fix compilation issue for targets without LPTICKER or USTICKER 2019-07-11 11:40:53 +01:00
Laurent Meunier 89602c87d3 Update HAL Sleep manager test to cope with STM32 LPTIM HW
In particular and as kindly suggested by Przemec S. :
1. Add setup/teardown handler’s for all cases. This disables sys-tick,
so there should be no unexpected lp ticker interrupt scheduling.
2. Modify setup/teardown handler’s: remove suspension of lp/us tickers,
so they can count as this is required by test_lock_unlock_test_check test
case.
3. Use TEST_ASSERT_TRUE(sleep_manager_can_deep_sleep_test_check()) after
setting interrupt to cope with STM specific handling (CMPOK interrupt with
deep-sleep locked). This performs wait only if needed and will not affect
other targets which do not need extra wait.
4. Move sleep_manager_lock_deep_sleep() after TEST_ASSERT_TRUE(sleep_manager_can_deep_sleep_test_check())
5. Use TEST_ASSERT_TRUE(sleep_manager_can_deep_sleep_test_check()) in
test_lock_unlock_test_check to let lower layers manage deep sleep.
2019-07-11 11:40:53 +01:00
Hugues Kamba 6576bbba93 bootloader: Fix LPC55S69 bootloader segmentation
As the build tool in mbed-os 5.13 cannot appropriately deal with a segmented
bootloader when combining it with an application, this commit adjusts the
size reserved for interrupts (via the linker file) to avoid a bootloader
segmentation due to an unpopulated ROM area.

The microcontroller has a total of 60 vector interrupts + 16 exception
handlers. The allocated ROM flash for interrupts should be (60 + 16) x word
size in bytes = 76 x 4 = 304 = 0x130.

This commit changes the interrupt reserved space from 0x140 to 0x130.
2019-07-11 11:40:53 +01:00
Laurent Meunier 0f3d2acf2b Allow target or application level definition of extra TICKLESS stack size
Adding a check to let application or target force increase idle thread
stack size.
2019-07-11 11:40:53 +01:00
Devaraj Ranganna c802042952 Remove MBEDTLS_PSA_CRYPTO_C from PSA NS targets
Signed-off-by: Devaraj Ranganna <devaraj.ranganna@arm.com>
2019-07-11 11:40:53 +01:00
Devaraj Ranganna 9bd8925042 1. Include MBEDTLS_CONFIG_FILE before evaluating MBEDTLS_PSA_CRYPTO_C 2. Remove macro MBEDTLS_PSA_CRYPTO_C from PSA targets
Signed-off-by: Devaraj Ranganna <devaraj.ranganna@arm.com>
2019-07-11 11:40:53 +01:00
Alexandre Bourdiol 08f76145e3 Add STM32H743ZI to IAR export definition 2019-07-11 11:40:53 +01:00
Antti Yli-Tokola 1eb799e4fa TLSSocket: print certificate info only when tracing is enabled
Flagging these functions out will reduce flash size more than 3k.
2019-07-11 11:40:53 +01:00
Hugues Kamba aebad5203a microlib support: Specify compiler version unable to build without the fix 2019-07-11 11:40:53 +01:00
Filip Jagodzinski 742fff4f5b K82F: 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 206cc999e6 KL27Z: 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 4799f3de6b K66F: 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 ad48edbda0 KL43Z: 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 73f4e0306e KL82Z: 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 66cf982b2c KW24D: 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 0ab31ca416 KW41Z: 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 cde58d2a65 K24F: 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