Skip to content

Release candidate for mbed-os-5.5.3 #4760

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 82 commits into from
Jul 17, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
82 commits
Select commit Hold shift + click to select a range
c19ebcb
Customer port verification tests for cellular
Jun 5, 2017
268990b
Update branching option to branch from another branch.
adbridge Jun 12, 2017
a472cba
Remove remaining use of args.tag and replace with tag obtained from c…
adbridge Jun 13, 2017
c2b2044
Added template file for PR commit message plus minor review changes
adbridge Jun 21, 2017
805b20b
Cellular: not-supported error if MODEM_ON_BOARD not defined
0xc0170 Jun 30, 2017
24e6a78
Put quotes around include files
Jun 6, 2017
44506c1
Fix typo runnig_thread -> running_thread
kegilbert Jun 30, 2017
b7b9444
STM32L486RG/mbedtls: add aes hw acceleration
adustm Mar 16, 2017
af8c6bd
Move definitions in aes_alt.c + Factorize code
adustm Jun 16, 2017
efcf50d
Add the correct startup s file in TARGET_STM32F767
jeromecoutant Jun 28, 2017
31cb52d
Added simple linter for targets.json
theotherjimmy Apr 20, 2017
05b9b8a
Stylize and add function docs
theotherjimmy Apr 21, 2017
7973551
Revamp option parsing and add more checks
theotherjimmy Apr 21, 2017
009019e
Restrict device_has
theotherjimmy Apr 21, 2017
c85f436
Add license header
theotherjimmy May 18, 2017
a2bbefe
Add line between local and module imports
theotherjimmy May 18, 2017
1a2e93a
Reduce device has whitelist
theotherjimmy Jun 27, 2017
4759d76
added the missing verbose=verbose to printout the command line correctly
LordGuilly Jul 5, 2017
eb6e541
Correct a typo in the github issue template
amq Jul 5, 2017
b963697
Double escape defines
theotherjimmy Jun 26, 2017
5031a11
_acquire() function added & no duplication in format/freq calls
Jun 26, 2017
bb3ef79
Corrected handling of format/frequency
Jun 26, 2017
ec66c5a
Corrected typo
Jun 29, 2017
6a8abec
Typecasting to int to resolve warning:#68-D: integer conversion resul…
Jun 15, 2017
b703283
moving static at the start to resolve warning:'static' is not at begi…
Jun 15, 2017
9ec78bf
Resolving warning: #2524-D: #pragma pop with no matching #pragma push…
Jun 15, 2017
8aecf03
Added newline at end of file
Jun 15, 2017
254f869
Resolving warning: unused variable 'instance' [-Wunused-variable]
Jun 15, 2017
dfd9fc7
Resolving: unused variable 'mode' [-Wunused-variable]. mode is used t…
Jun 15, 2017
322a20c
Typecasting to resolve warning: integer conversion resulted in a chan…
Jun 15, 2017
fa3f226
Using size_t instead of integer type to resolve warning: comparison b…
Jun 15, 2017
1c3469b
Resolved format warnings: format '%d' expects argument of type 'int',…
Jun 15, 2017
f1b4598
Sort the config parameters before printing them
bridadan Jun 13, 2017
f659681
Fix bad test print and move locks for printf into macro.
bridadan Jun 13, 2017
aa166fa
Update timing tests to be robust.
studavekar Jun 21, 2017
01fcb5f
Deprecate testcases related to time drift.
studavekar Jun 21, 2017
4caf8ce
Increased stack to 1024 from 768 and corrected assert.
studavekar Jun 22, 2017
3b4aafb
Update timing calculations
c1728p9 Jun 28, 2017
03f37bb
validate base_time key received
studavekar Jul 5, 2017
3b32d25
FlashIAP: Add explicit read function to flash_api.h
Jul 6, 2017
206b7f8
Improve the startup code on the STM32F070
fahhem Jun 12, 2017
f1dd96b
Fix add -> adds typo
fahhem Jun 12, 2017
844ba85
do while -> while
fahhem Jun 12, 2017
b92b423
fatfs: Added full support for multiple fs volume prefixes
geky Jun 14, 2017
3d0f789
Set LED4 the same as LED3 to get tests-mbedmicro-rtos-mbed-timer to p…
Jun 30, 2017
e973809
tools: fix toolchain extend inc paths
0xc0170 Jul 12, 2017
d4c2f31
Remove unused headfile
Archcady Jul 12, 2017
43c67f4
NRF52832: Extend idle thread stack size to 512 bytes.
pan- Jul 11, 2017
abfe8d1
STM32: serial: use proper GET_IT macro
LMESTM Jul 4, 2017
9a226ae
STM32L0 : internal ADC channels
jeromecoutant Jun 29, 2017
b1b419f
DISCO_L475VG_IOT01A: typo corrections in PeripheralPins.c
bcostm Jun 28, 2017
1d9712b
Nordic: Fix multiple defined symbol.
pan- Jul 3, 2017
b6a5448
STM32: F4: Increase ADC sampling time
LMESTM Jul 3, 2017
f7c516a
Increase PPP stack size from 512 bytes to 768 bytes.
RobMeades Jun 30, 2017
1554ea5
DISCO_F429ZI: Add 'Connected to' comment
bcostm Jun 21, 2017
8a1821e
DISCO_F429ZI: Add alternate pins and enable all pins
bcostm Jun 23, 2017
4615906
DISCO_F429ZI: Add missing ADC alternate pins
bcostm Jun 23, 2017
be5ae8b
DISCO_F429ZI: Typo corrections + add missing ALT pins
bcostm Jun 23, 2017
1e8ba70
NUCLEO_F429ZI: Add alternate pins and enable all pins
bcostm Jun 23, 2017
99f87ab
DISCO_F429ZI: Typo correction
bcostm Jun 26, 2017
6d0badf
NUCLEO_F429ZI: comments corrections
bcostm Jun 29, 2017
51a7036
Update and mute debug messages from wifi
Archcady Jun 29, 2017
54bf7d7
mute wifi_conf messages
Archcady Jul 12, 2017
5ae8011
Enable/Disable debug from argument of constructor
Archcady Jul 12, 2017
e36c20f
Fix timing issues found in "Flash - clock and cache test" ARMCC seeme…
chrissnow Jun 29, 2017
9a6fb46
Toolchain independent noinline
chrissnow Jun 30, 2017
a880560
Assembly based loop for timing test
chrissnow Jun 30, 2017
9888d3c
Code tidy
chrissnow Jun 30, 2017
a35baf2
Remove volatile
chrissnow Jun 30, 2017
94aea46
fatfs: Fix unaligned access in disk_ioctl
geky Jun 27, 2017
7559f18
- Adjust lowpan ND interface connect timeout
KariHaapalehto Jun 29, 2017
113b902
Bugfix: #4357 simultaneous using of I2C and SPI.
nvlsianpu Jun 26, 2017
f94ce22
nrf5 spi_api - coding style enhancement
nvlsianpu Jun 26, 2017
fde073c
Generate exporter suppored lists when needed
theotherjimmy Jul 7, 2017
38e258c
Allow custom_targets.json exporting
theotherjimmy Jul 7, 2017
6d5e15b
Updated MBED versionning block for patch release
adbridge Jul 14, 2017
5ea3730
Rebase of: https://github.com/ARMmbed/mbed-os/pull/4066/commits/cb390…
adustm Mar 29, 2017
5b0dbbd
Rebase of: https://github.com/ARMmbed/mbed-os/pull/4066/commits/dfd0c…
adustm Mar 29, 2017
0b9855e
Rebase: https://github.com/ARMmbed/mbed-os/pull/4066/commits/0d1c6c2d…
adustm Mar 29, 2017
03aa77a
Allow UBLOX to use SDK flash driver
adustm Mar 30, 2017
47b8125
Replase CMSIS flash driver by SDK flash driver
adustm Mar 28, 2017
364f4a3
ncs36510: us ticker improvements
0xc0170 Jun 30, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/issue_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ GCC_ARM|ARM|IAR
**mbed-cli version:**
(`mbed --version`)

