Commit Graph

165 Commits (f16cdf45d91b5fd0fc1a3c1e9d43beb51b8bf235)

Author SHA1 Message Date
Przemyslaw Stekiel 12a0446dab tests-mbed_hal-sleep: add message with failure details 2018-10-08 15:18:50 +01:00
Przemyslaw Stekiel 4a35dcb7dd tests-mbed_hal-sleep: finish UART transmission before sleep test
There is no problem with this test during the morph, but some issue has been noticed while testing new Jenkins CI in Oulu on NRF52_DK.
I was able to reproduce the issue locally. The difference between morph and local run is that CPU statistics are enabled on morph. This makes the difference and test passes.

The sleep test case perform sleep for 100 us, 200 us, ... ,1000 us in loop (us ticker wakes the board) and verifies if sleep time matches the assumption.
I got the following results:

sleep                 wake-up after
100 us                   ~100 us    ok
200 us                   ~200 us    ok
300 us                   ~300 us    ok
400 us                   ~400 us    ok
500 us                   ~14 us     (??)

When requested sleep time is equal to 500 us some unexpected interrupt occurs which wakeup the board and force the test to fail.
Register state just after exit from sleep:
Control and State Register: 0x00400000 (ISRPENDING - Interrupt pending flag is set).
NVIC Interrupt Set-pending Register[0]: 0x00000004 (UARTE0_UART0_IRQn) or 0x00000200 (TIMER1_IRQn - timer used by us ticker).

UART interrupt is generated because of green-tea transmission. We know that it is performed while test is executed since we need to wait before going into deep-sleep since otherwise the transmission will be broken. So to take care of UART interrupt we need to wait before sleep test in the same way like it is done in deep-sleep test.
2018-10-08 15:18:50 +01:00
Amir Cohen aa01c2ea75 Fix print error 2018-10-08 15:18:50 +01:00
Yossi Levy 59d258722a Adding complete buffer print in case of failure. 2018-10-08 15:18:50 +01:00
Amir Cohen 3ad5eca9df Fix trng_len loop 2018-10-08 15:18:50 +01:00
Amir Cohen b31b0fae29 Remove NVstore unused mechanism 2018-10-08 15:18:50 +01:00
David Saada e39e964e86 Fix TRNG test to use reset from python script and not from code 2018-10-08 15:18:50 +01:00
Amir Cohen 11cca7545a Fix messages 2018-10-08 15:18:50 +01:00
Amir Cohen df1c9b9d92 Fix pithy library 2018-10-08 15:18:50 +01:00
Amir Cohen 7140baecad Fix Compilation problems 2018-10-08 15:18:50 +01:00
Amir Cohen 9a4087ce52 Fix IAR issues 2018-10-08 15:18:50 +01:00
Amir Cohen 42d6d7dca0 Erase debug prints 2018-10-08 15:18:50 +01:00
Amir Cohen e9dc151bdd Reduce Debug prints 2018-10-08 15:18:50 +01:00
Amir Cohen 2c43d412b3 Fixing PR comments 2018-10-08 15:18:50 +01:00
Amir Cohen 91d0c1b1e3 Fix var declaration problem 2018-10-08 15:18:50 +01:00
Amir Cohen bced8d9dd9 Repalce compression libs for license issues 2018-10-08 15:18:50 +01:00
Amir Cohen 1aa1682d8c Fix lisence and style 2018-10-08 15:18:50 +01:00
Amir Cohen f8f67e29fc Add TRNG API test 2018-10-08 15:18:50 +01:00
ccli8 203e87ba61 Fix Greentea test common_tickers failed
1. Disable ticker interrupt which would interfere with fire_interrupt speed test
2. Enlarge test period to avoid timeout error
2018-10-08 15:18:50 +01:00
Maciej Bocianski f3fee59972 qspi_hal_test - adjust used memory sector count
set flash sector count to 1024 for EFM32GG11_STK3701(MX25R3235F)
set flash sector count to 2048 for NRF52840_DK(MX25R6435F)
2018-10-08 15:18:50 +01:00
Maciej Bocianski 51cac63eeb fix qspi address sending for nrf52
fix address sending in qspi_command_transfer
now address is send MSB first
2018-10-08 15:18:50 +01:00
Maciej Bocianski 05062bef52 qspi_hal_test - remove unused variables 2018-10-08 15:18:50 +01:00
Maciej Bocianski 325ad8179d qspi_hal_test - randomize flash RW addres
randomize flash address during test to extend flash life
2018-10-08 15:18:50 +01:00
Maciej Bocianski 71f473a45b qspi_hal_test add DPI and QPI support 2018-10-08 15:18:50 +01:00
Maciej Bocianski 0c15c30194 qspi_hal_test refactoring
- code refactoring and preparation for enabling DPI/QPI tests
- reduced multiple test count to 4
- use common flash config header for all MX25RXX35F chips
- fix sector erase max time on N25Q128A
2018-10-08 15:18:50 +01:00
Cruz Monrreal 91354184dc
Merge pull request #7825 from SiliconLabs/siliconlabs-qspi
Silicon Labs QSPI HAL implementation
2018-08-27 13:51:38 -05:00
Martin Kojtal a24cecfc94
Merge pull request #7805 from jamesbeyond/fm_test
Skip Greentea tests for Mbed OS code coverage on Fast Models
2018-08-27 10:39:43 +02:00
Martin Kojtal ce28c91405
Merge pull request #7534 from bentcooke/mote_L152_en_os5
enable MOTE_L152 for OS5
2018-08-27 10:27:36 +02:00
Steven 845a5beb30 Initial commit of Silicon Labs QSPI HAL implementation
* For EFM32GG11, since that is the only Silicon Labs target with QSPI per today
* Verified working using the on-board flash and tests-mbed_hal-qspi
2018-08-27 10:03:08 +02:00
Maciej Bocianski 9a41043c0b adjust hal QSPI test to new pin names 2018-08-24 12:40:59 +02:00
Qinghao Shi c9ac4868ac move test skipping macro for FastModels to top of the test 2018-08-23 22:30:55 +01:00
Ben Cooke 42a49a5022 Increase max func exec time to allow slower sys clock 2018-08-22 11:49:26 -05:00
Maciej Bocianski 883ea2f1d1 astyle fixes on QSPI API/driver/tests 2018-08-22 15:02:15 +02:00
Maciej Bocianski c94f22c7ad mbed_hal-qspi test code refactoring after PR 7783 review
- refactoring of status/config register logging code,
- make QspiCommand a class,
2018-08-22 15:02:14 +02:00
Maciej Bocianski e6923342ef hal-qspi test: add F413ZH support 2018-08-22 15:02:12 +02:00
Maciej Bocianski 948d1a3013 hal-qspi test: code refactoring 2018-08-22 15:02:12 +02:00
Maciej Bocianski 893cf2a5f5 hal-qspi_test: remove STM workaround
after feature-qspi branch rebase, everything works fine and workaround is not needed anymore
2018-08-22 15:02:10 +02:00
Maciej Bocianski e5e05df66c hal-qspi test: fix QSPI preprocessor guard 2018-08-22 15:02:07 +02:00
Maciej Bocianski de46a547fa hal-qspi test refactoring
Main idea of introduced changes is to ease adding support for new flash chips
Major changes:
- move implementation of all memory chip specific functions to memory config file (no weak functions)
- add support for 1-2-2 write
2018-08-22 15:02:06 +02:00
Maciej Bocianski 443273785f add hal-qspi test 2018-08-22 15:02:06 +02:00
Russ Butler 00b8e24446 Fix rollover handling in ticker frequency test
To handle timer rollovers the test tests-mbed_hal-common_tickers_freq
calls intf->set_interrupt(0). For this to work correctly the ticker
implementation must fire an interrupt on every rollover event though
intf->set_interrupt(0) was called only once. Whether an interrupt will
fire only once or multiple times is undefined behavior which
cannot be relied upon.

