Commit Graph

1317 Commits (05fc0f526319523e87ae9467b1cbc361fb755416)

Author SHA1 Message Date
Kevin Bracey b1c35b7a86 Move Atomic.h to <mstd_atomic>
`mbed::Atomic<T>` becomes `mstd::atomic<T>`, alongside the other
standard C++ library lookalikes.
2019-07-18 20:02:07 +03:00
Seppo Takalo 3d5489a6f8
Merge pull request #10644 from fkjagodzinski/hal-gpio_pinmap
Add a gpio pinmap
2019-07-17 14:39:40 +03:00
Seppo Takalo 987533859a
Merge pull request #10104 from kjbracey-arm/sleep_api
Sleep rework, RTOS API for bare metal, wait deprecations
2019-07-17 14:37:53 +03:00
Seppo Takalo 59b9f1da17
Merge pull request #11014 from SiliconLabs/fix/fpga_tests/adc_methodology
Increase ADC tolerance to 5% in FPGA-based tests
2019-07-17 14:29:37 +03:00
Arto Kinnunen 9cdfe37783
Merge pull request #10994 from fkjagodzinski/fix-serial_fc_guards
Add DEVICE_SERIAL_FC guards to serial HAL API
2019-07-15 15:47:37 +03:00
Arto Kinnunen 85a90221ed
Merge pull request #11004 from jeromecoutant/PR_I2C
FPGA I2C: correct init bloc number
2019-07-15 15:46:10 +03:00
Arto Kinnunen 51b44d1cfa
Merge pull request #11005 from jeromecoutant/PR_PWM
FPGA PWM: wait 1 period before measurement
2019-07-15 15:44:47 +03:00
Arto Kinnunen aca726d59f
Merge pull request #11022 from OpenNuvoton/nuvoton_wdt-test-oom
Fix watchdog tests failing with OOM
2019-07-15 15:37:24 +03:00
Kevin Bracey a522dcfa0a Replace deprecated wait calls 2019-07-15 10:13:50 +03:00
Kevin Bracey 89eba7303f Timed sleep rework 2019-07-15 10:13:49 +03:00
Kevin Bracey 20451082c1 Move SysTimer to platform, for non-RTOS use 2019-07-15 10:13:49 +03:00
David Saada fb3559d841 PSA storage: Conform to "PSA 1.0.0" spec release
- Add the no confidentiality & no replay protection flags
- Add actual size parameter in PS/ITS get APIs
- Change a few size parameters from uint32_t to size_t
2019-07-14 18:50:47 +03:00
Evelyne Donnaes 2d6db332e6
Merge pull request #11010 from jeromecoutant/PR_ASYNCSPI
FPGA SPI: ASYNC issue
2019-07-12 16:34:42 +01:00
Filip Jagodzinski 74be850126 Test: FPGA shield: Extend the GPIO HAL API tests 2019-07-12 14:01:57 +02:00
Kevin Bracey d53bd6120d
Merge pull request #10274 from kjbracey-arm/atomic_template
Add Atomic<T> template
2019-07-12 14:26:03 +03:00
Arto Kinnunen 237ad40093
Merge pull request #10963 from devran01/pr/10888/fix
PSA TESTS: Include mbedtls/config.h before evaluating MBEDTLS_PSA_CRYPTO_C
2019-07-11 15:49:57 +03:00
jeromecoutant ef845c8ca8 FPGA: remove 4 and 12 bits size support 2019-07-10 16:20:40 +02:00
Steven Cooreman f6a70b2028 Increase ADC test tolerance to 5%
During the SiP workshop, we discovered that 3% is too narrow due to a combination of:
Voltage rail differences between target and FPGA
Extension of lesser-resolution ADC's to 16-bit results
2019-07-10 14:12:46 +01:00
Russ Butler 8fffb94be2 Remove FPGA analog out test
Remove the analog out test temporarily due to limitations of the
FPGA rev 2 hardware.
2019-07-10 07:39:30 +01:00
Chun-Chieh Li 81dd2aa787 Fix mbed_hal-watchdog failing with OOM
This is to fix OOM error on targets with just 16KiB RAM.
2019-07-10 14:32:03 +08:00
Chun-Chieh Li debc38fd27 Fix mbed_drivers-watchdog failing with OOM
This is to fix OOM error on targets with just 16KiB RAM.
2019-07-10 14:31:33 +08:00
jeromecoutant d14d934f8d FPGA SPI: ASYNC issue 2019-07-10 00:30:13 +02:00
jeromecoutant fc84ef874c FPGA PWM: wait 1 period before measurement 2019-07-09 22:41:27 +02:00
jeromecoutant cf75b39e04 FPFA I2C: correct init bloc number 2019-07-09 22:35:22 +02:00
Kevin Bracey c9faf244ea Test Atomic<T> with user T 2019-07-09 19:09:02 +03:00
Kevin Bracey e2f65ec4a9 Make atomic test use Atomic<T>
Make the atomic functional test use `Atomic<T>` rather than the
standalone functions - this then tests both layers simultaneously.
2019-07-09 19:09:02 +03:00
Filip Jagodzinski ed41994a3a Test: HAL: serial: Add DEVICE_SERIAL_FC guards
Fix undefined references to serial_set_flow_control.
2019-07-09 13:21:42 +02:00
Martin Kojtal ee5b6d2c74
Merge pull request #10976 from vmedcy/tests-mbed_drivers-ticker
Fix error in tests-mbed_drivers-ticker when LED2 is not connected
2019-07-09 08:33:25 +01:00
Martin Kojtal 358046e472
Merge pull request #10989 from mprse/spi_fpga_basic_test_ext
SPI FPGA test extension + SPI driver fix (K64F)
2019-07-08 20:42:47 +01:00
Devaraj Ranganna 7ead3fedb8 Include psa/crypto.h instead of mbedtls/config.h.
Signed-off-by: Devaraj Ranganna <devaraj.ranganna@arm.com>
2019-07-08 16:28:58 +01:00
Arto Kinnunen cd4283e5fb
Merge pull request #10977 from vmedcy/tests-mbedmicro-rtos-mbed-malloc
Fix out-of-bounds array access in tests-mbedmicro-rtos-mbed-malloc
2019-07-08 16:39:22 +03:00
Przemyslaw Stekiel 6490ac75d8 FPGA SPI test: Fix typo 2019-07-08 15:23:21 +02:00
Przemyslaw Stekiel 6112ca8c64 FPGA SPI test: Fix unsupported transfer case
Co-Authored-By: Filip Jagodziński <fkjagodzinski@gmail.com>
2019-07-08 14:54:33 +02:00
Przemyslaw Stekiel 17d5e6d00a Extend FPGA SPI test
Add test cases for:
- async mode,
- different frequencies,
- block write
2019-07-08 14:54:33 +02:00
Martin Kojtal 1c91d03d9b
Merge pull request #10975 from fkjagodzinski/fix-fpga_ci_test_shield-tests
Restrict FPGA tests to Arduino form factor
2019-07-08 13:47:55 +01:00
Russ Butler e74e3dd124 FPGA test shield: Allow any defined form factor
Build in the FPGA tests if either MBED_CONF_TARGET_DEFAULT_FORM_FACTOR
or TARGET_FF_ARDUINO is defined.
2019-07-08 09:42:30 +02:00
Russ Butler d5cc17ff8c Skip form factor pins marked as NC
The gpio and gpio_irq FPGA tests run on form factor pins that are
marked as NC. This patch changes that behavior so they skip NC
pins.
2019-07-05 16:54:38 -05:00
Neil Tuttle 81f85296e8 Fix out-of-bounds array access in tests-mbedmicro-rtos-mbed-malloc 2019-07-05 14:33:40 +01:00
Neil Tuttle 09b8d7fc5b Fix error in tests-mbed_drivers-ticker when LED not available 2019-07-05 14:26:15 +01:00
Filip Jagodzinski d425dc9ba4 FPGA test shield: Restrict tests to Arduino FF only
Currently only the Arduino form factor is supported. Support for other
form factors will be added in the future.
2019-07-05 14:51:18 +02:00
Martin Kojtal c709955aff
Merge pull request #10820 from mprse/bring_fpga_tests_master
Bring FPGA-Test-Shield tests into Mbed-os master.
2019-07-04 15:02:21 +01:00
Devaraj Ranganna 6e590cd3e7 Include mbedtls/config.h before evaluating MBEDTLS_PSA_CRYPTO_C
Signed-off-by: Devaraj Ranganna <devaraj.ranganna@arm.com>
2019-07-04 16:44:19 +03:00
Przemyslaw Stekiel d2d3d5f35d FPGA uart test: Remove unsupported test cases
Not all uart features are supported by specific platforms.
2019-07-04 14:55:02 +02:00
Przemyslaw Stekiel 879d8917c4 FPGA Analogin test: Remove test case which can not be executed
The test case which checks full range cannot be executed at the moment due to a hardware bug in FPGA-Test-Shield.
This test case will be restored when the final version of FPGA-Test-Shield is ready.
2019-07-04 13:52:19 +02:00
Martin Kojtal ccb63d771e
Merge pull request #10857 from ARMmbed/feature-watchdog
Add Watchdog and ResetReason
2019-07-03 11:43:52 +01:00
Przemyslaw Stekiel c016f2ab76 FPGA Analogout test: mark dead code as debug code, increase tolerance 2019-07-03 12:34:22 +02:00
Przemyslaw Stekiel 852456006b FPGA Analogin test: Remove usage of FULL_TEST_SHIELD symbol, increase tolerance
Keep "AnalogIn - full test" disabled due to hardware issue in the first rev of FPGA Test Shield.
2019-07-03 12:27:25 +02:00
Przemyslaw Stekiel 261e67b687 FPGA I2C test update.
Divide one test case to four test cases to increase readability.
Adapted to the last version of the FPGA CI Test Shield API.
2019-07-03 10:23:06 +02:00
Filip Jagodzinski b89eeb7ec5 Test: Watchdog: Fix test_restart case
Watchdog::stop() is called in this test. If the target does not support
stopping the watchdog this case needs to be skipped.
Also improve handling ignored test cases.
2019-07-02 12:46:23 +01:00
Filip Jagodzinski 9e2a1816bb Test: Watchdog: Fix astyle errors 2019-07-02 12:46:23 +01:00
Filip Jagodzinski 7ab0a35fdf Test: WatchdogManager: Remove tests
This component no longer exists in Mbed OS.
2019-07-02 12:46:23 +01:00
Filip Jagodzinski a5ad5e04ca Test: Watchdog: Add new driver tests 2019-07-02 12:46:23 +01:00
Martin Kojtal 85c477c1dc
Merge pull request #10609 from kjbracey-arm/us_ticker_optimise
wait_us optimization
2019-06-28 14:29:00 +01:00
Martin Kojtal dfdf70b873
Merge pull request #10767 from maciejbocianski/msd_test_windows_unmount_fix
usb_device-msd test: fix powershell unmount script issue
2019-06-28 14:24:53 +01:00
Martin Kojtal a2c9152441
Merge pull request #10700 from LMESTM/hal_sleep_manager_test_update
Update HAL Sleep manager test to cope with STM32 LPTIM HW
2019-06-28 13:19:10 +01:00
Filip Jagodzinski e2ba0bb533 ResetReason: Update the header file
Minor doxygen fixes.
2019-06-26 09:58:24 +01:00
Martin Kojtal e40a76575f watchdog: fix copyright 2019-06-26 09:43:21 +01:00
Filip Jagodzinski 4e35e368b2 Test: watchdog_mgr: Remove dead code 2019-06-26 09:09:59 +01:00
Filip Jagodzinski 94181a9930 Test: update reset_reason driver test
Update the watchdog timing requirements:
1. The watchdog should trigger at, or after the timeout value.
2. The watchdog should trigger before twice the timeout value.