**meed-os sha:**
**mbed-os sha:**
(`git log -n1 --oneline`)

**DAPLink version:**
Expand Down
177 changes: 103 additions & 74 deletions TESTS/host_tests/timing_drift_auto.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,91 +16,120 @@
"""

from mbed_host_tests import BaseHostTest
import time


class TimingDriftTest(BaseHostTest):
""" This test is reading single characters from stdio
and measures time between their occurrences.
class TimingDriftSync(BaseHostTest):
"""
This works as master-slave fashion
1) Device says its booted up and ready to run the test, wait for host to respond
2) Host sends the message to get the device current time i.e base time

#
# *
# * |
#<---* DUT<- base_time | - round_trip_base_time ------
# * | |
# * - |
# - |
# | |
# | |
# | - measurement_stretch | - nominal_time
# | |
# | |
# - |
# * - |
# * | |
#<---* DUT <-final_time | - round_trip_final_time------
# * |
# * -
#
#
# As we increase the measurement_stretch, the error because of transport delay diminishes.
# The values of measurement_stretch is propotional to round_trip_base_time(transport delays)
# by factor time_measurement_multiplier.This multiplier is used is 80 to tolerate 2 sec of
# transport delay and test time ~ 180 secs
#
# Failure in timing can occur if we are ticking too fast or we are ticking too slow, hence we have
# min_range and max_range. if we cross on either side tests would be marked fail. The range is a function of
# tolerance/acceptable drift currently its 5%.
#

"""
__result = None

# This is calculated later: average_drift_max * number of tick events
total_drift_max = None

average_drift_max = 0.05
ticks = []
start_time = None
finish_time = None
dut_seconds_passed = None
total_time = None
total_drift = None
average_drift = None

def _callback_result(self, key, value, timestamp):
# We should not see result data in this test
self.__result = False

