Commit Graph

10 Commits (4c94d78f1b07b96c0015968583196be65eb73159)

Author SHA1 Message Date
Przemyslaw Stekiel c437e9d2c6 tests-mbed_hal-rtc_reset: Add ack from the device after each command is executed
RTC reset test was failing when board has been just powered and RTC reset test was executed for the first time (issue has been detected on CI). In such case RTC initialization takes more time than in futher rtc_init calls. This has impact on green-tea communication. Commands send by host immediately after init command (write, read) were not handled on the device side and no response to the host was provided.
To fix this problem test communication flow has been modified. Device sends ack to the host after RTC init is done. Host sends further RTC commands when ack from the device has been received.

Edit:
There are still some communication issues on the CI. Add ack from the device after each executed command. Increase test timeout and wait after reset.
2018-05-25 12:52:02 -05:00
Russ Butler 1f97f11373 Add documentation and test the HAL RTC API
Add requirements, tests, an example implementation and additional
function documentation to the HAL RTC API.
2018-05-25 12:37:19 -05:00
Brian Daniels 631e5ebdee Modifying echo test to be driven more from the device.
Previously, the echo test followed a flow like the following:

-STEP-	-HOST PC-                  -DEVICE-
0	send _sync
1				   echo back _sync
2				   send echo_count
3	echo back echo_count
4	send first echo packet
5				   echo back echo packet
	(repeat echo steps)

However, as noted by issue #6659, this test would somtimes fail between
steps 4 and 5. To ensure each KV pair makes to the correct destination,
we usually write the KV back. Step 4 does not wait for this to happen
and starts sending echo packets. So the device is acting as the "echo
server".

This change makes the host PC the "echo server". The idea being that the
device will be slower and the host pc should always be able to keep up
with it, not the other way around.
2018-04-23 17:56:13 -05:00
Bartek Szatkowski 73b054601d Add tests for system_reset() 2018-02-28 16:42:34 +00:00
Przemyslaw Stekiel e725b4c2c5 RTC time conversion test - reduce number of tested years in order to reduce test execution time.
For each of the following years test example time of the first and last day of each month:
- first - 1970
- example not leap year (not divisible by 4)
- example leap year (divisible by 4 and by 100 and by 400)
- example leap year (divisible by 4 and not by 100)
- example not leap year (divisible by 4 and by 100)
- last fully supported  - 2105

Test execution time on K64F is now ~39 sec.
2018-01-08 10:14:54 +01:00
Przemyslaw Stekiel fcdaeccea1 Add tests for extended RTC. 2017-12-05 07:53:41 +01:00
Russ Butler f535cb5ddc Update timing calculations 2017-06-28 16:29:38 -05:00
studavekar 0f55193df8 Update timing tests to be robust.
In the new approach the host controls the device activity when the test
should start, finish and pass/fail status is send to device. Also deprecate
the test cases which can't accurately test.
2017-06-22 18:25:16 -05:00
Brian Daniels 1473240637 Fixing issue in timing host test and wait_us case
The timing host tests reported success even if the total drift was
negative. This adds a check for this now.

The wait_us test now does not use a timer and just waits for 100000 us
between prints. This adds inherent drift, but it should still be well
under the limit.
2016-09-07 09:14:17 -05:00
Brian Daniels f6c60d07ac Adding timing drift host test 2016-08-30 14:38:30 -05:00