Use a SERIAL_FLUSH_TIME_MS value consistent with other tests.
2019-06-26 09:09:59 +01:00
Filip Jagodzinski ee202dafd8 Test: update HAL watchdog-timing test
Update the watchdog timing requirements:
1. The watchdog should trigger at, or after the timeout value.
2. The watchdog should trigger before twice the timeout value.
2019-06-26 09:09:59 +01:00
Filip Jagodzinski 81898af2b5 Test: update HAL watchdog-reset test
Update the watchdog timing requirements:
1. The watchdog should trigger at, or after the timeout value.
2. The watchdog should trigger before twice the timeout value.
Remove explicit calls to sleep.
2019-06-26 09:09:59 +01:00
Filip Jagodzinski 777a863ac8 Test: update HAL watchdog test
Update the watchdog timing requirements:
1. The watchdog should trigger at, or after the timeout value.
2. The watchdog should trigger before twice the timeout value.
2019-06-26 09:09:59 +01:00
Filip Jagodzinski 68e536b368 Test: update HAL reset_reason test
Update the watchdog timing requirements:
1. The watchdog should trigger at, or after the timeout value.
2. The watchdog should trigger before twice the timeout value.
2019-06-26 09:09:59 +01:00
Maciej Bocianski b4138d1102 usb_device-msd test: OS type detection fix 2019-06-24 22:12:20 +02:00
Filip Jagodzinski 8d8383b23c 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-06-24 18:24:01 +02:00
Maciej Bocianski 60ef4a0854 usb_device-msd test: astyle fix 2019-06-19 15:37:09 +02:00
Laurent Meunier 8476be6285 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-06-19 15:33:34 +02:00
Maciej Bocianski 855a6ddbfd usb_device-msd test: docs update 2019-06-19 15:10:33 +02:00
Maciej Bocianski 4378c141df usb_device-msd test: disable host side unmount on windows machines 2019-06-19 14:32:21 +02:00
Maciej Bocianski f6d6863c1f usb_device-msd test: improve error handling 2019-06-19 14:32:21 +02:00
Maciej Bocianski 18285168fd 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-06-19 14:32:20 +02:00
Anna Bridge 2a7635f536
Merge pull request #10782 from d-kato/rza1_armc6
GR_LYCHEE,RZ_A1H,VK_RZ_A1H: Fix greentea test failure with ARMC6
2019-06-19 12:33:28 +01:00
Anna Bridge fe6f458222
Merge pull request #10744 from LMESTM/Fix_sysTimerTest
Fixes in Sys Timer test
2019-06-19 12:23:57 +01:00
Anna Bridge aa9bd486d5
Merge pull request #10688 from fkjagodzinski/test_update-docs-usb
Add a top level README file for USB tests
2019-06-19 12:21:39 +01:00
Anna Bridge d8c17b5fab
Merge pull request #10536 from mprse/stm_lptim_issue
Changes required by the ST low power ticker wrapper.
2019-06-19 12:08:21 +01:00
Laurent Meunier d6c3d79a9d Increase DEEP_SLEEP_TEST_CHECK_WAIT_DELTA_US
now that sleep_manager_can_deep_sleep_test_check() is based on wait_ns
2019-06-19 11:00:33 +02:00
Przemyslaw Stekiel d577e7f186 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-06-18 18:06:02 +02:00
Anna Bridge 14b77c9a2e
Merge pull request #10776 from tymoteuszblochmobica/echotest
UDPSOCKET_ECHOTEST_NONBLOCK performance improvement.
2019-06-18 16:35:17 +01:00
Filip Jagodzinski c5ad70c1e5 Tests: Watchdog: Update timing test
Skip test cases with unsupported timeout values.
2019-06-14 10:59:06 +02:00
Filip Jagodzinski d634862a09 Tests: Watchdog: Decrease default timeout to 100 ms 2019-06-14 10:59:06 +02:00
Filip Jagodzinski c29cdab079 Tests: Watchdog: Update test case teardown
Added a mechanism which will prevent an initialised watchdog from
resetting the device during final greentea communication.
This allows testing watchdog timeouts as short as 50 ms.
2019-06-14 10:59:06 +02:00
Kevin Bracey 57310729d4 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-06-14 10:22:08 +03:00
Laurent Meunier 83e274a82c Remove unused variable
and avoid associated warning ...
2019-06-13 16:47:02 +02:00
Przemyslaw Stekiel cd0ad518cc Bring FPGA-Test-Shield tests into Mbed-os master. 2019-06-13 13:43:25 +02:00
Filip Jagodzinski 98708d1041 Tests: Update Watchdog Manager test
Update the watchdog timing requirements:
1. The watchdog should trigger at, or after the timeout value.
2. The watchdog should trigger before twice the timeout value.
2019-06-11 10:52:47 +02:00
Martin Kojtal fbcae489a0
Merge pull request #10762 from mprse/reenable_tests
Disable only time drifting test cases and fix GREENTEA_SETUP() call in tests
2019-06-11 07:35:41 +01:00
Laurent Meunier 24203fc42b Fix compilation issue for targets without LPTICKER or USTICKER 2019-06-10 18:03:04 +02:00
Tymoteusz Bloch c22350589d UDPSOCKET_ECHOTEST_NONBLOCK performance improvement. 2019-06-10 11:20:12 +02:00
Martin Kojtal 3c2dd9ca89
Merge pull request #10761 from jarvte/fix_nwinterface_statustest
Fix networkinterface non-blocking status test
2019-06-09 18:21:15 +01:00
Martin Kojtal dd77957d45
Merge pull request #10665 from tymoteuszblochmobica/json
Add hardcoded Echo server defaults for Greentea socket tests.
2019-06-09 18:05:03 +01:00
Martin Kojtal dc77c40fe9
Merge pull request #10709 from LDong-Arm/nrf52_cordio
Default to Cordio BLE stack for NRF52* targets
2019-06-09 18:03:34 +01:00
Martin Kojtal a2c029404b
Merge pull request #10437 from OpenNuvoton/nuvoton_psa_exclude_test
PSA: Exclude mbed-hal-spm test for M23 target
2019-06-07 17:19:27 +01:00
Laurent Meunier d4db0f30c7 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-06-07 16:37:44 +02:00
d-kato 4eca482061 tests-mbed_drivers-crc: Increase the task stack 2019-06-07 11:07:59 +09:00
Przemyslaw Stekiel 86dab2f9fa Disable time drifting test cases.
Time drifting test cases use serial communication with the host and are unstable on CI.
Skip time-drifting test cases if SKIP_TIME_DRIFT_TESTS macro is defined.
The idea for the future is to use FPGA test shield for timing tests instead of host scripts.