To avoid this undefined behavior this patch continually schedules an
interrupt and performs overflow detection on every read. This also
removes the possibility of race conditions due to overflowCounter
incrementing at the wrong time.
2018-08-17 11:59:01 -05:00
Russ Butler f68958df4e Fix tests to work with LPTICKER_DELAY_TICKS
Fix the HAL common_tickers and sleep tests so they work correctly when
the define LPTICKER_DELAY_TICKS is set.
2018-08-17 11:58:55 -05:00
Qinghao Shi 891c4ed244 Skip time drifting test on FastModels targets
FastModels targets are simulator running on the x86 hosts.
As the nature of non-RealTime x86 OS and FastModels, timing accuracy is not guaranteed
So skipping the time drifting tests on FastModel targets
2018-08-17 17:46:28 +01:00
Russ Butler 472ababfef Update deep sleep lock check in tests
When the define LPTICKER_DELAY_TICKS is set deep sleep can be randomly
disallowed when using the low power ticker. This is because a Timer
object, which locks deep sleep, is used to protect from back-to-back
writes to lp tickers which can't support that. This causes tests which
assert that deep sleep is allowed to intermittently fail.

To fix this intermittent failure this patch adds the function
sleep_manager_can_deep_sleep_test_check() which checks if deep sleep
is allowed over a duration. It updates all the tests to use
sleep_manager_can_deep_sleep_test_check() rather
than sleep_manager_can_deep_sleep() so the tests work even if deep
sleep is spuriously blocked.
2018-08-17 09:29:41 -05:00
Russ Butler 1bbf43ad38 Add test for ticker suspend and resume
Unit test the functions ticker_suspend and ticker_resume.
2018-08-17 09:29:40 -05:00
Przemyslaw Stekiel 20f3d87283 tests-mbed_hal-common_tickers: disable ticker free test cases.
This is solution to issue #7724.

Ticker free tests have been removed since ticker free function has been implemented only for CI boards.
Implementation for the remaining platforms will be done on feature branch feature-hal-ticker-free.
2018-08-09 14:27:05 +02:00
Martin Kojtal 5f3923250c crc test: manual fix cases
Leave as it is for readability
2018-08-03 11:24:31 +01:00
Martin Kojtal e52bb68f93 tests: astyle fix
All tests should comply to our coding standard now
2018-08-03 10:23:38 +01:00
Przemyslaw Stekiel 2fe6b98922 tests-mbed_hal-common_tickers: use low level ticker API for time measuring.
In `ticker speed` test case execution time of ticker API functions is measured using Timer object. Test replaces original ticker handler for testing purposes, so test should not relay on higher level ticker based features(like Timer).
Use low level ticker API for time measuring.
2018-08-02 15:24:29 +02:00
Przemyslaw Stekiel 239ce02142 tests-mbed_hal-common_tickers: add ticker_free() functional tests. 2018-07-25 08:54:51 +02:00