def _callback_end(self, key, value, timestamp):
""" {{end;%s}}} """
self.log("Received end event, timestamp: %f" % timestamp)
self.notify_complete(result=self.result(print_stats=True))


def _callback_tick(self, key, value, timestamp):
""" {{tick;%d}}} """
self.log("tick! %f" % timestamp)
self.ticks.append((key, value, timestamp))
mega = 1000000.0
max_measurement_time = 180

# this value is obtained for measurements when there is 0 transport delay and we want accurancy of 5%
time_measurement_multiplier = 80

def setup(self):
self.register_callback("end", self._callback_end)
self.register_callback('tick', self._callback_tick)
def _callback_timing_drift_check_start(self, key, value, timestamp):
self.round_trip_base_start = timestamp
self.send_kv("base_time", 0)

def _callback_base_time(self, key, value, timestamp):
self.round_trip_base_end = timestamp
self.device_time_base = float(value)
self.round_trip_base_time = self.round_trip_base_end - self.round_trip_base_start

def result(self, print_stats=True):
self.dut_seconds_passed = len(self.ticks) - 1

if self.dut_seconds_passed < 1:
if print_stats:
self.log("FAIL: failed to receive at least two tick events")
self.__result = False
return self.__result

self.total_drift_max = self.dut_seconds_passed * self.average_drift_max

self.start_time = self.ticks[0][2]
self.finish_time = self.ticks[-1][2]
self.total_time = self.finish_time - self.start_time
self.total_drift = self.total_time - self.dut_seconds_passed
self.average_drift = self.total_drift / self.dut_seconds_passed

if print_stats:
self.log("Start: %f" % self.start_time)
self.log("Finish: %f" % self.finish_time)
self.log("Total time taken: %f" % self.total_time)

total_drift_ratio_string = "Total drift/Max total drift: %f/%f"
self.log(total_drift_ratio_string % (self.total_drift,
self.total_drift_max))

average_drift_ratio_string = "Average drift/Max average drift: %f/%f"
self.log(average_drift_ratio_string % (self.average_drift,
self.average_drift_max))


if abs(self.total_drift) > self.total_drift_max:
if print_stats:
self.log("FAIL: Total drift exceeded max total drift")
self.__result = False
elif self.average_drift > self.average_drift_max:
if print_stats:
self.log("FAIL: Average drift exceeded max average drift")
self.__result = False
self.log("Device base time {}".format(value))
measurement_stretch = (self.round_trip_base_time * self.time_measurement_multiplier) + 5

if measurement_stretch > self.max_measurement_time:
self.log("Time required {} to determine device timer is too high due to transport delay, skipping".format(measurement_stretch))
else:
self.log("sleeping for {} to measure drift accurately".format(measurement_stretch))
time.sleep(measurement_stretch)
self.round_trip_final_start = time.time()
self.send_kv("final_time", 0)

def _callback_final_time(self, key, value, timestamp):
self.round_trip_final_end = timestamp
self.device_time_final = float(value)
self.round_trip_final_time = self.round_trip_final_end - self.round_trip_final_start
self.log("Device final time {} ".format(value))

# compute the test results and send to device
results = "pass" if self.compute_parameter() else "fail"
self.send_kv(results, "0")

def setup(self):
self.register_callback('timing_drift_check_start', self._callback_timing_drift_check_start)
self.register_callback('base_time', self._callback_base_time)
self.register_callback('final_time', self._callback_final_time)

def compute_parameter(self, failure_criteria=0.05):
t_max = self.round_trip_final_end - self.round_trip_base_start
t_min = self.round_trip_final_start - self.round_trip_base_end
t_max_hi = t_max * (1 + failure_criteria)
t_max_lo = t_max * (1 - failure_criteria)
t_min_hi = t_min * (1 + failure_criteria)
t_min_lo = t_min * (1 - failure_criteria)
device_time = (self.device_time_final - self.device_time_base) / self.mega

self.log("Compute host events")
self.log("Transport delay 0: {}".format(self.round_trip_base_time))
self.log("Transport delay 1: {}".format(self.round_trip_final_time))
self.log("DUT base time : {}".format(self.device_time_base))
self.log("DUT end time : {}".format(self.device_time_final))

self.log("min_pass : {} , max_pass : {} for {}%%".format(t_max_lo, t_min_hi, failure_criteria * 100))
self.log("min_inconclusive : {} , max_inconclusive : {}".format(t_min_lo, t_max_hi))
self.log("Time reported by device: {}".format(device_time))

if t_max_lo <= device_time <= t_min_hi:
self.log("Test passed !!!")
self.__result = True

elif t_min_lo <= device_time <= t_max_hi:
self.log("Test inconclusive due to transport delay, retrying")
self.__result = False
else:
self.log("Time outside of passing range. Timing drift seems to be present !!!")
self.__result = False
return self.__result

def result(self):
return self.__result

def teardown(self):
pass
pass
Loading