Also remove `__ARM_FM` macro which in most cases was used to disable time drifting tests. In other cases replace `__ARM_FM` with `TARGET_ARM_FM` which is more suitable.
2019-06-06 21:48:04 +02:00
Teppo Järvelin 2b9e1f3982 Fix networkinterface non-blocking status test
Fix was to add some time between iterations connect-disconnect.
In cellular disconnect, cellular network may send disconnect events
and if those events come when connect is already ongoing test will fail.
So wait a bit after disconnect so that disconnect events should be over.
2019-06-06 09:04:44 +03:00
Przemyslaw Stekiel c325dbc695 Fix GREENTEA_SETUP() call in not time drifting tests.
In these tests GREENTEA_SETUP() is incorrectly called with "timing_drift_auto" instead of "default_auto".
2019-06-05 13:32:13 +02:00
Lingkai Dong 977eea4447 critical_section tests: do not check APP interrupts on NRF52
APP interrupts are masked on SoftDevice BLE stack only, but we
have switched to Cordio stack on NRF52 targets.
2019-06-05 09:53:53 +01:00
Maciej Bocianski 90fbab0419 hal_qspi_test: undo buggy code
Remove some buggy code introduced to hal_qspi_test by PR #10435
Added support for QSPI to Cypress Boards
a8570ffe6c
2019-06-04 14:14:21 +02:00
Filip Jagodzinski 19272b7a1c Tests: ResetReason: Use the HAL watchdog API
The Watchdog driver has been updated making this test incompatible
with the new API. Use HAL API instead.
2019-06-03 16:32:15 +02:00