Commit Graph

172 Commits (14d776f79e08d39b0ff5821fb645ae2ee2685ba3)

Author SHA1 Message Date
Filip Jagodzinski d1b66665df Tests: SleepManager: Fix sleep_auto test
Use us & lp tickers directly, without the common ticker layer.
2018-10-19 11:46:55 +01:00
Filip Jagodzinski 24767e48f1 Tests: Sleep: Extract test utility functions
Move a few of utility functions so other tests can use them.
2018-10-19 11:46:55 +01:00
Filip Jagodzinski b385dc2648 Tests: SleepManager: Update test_check() test
Increase delta to 500 us. This value is still short enough to detect
incorrect behavior of the sleep_manager_can_deep_sleep_test_check() fun,
but allows the targets with low LP timer accuracy to pass, i.e.
NUCLEO_F429ZI.
2018-10-19 11:46:55 +01:00
Filip Jagodzinski aa09d7bd57 Tests: SleepManager: Fix test suite setup
Use ticker init functions from upper HAL layer to allow proper handling
of ticker overflows.
2018-10-19 11:46:55 +01:00
Filip Jagodzinski a55ee97c2a Tests: SleepManager: Add test for new check() fun
sleep_manager_can_deep_sleep_test_check() is intended to be used in test
code.
2018-10-19 11:46:55 +01:00
Filip Jagodzinski dd710fade6 Tests: SleepManager: update concurrent test docs 2018-10-19 11:46:55 +01:00
Filip Jagodzinski 67638a039d Tests: SleepManager: extend test suite
New test cases:
* "deep sleep lock/unlock"
* "deep sleep unbalanced unlock"
* "deep sleep locked USHRT_MAX times"
* "deep sleep locked more than USHRT_MAX times"
* "sleep_auto calls sleep/deep sleep based on lock"
2018-10-19 11:46:55 +01:00
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