Commit Graph

16404 Commits (f55f9d36fbab96628f6b8ad7141b20ceb25483d3)

Author SHA1 Message Date
Przemyslaw Stekiel f55f9d36fb lp_ticker test - provide lp ticker glitch test case
Test that lp ticker does not glitch backwards due to an incorrectly implemented ripple counter driver.
2018-05-25 12:18:55 -05:00
Przemyslaw Stekiel b7fdf60f29 Skip higher level ticker tests for targets with stale ticker target specific drivers.
Since target specific ticker drivers are not ready also features which uses ticker in upper layers may not work correctly and tests for these features.
We need to disable also failing higher level ticker related tests (by adding check if DEVICE_USTICKER symbol is available and raise #error [NOT_SUPPORTED] if not).

Note:
tests-mbed_drivers-rtc is new and uses us ticker to perform a delay.
2018-05-25 12:18:55 -05:00
Przemyslaw Stekiel 6d7aef6bf1 lp_us_tickers test - fix count_ticks() function to give the same results on all compilers
count_ticks() function counts ticker ticks elapsed during execution of N cycles of empty while loop.
In current version N value (cycles) is given as volatile paramater in order to disable possible compiler optimalisation.
There was a problem with measured time on different compilers and additionally results on ARM compiler were unexpected (the difference beetween measured elapsed ticks for the same number of cycles was to large). This might be caused by the memory access in order to store updated variable in memory. To fix this issue given numer of cycles has been stored into register and register is decremented (no memory access).

With this fix count_ticks(NUM_OF_CYCLES, 1) call returns 2500 +/-1 for us ticker ticks using each compiler (K64F).
2018-05-25 12:18:55 -05:00
Przemyslaw Stekiel c4cf1f1eae lp_us_tickers test - add tolerance to interrupt time.
On some platforms (e.g. K64F) different counters are used for time measurement and interrupt generation.
Because of that we should relax interrupt test case and give additional time before checking if interrupt handler has been executed.
2018-05-25 12:18:55 -05:00
Przemyslaw Stekiel e0fcce592c lp_us_tickers test - provide counter overflow protection
Since according to the ticker requirements min acceptable counter size is 12 bits (low power timer) for which max count is 4095, then all test cases must be executed in this time window.
HAL ticker layer handles overflow and it is not handled in the target ticker drivers.
2018-05-25 12:18:55 -05:00
Przemyslaw Stekiel 39852f772c Adapt K64F lp ticker driver to the new standards.
Low power ticker time counter is created based on RTC which is driven by 32KHz clock. Additional low power timer is used to generate interrupts.
We need to adapt driver to operate on ticks instead of us.

Perform the following updates:
- provide lp ticker configuration: 32KHz/32 bit counter.
- lp_ticker_init() routine disables lp ticker interrupts .
- adapt the driver functions to operate on ticks instead us.
- adapt comments.
- add us_ticker_free() routine.
2018-05-25 12:18:55 -05:00
Przemyslaw Stekiel c4bd9d125b Adapt K64F us ticker driver to the new standards.
- provide ticker configuration: 1MHz/32 bit counter.
- us_ticker_init() routine disables interrupts.
- adapt comments.
2018-05-25 12:18:55 -05:00
Przemyslaw Stekiel d96430e77d Enable ticker support for K64F board. 2018-05-25 12:18:55 -05:00
Steven Cartmell 18943a9693 Add lp/us ticker free() function implementation for NRF5 2018-05-25 12:17:49 -05:00
Steven Cartmell 2894152efe Add free function to lp/us ticker HAL API 2018-05-25 12:17:49 -05:00
Przemyslaw Stekiel 9d84143276 Provide fix to the implementation of ticker_overflow_test test case.
The intention was to use ticker_overflow_delta equal to 0 for low power ticker tests and ticker_overflow_delta equal to 50 for high frequency ticker tests. Current implementation is invalid since for devices which provide LOW_POWER_TIMER feature delta is equal to 0 and for devices without this feature delta is equal 50.
2018-05-25 12:17:49 -05:00
Przemyslaw Stekiel 1bd2e517a0 Modify ticker_init_test() to be consistent with the new requirement. 2018-05-25 12:17:49 -05:00
Przemyslaw Stekiel a8eee0fb1a Modify requirement for the ticker_init function.
Current version:
The function ticker_init resets the internal count and disables the ticker interrupt.

Proposed version:
The function ticker_init allows the ticker to keep counting and disables the ticker interrupt.

This is a result of the following discussion:
https://github.com/ARMmbed/mbed-os/pull/5233#pullrequestreview-86677815
2018-05-25 12:17:49 -05:00
Przemyslaw Stekiel 7227670416 Skip higher level ticker tests for targets with stale ticker target specific drivers.
Since target specific ticker drivers are not ready also features which uses ticker in upper layers may not work correctly and tests for these features.
We need to disable also failing higher level ticker related tests (by adding check if DEVICE_USTICKER symbol is available and raise #error [NOT_SUPPORTED] if not).
2018-05-25 12:17:49 -05:00
Przemyslaw Stekiel ebeab7f462 Add DEVICE_RTC symbol check in RTC source files for NCS36510 target. 2018-05-25 12:17:20 -05:00
Przemyslaw Stekiel d429458ac7 Disable boards which does not fulfil new ticker standards. 2018-05-25 12:17:19 -05:00
Przemyslaw Stekiel 0ae7b82c07 Add minor modifications of lp/us tickers tests desctiption in ticker header files.
Add one potential bug to the test description.
Fix test function names to be consistant with desctiption and test header.
Fix typos.
2018-05-25 12:04:32 -05:00
Przemyslaw Stekiel c32ccf69b1 Add tests for ticker HAL API. 2018-05-25 12:04:32 -05:00
Russ Butler 03d7141797 Add documentation for the HAL Ticker API
Add documentation and test header for the HAL Ticker API.
2018-05-25 12:04:32 -05:00
Bartek Szatkowski 9f3f49aea9 Remove sleep from rf52 due to failig tests 2018-05-25 12:04:32 -05:00
TomoYamanaka 7a48ee89e3 Implementation of SLEEP feature for Renesas mbed boards
I implemented the SLEEP feature for Rnesas mbed boards.
The mainly changing is here.
- hal_sleep()
  To satisfy the mbed specificationm, I implemented this function newly by using "sleep" that is one of low power mode that is incorporated in our hardware(RZ_A1).
  In the "sleep", peripheral and memory state are maintained, and the peripherals continue to work and can generate interrupts.

- hal_deepsleep()
  To satisfy the mbed specificationm, I implemented this function newly by combined using "sleep" and "module standby" that is the low power mode that is incorporated in our hardware(RZ_A1).
  The "module standby" is peripheral module's powerdown.
  Also in case of our "module standby", it need to read register as dummy when access to each register.
2018-05-25 12:04:32 -05:00
Przemyslaw Stekiel 785e5d30a2 Disable `tests-mbed_drivers-timeout` test if USTICKER support is disabled (NRF52_DK). 2018-05-25 12:04:32 -05:00
Przemyslaw Stekiel 48a769dbb3 Disable `tests-mbed_drivers-timerevent` test if USTICKER support is disabled. 2018-05-25 12:04:32 -05:00
Przemyslaw Stekiel 2b7d7a822b tests-mbedmicro-rtos-mbed-systimer: execute sleep/deepsleep test cases only when SLEEP support is enabled. 2018-05-25 12:04:32 -05:00
Przemyslaw Stekiel 58afcc2904 Disable SLEEP support for MAX32630FTHR and KW41Z platforms.
These platforms are not consistent with the new sleep standards.
2018-05-25 12:04:32 -05:00
Przemyslaw Stekiel 1df54efc61 ARM_CM3DS_MPS2: add protection to lp_ticker.c.
Compile this file only when DEVICE_LOWPOWERTIMER is defined.
2018-05-25 12:04:32 -05:00
Przemyslaw Stekiel f226ae2fc9 tests-mbed_hal-sleep: decrease delay when testing if us ticker is disabled in deep-sleep mode.
This is done because of possible limitations of lowpower ticker freq/width.
2018-05-25 12:04:32 -05:00
Przemyslaw Stekiel 996374e4dc tests-mbed_hal-sleep: fix formatting. 2018-05-25 12:04:32 -05:00
Przemyslaw Stekiel 7f56bb0c23 tests-mbed_hal-sleep: remove unused variable. 2018-05-25 12:04:32 -05:00
Przemyslaw Stekiel 20a9da5b73 tests-mbed_hal-sleep: use lp ticker data while testing deepsleep. 2018-05-25 12:04:32 -05:00
Przemyslaw Stekiel 160c75d099 tests-mbed_hal-sleep: add lp/us ticker overflow handling. 2018-05-25 12:04:32 -05:00
Przemyslaw Stekiel 3cd3defbba Disable boards which does not fulfil new sleep standards.
These boards will be re-enabled when sleep driver for them is ready.

Note:
This operation is done by removing "SLEEP" feature from target's "device_has" list (in targets.json config file).
For NRF52_DK removing of "SLEEP" feature causes some timing issues which have influence on tests. In order to successfully disable this board we need to disable also related features like "USTICKER", "LOWPOERTIMER" and slightly modify ticker tests, so they will not be executed if usticker support is not available (by default all targets support us ticker).
2018-05-25 12:04:32 -05:00
Przemyslaw Stekiel b2d3338ad7 Add test and test header to Sleep HAL API. 2018-05-25 12:03:37 -05:00
Przemyslaw Stekiel be98bc003e Add Sleep test specification to sleep_api.h. 2018-05-25 12:03:37 -05:00
Martin Kojtal b7682183b8 Sleep: add time requirements for sleep
Sleep - within 10us
Deepsleep - within 10ms

Note about mbed boards with interface, moved to lpc176x, as they are target related,
should be documented in the target documentation.

The tests will come as separate PR, to conform to this updates to sleep API.
2018-05-25 12:03:37 -05:00
Cruz Monrreal c0895cb832
Merge pull request #6910 from hasnainvirk/metadata
LoRaWAN: Adding acquisition of metadata, backoff and a cancel_send() API
2018-05-25 11:11:50 -05:00
Cruz Monrreal 5371c10735
Merge pull request #6708 from scartmell-arm/feature-hal-hardware-crc
Add Hardware CRC HAL API specification
2018-05-25 10:38:41 -05:00
Martin Kojtal 7031ab1c1f
Merge pull request #7015 from SeppoTakalo/fix_odin
Fix build for MBT_ODIN_W2 and MBED_CONNECT_ODIN when using WiFi
2018-05-25 16:29:54 +02:00
Cruz Monrreal 61eb0e170d
Merge pull request #7012 from ARMmbed/AnotherButler-patch-1
Enable DeviceKey class reference for Doxygen
2018-05-25 08:25:17 -05:00
Cruz Monrreal a348b4583d
Merge pull request #7000 from kfnta/uvisor_depr
Add warning about FEATURE_UVISOR being deprecated
2018-05-25 08:24:26 -05:00
Martin Kojtal 54ac90fb5a
Merge pull request #7003 from adbridge/master
Add devicekey example to examples list
2018-05-25 14:01:26 +02:00
Seppo Takalo f989f6838b Fix build for MBT_ODIN_W2 and MBED_CONNECT_ODIN when using WiFi
Odin WiFi driver was only supplied for EVK board.
These all are just the same module, so using the main target name
that all inherit.
2018-05-25 10:54:09 +03:00
Cruz Monrreal 25fb8e3cf0
Picking a deprecation warning and moving forward 2018-05-24 19:49:35 -05:00
Amanda Butler 44dc8624d5
Enable DeviceKey class reference for Doxygen
Add conditional, so Doxygen renders properly.
2018-05-24 18:59:12 -05:00
Cruz Monrreal 322c95c3a7
Limit devicekey example to only K64F
Lines up devicekey example with nvstore example
2018-05-24 17:38:02 -05:00
Cruz Monrreal 2eac96eb04
Merge pull request #6433 from cmonr/python3-in-travisci
Enabl-able Python 3 tools testing in Travis CI
2018-05-24 15:08:45 -05:00
Cruz Monrreal 5ce26b1306
Merge pull request #6927 from AriParkkila/cellular-debug
Cellular: AT debugging improved
2018-05-24 12:35:06 -05:00
Amanda Butler 824466d18c Copy edit crc_api.h
Copy edit file, mostly for American spelling and consistent tense across files.
2018-05-24 17:53:36 +01:00
Steven Cartmell 804d050a18 HAL CRC: Add additional STM32 targets 2018-05-24 17:53:35 +01:00
Steven Cartmell a92ac70e82 HAL CRC: Move STM32 implementation to common folder and add targets 2018-05-24 17:51:50 +01:00