Skip to content
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

Add kw24 support #2966

Merged
merged 2 commits into from
Oct 19, 2016
Merged

Add kw24 support #2966

merged 2 commits into from
Oct 19, 2016

Conversation

mmahadevan108
Copy link
Contributor

Description

Add support for FRDM KW24D board

  • Tests
    mbedgt: test case results: 166 OK
    mbedgt: completed in 756.52 sec

@mmahadevan108
Copy link
Contributor Author

@mmahadevan108
Copy link
Contributor Author

Below is the DAP Link binary for FRDM-KW24 board. Please rename to remove the .txt extension
k20dx_frdmkw24f_if_crc_legacy_0x8000.bin.txt

@maclobdell
Copy link
Contributor

@mmahadevan108 nice!

@0xc0170
Copy link
Contributor

0xc0170 commented Oct 10, 2016

Why was this closed?

@mmahadevan108 mmahadevan108 reopened this Oct 10, 2016
@mmahadevan108
Copy link
Contributor Author

mmahadevan108 commented Oct 10, 2016

Don't know. I might have done something by accident. Thanks.

@sg-
Copy link
Contributor

sg- commented Oct 10, 2016

/morph test

@mbed-bot
Copy link

Result: SUCCESS

Your command has finished executing! Here's what you wrote!

/morph test

Output

mbed Build Number: 1095

All builds and test passed!

@sg- sg- removed the needs: CI label Oct 10, 2016
@maclobdell
Copy link
Contributor

I ran automated tests locally and see a few fails. Please check.
KW24D-GCC_ARM KW24D tests-mbed_drivers-lp_timeout 0 0 ERROR 0
KW24D-GCC_ARM KW24D tests-mbed_drivers-ticker 0 1 ERROR 9.99
KW24D-GCC_ARM KW24D tests-mbed_drivers-timeout 0 1 ERROR 9.87
KW24D-GCC_ARM KW24D tests-mbed_drivers-wait_us 0 1 ERROR 9.83
KW24D-GCC_ARM KW24D tests-mbed_hal-lp_ticker 0 0 ERROR 0
KW24D-GCC_ARM KW24D tests-mbedmicro-rtos-mbed-basic 0 1 ERROR 9.8
KW24D-GCC_ARM KW24D tests-mbedmicro-rtos-mbed-timer 0 1 ERROR 9.69

@mmahadevan108
Copy link
Contributor Author

I see the below with all toolchains.
mbedgt: test case results: 164 OK / 2 ERROR
mbedgt: completed in 836.02 sec

All other tests passed.

Below is what I see related to the 2 ERROR's from Low Power Timer tests:


mbedgt: test suite 'mbed-os-tests-mbed_drivers-lp_timeout' ........................................... OK in 22.14 sec
test case: '1ms LowPowerTimeout' ............................................................. OK in 0.05 sec
test case: '1sec LowPowerTimeout' ............................................................ OK in 1.04 sec
test case: '1sec LowPowerTimeout from deepsleep' ............................................. ERROR in 0.00 sec
test case: '1sec LowPowerTimeout from sleep' ................................................. OK in 1.06 sec
test case: '500us LowPowerTimeout' ........................................................... OK in 0.06 sec
test case: '5sec LowPowerTimeout' ............................................................ OK in 5.06 sec
mbedgt: test case summary: 6 passes, 0 failures
mbedgt: utest test case summary mismatch: utest reported passes and failures miscount!
reported by utest: passes = 6, failures 0)
test case result count: passes = 5, failures 1)

mbedgt: test suite 'mbed-os-tests-mbed_hal-lp_ticker' ................................................ OK in 21.90 sec
test case: '1ms lp_ticker' ................................................................... OK in 0.05 sec
test case: '1s lp_ticker' .................................................................... OK in 1.04 sec
test case: '1s lp_ticker deepsleep' .......................................................... ERROR in 0.00 sec
test case: '1s lp_ticker sleep' .............................................................. OK in 1.04 sec
test case: '500us lp_ticker' ................................................................. OK in 0.04 sec
test case: '5s lp_ticker' .................................................................... OK in 5.04 sec
mbedgt: test case summary: 6 passes, 0 failures
mbedgt: utest test case summary mismatch: utest reported passes and failures miscount!
reported by utest: passes = 6, failures 0)
test case result count: passes = 5, failures 1)


utest is reporting all tests to pass, I am not sure why this is reported as an ERROR.
This is related to deepsleep test, this could be because the KW24 is taking a little longer to come out of deepsleep as it has some additional setup to be done on exit.

@bridadan
Copy link
Contributor

@mmahadevan108 The fact that utest reported all tests as passing when there is an ERROR case present seems suspicious. Do you have a verbose log from that test run?

@mmahadevan108
Copy link
Contributor Author

mmahadevan108 commented Oct 12, 2016

I don't see it fail when I run in verbose mode. My feeling is this is something to do with the way the test is written as I have confirmed the platform goes in and exits deepsleep mode successfully.


c:\cygwin\home\r9aadq\my_mbed>mbed test --run -t GCC_ARM -m KW24D -n mbed-os-tests-mbed_drivers-lp_timeout -v
[mbed] Working path "c:\cygwin\home\r9aadq\my_mbed" (library)
[mbed] Exec "mbedgt --test-spec c:\cygwin\home\r9aadq\my_mbed\BUILD\tests\KW24D\GCC_ARM\test_spec.json -n mbed-os-tests-mbed_drivers-lp_timeout -V" in
 c:\cygwin\home\r9aadq\my_mbed
mbedgt: greentea test automation tool ver. 1.2.2
mbedgt: test specification file 'c:\cygwin\home\r9aadq\my_mbed\BUILD\tests\KW24D\GCC_ARM\test_spec.json' (specified with --test-spec option)
mbedgt: using 'c:\cygwin\home\r9aadq\my_mbed\BUILD\tests\KW24D\GCC_ARM\test_spec.json' from current directory!
mbedgt: detecting connected mbed-enabled devices...
mbedgt: detected 2 devices
        +---------------+----------------------+-------------+-------------+--------------------------------------------------+
        | platform_name | platform_name_unique | serial_port | mount_point | target_id                                        |
        +---------------+----------------------+-------------+-------------+--------------------------------------------------+
        | KW24D         | KW24D[0]             | COM28       | D:          | 0250000033514e45002d5015846c00096cb1000097969900 |
        | K64F          | K64F[0]              | COM21       | E:          | 0240000025354e450043400d47d00042bb91000097969900 |
        +---------------+----------------------+-------------+-------------+--------------------------------------------------+
mbedgt: processing target 'KW24D' toolchain 'GCC_ARM' compatible platforms... (note: switch set to --parallel 1)
        +---------------+----------------------+-------------+-------------+--------------------------------------------------+
        | platform_name | platform_name_unique | serial_port | mount_point | target_id                                        |
        +---------------+----------------------+-------------+-------------+--------------------------------------------------+
        | KW24D         | KW24D[0]             | COM28:9600  | D:          | 0250000033514e45002d5015846c00096cb1000097969900 |
        +---------------+----------------------+-------------+-------------+--------------------------------------------------+
mbedgt: test case filter (specified with -n option)
        test filtered in 'mbed-os-tests-mbed_drivers-lp_timeout'
mbedgt: running 1 test for platform 'KW24D' and toolchain 'GCC_ARM'
        use 1 instance of execution threads for testing
mbedgt: checking for 'host_tests' directory above image directory structure
        found 'host_tests' directory in: 'mbed-os\TESTS\host_tests'
mbedgt: selecting test case observer...
        calling mbedhtrun: mbedhtrun -m KW24D -p COM28:9600 -f "BUILD/tests/KW24D/GCC_ARM/mbed-os/TESTS/mbed_drivers/lp_timeout/lp_timeout.bin" -d D:
-C 4 -c shell -t 0250000033514e45002d5015846c00096cb1000097969900 -e "mbed-os\TESTS\host_tests"
mbedgt: mbed-host-test-runner: started
[1476301156.57][HTST][INF] host test executor ver. 1.1.3
[1476301156.57][HTST][INF] copy image onto target...
[1476301156.57][COPY][INF] Waiting up to 60 sec for '0250000033514e45002d5015846c00096cb1000097969900' mount point (current is 'D:')...
        1 file(s) copied.
[1476301166.07][HTST][INF] starting host test process...
[1476301166.63][CONN][INF] starting connection process...
[1476301166.63][CONN][INF] notify event queue about extra 60 sec timeout for serial port pooling
[1476301166.63][CONN][INF] initializing serial port listener...
[1476301166.63][SERI][INF] serial(port=COM28, baudrate=9600, timeout=0.01)
[1476301166.63][PLGN][INF] Waiting up to 60 sec for '0250000033514e45002d5015846c00096cb1000097969900' serial port (current is 'COM28')...
[1476301166.66][HTST][INF] setting timeout to: 60 sec
[1476301166.86][SERI][INF] reset device using 'default' plugin...
[1476301167.13][SERI][INF] waiting 1.00 sec after reset
[1476301168.13][SERI][INF] wait for it...
[1476301168.13][SERI][TXD] mbedmbedmbedmbedmbedmbedmbedmbedmbedmbed
[1476301168.13][CONN][INF] sending up to 2 __sync packets (specified with --sync=2)
[1476301168.13][CONN][INF] sending preamble '71a20ad5-de7a-4b9f-b28d-ad4224d4a531'
[1476301168.13][SERI][TXD] {{__sync;71a20ad5-de7a-4b9f-b28d-ad4224d4a531}}
[1476301168.27][CONN][RXD] mbedmbedmbedmbedmbedmbedmbedmbed
[1476301168.32][CONN][INF] found SYNC in stream: {{__sync;71a20ad5-de7a-4b9f-b28d-ad4224d4a531}} it is #0 sent, queued...
[1476301168.33][HTST][INF] sync KV found, uuid=71a20ad5-de7a-4b9f-b28d-ad4224d4a531, timestamp=1476301168.317000
[1476301168.35][CONN][INF] found KV pair in stream: {{__version;1.3.0}}, queued...
[1476301168.36][HTST][INF] DUT greentea-client version: 1.3.0
[1476301168.36][CONN][INF] found KV pair in stream: {{__timeout;20}}, queued...
[1476301168.38][HTST][INF] setting timeout to: 20 sec
[1476301168.39][CONN][INF] found KV pair in stream: {{__host_test_name;default_auto}}, queued...
[1476301168.41][HTST][INF] host test class: '<class 'mbed_host_tests.host_tests.default_auto.DefaultAuto'>'
[1476301168.41][HTST][INF] host test setup() call...
[1476301168.41][HTST][INF] CALLBACKs updated
[1476301168.41][HTST][INF] host test detected: default_auto
[1476301168.43][CONN][INF] found KV pair in stream: {{__testcase_count;6}}, queued...
[1476301168.46][CONN][RXD] >>> Running 6 test cases...
[1476301168.49][CONN][INF] found KV pair in stream: {{__testcase_name;500us LowPowerTimeout}}, queued...
[1476301168.54][CONN][INF] found KV pair in stream: {{__testcase_name;1ms LowPowerTimeout}}, queued...
[1476301168.58][CONN][INF] found KV pair in stream: {{__testcase_name;1sec LowPowerTimeout}}, queued...
[1476301168.63][CONN][INF] found KV pair in stream: {{__testcase_name;5sec LowPowerTimeout}}, queued...
[1476301168.68][CONN][INF] found KV pair in stream: {{__testcase_name;1sec LowPowerTimeout from sleep}}, queued...
[1476301168.74][CONN][RXD]
[1476301168.74][CONN][INF] found KV pair in stream: {{__testcase_name;1sec LowPowerTimeout from deepsleep}}, queued...
[1476301168.79][CONN][RXD] >>> Running case #1: '500us LowPowerTimeout'...
[1476301168.83][CONN][INF] found KV pair in stream: {{__testcase_start;500us LowPowerTimeout}}, queued...
[1476301168.89][CONN][INF] found KV pair in stream: {{__testcase_finish;500us LowPowerTimeout;1;0}}, queued...
[1476301168.94][CONN][RXD] >>> '500us LowPowerTimeout': 1 passed, 0 failed
[1476301168.94][CONN][RXD]
[1476301168.99][CONN][RXD] >>> Running case #2: '1ms LowPowerTimeout'...
[1476301169.03][CONN][INF] found KV pair in stream: {{__testcase_start;1ms LowPowerTimeout}}, queued...
[1476301169.08][CONN][INF] found KV pair in stream: {{__testcase_finish;1ms LowPowerTimeout;1;0}}, queued...
[1476301169.13][CONN][RXD] >>> '1ms LowPowerTimeout': 1 passed, 0 failed
[1476301169.13][CONN][RXD]
[1476301169.17][CONN][RXD] >>> Running case #3: '1sec LowPowerTimeout'...
[1476301169.22][CONN][INF] found KV pair in stream: {{__testcase_start;1sec LowPowerTimeout}}, queued...
[1476301170.27][CONN][INF] found KV pair in stream: {{__testcase_finish;1sec LowPowerTimeout;1;0}}, queued...
[1476301170.31][CONN][RXD] >>> '1sec LowPowerTimeout': 1 passed, 0 failed
[1476301170.31][CONN][RXD]
[1476301170.38][CONN][RXD] >>> Running case #4: '5sec LowPowerTimeout'...
[1476301170.41][CONN][INF] found KV pair in stream: {{__testcase_start;5sec LowPowerTimeout}}, queued...
[1476301175.46][CONN][INF] found KV pair in stream: {{__testcase_finish;5sec LowPowerTimeout;1;0}}, queued...
[1476301175.51][CONN][RXD] >>> '5sec LowPowerTimeout': 1 passed, 0 failed
[1476301175.51][CONN][RXD]
[1476301175.57][CONN][RXD] >>> Running case #5: '1sec LowPowerTimeout from sleep'...
[1476301175.63][CONN][INF] found KV pair in stream: {{__testcase_start;1sec LowPowerTimeout from sleep}}, queued...
[1476301176.68][CONN][INF] found KV pair in stream: {{__testcase_finish;1sec LowPowerTimeout from sleep;1;0}}, queued...
[1476301176.74][CONN][RXD] >>> '1sec LowPowerTimeout from sleep': 1 passed, 0 failed
[1476301176.74][CONN][RXD]
[1476301176.82][CONN][RXD] >>> Running case #6: '1sec LowPowerTimeout from deepsleep'...
[1476301176.87][CONN][INF] found KV pair in stream: {{__testcase_start;1sec LowPowerTimeout from deepsleep}}, queued...
[1476301177.94][CONN][INF] found KV pair in stream: {{__testcase_finish;1sec LowPowerTimeout from deepsleep;1;0}}, queued...
[1476301178.01][CONN][RXD] >>> '1sec LowPowerTimeout from deepsleep': 1 passed, 0 failed
[1476301178.01][CONN][RXD]
[1476301178.04][CONN][RXD] >>> Test cases: 6 passed, 0 failed
[1476301178.07][CONN][INF] found KV pair in stream: {{__testcase_summary;6;0}}, queued...
[1476301178.08][CONN][INF] found KV pair in stream: {{max_heap_usage;0}}, queued...
[1476301178.10][HTST][ERR] orphan event in main phase: {{max_heap_usage;0}}, timestamp=1476301178.084000
[1476301178.12][CONN][INF] found KV pair in stream: {{end;success}}, queued...
[1476301178.13][CONN][INF] found KV pair in stream: {{__exit;0}}, queued...
[1476301178.13][HTST][INF] __exit(0)
[1476301178.13][HTST][INF] __notify_complete(True)
[1476301178.13][HTST][INF] __exit_event_queue received
[1476301178.13][HTST][INF] test suite run finished after 9.75 sec...
[1476301178.15][CONN][INF] received special even '__host_test_finished' value='True', finishing
[1476301178.16][HTST][INF] CONN exited with code: 0
[1476301178.16][HTST][INF] No events in queue
[1476301178.18][HTST][INF] stopped consuming events
[1476301178.18][HTST][INF] host test result() call skipped, received: True
[1476301178.18][HTST][INF] calling blocking teardown()
[1476301178.18][HTST][INF] teardown() finished
[1476301178.18][HTST][INF] {{result;success}}
mbedgt: checking for GCOV data...
mbedgt: mbed-host-test-runner: stopped and returned 'OK'
mbedgt: test on hardware with target id: 0250000033514e45002d5015846c00096cb1000097969900
mbedgt: test suite 'mbed-os-tests-mbed_drivers-lp_timeout' ........................................... OK in 22.25 sec
        test case: '1ms LowPowerTimeout' ............................................................. OK in 0.05 sec
        test case: '1sec LowPowerTimeout' ............................................................ OK in 1.05 sec
        test case: '1sec LowPowerTimeout from deepsleep' ............................................. OK in 1.07 sec
        test case: '1sec LowPowerTimeout from sleep' ................................................. OK in 1.05 sec
        test case: '500us LowPowerTimeout' ........................................................... OK in 0.06 sec
        test case: '5sec LowPowerTimeout' ............................................................ OK in 5.05 sec
mbedgt: test case summary: 6 passes, 0 failures
mbedgt: all tests finished!
mbedgt: shuffle seed: 0.8369685248
mbedgt: test suite report:
+---------------+---------------+---------------------------------------+--------+--------------------+-------------+
| target        | platform_name | test suite                            | result | elapsed_time (sec) | copy_method |
+---------------+---------------+---------------------------------------+--------+--------------------+-------------+
| KW24D-GCC_ARM | KW24D         | mbed-os-tests-mbed_drivers-lp_timeout | OK     | 22.25              | shell       |
+---------------+---------------+---------------------------------------+--------+--------------------+-------------+
mbedgt: test suite results: 1 OK
mbedgt: test case report:
+---------------+---------------+---------------------------------------+-------------------------------------+--------+--------+--------+------------
--------+
| target        | platform_name | test suite                            | test case                           | passed | failed | result | elapsed_tim
e (sec) |
+---------------+---------------+---------------------------------------+-------------------------------------+--------+--------+--------+------------
--------+
| KW24D-GCC_ARM | KW24D         | mbed-os-tests-mbed_drivers-lp_timeout | 1ms LowPowerTimeout                 | 1      | 0      | OK     | 0.05
        |
| KW24D-GCC_ARM | KW24D         | mbed-os-tests-mbed_drivers-lp_timeout | 1sec LowPowerTimeout                | 1      | 0      | OK     | 1.05
        |
| KW24D-GCC_ARM | KW24D         | mbed-os-tests-mbed_drivers-lp_timeout | 1sec LowPowerTimeout from deepsleep | 1      | 0      | OK     | 1.07
        |
| KW24D-GCC_ARM | KW24D         | mbed-os-tests-mbed_drivers-lp_timeout | 1sec LowPowerTimeout from sleep     | 1      | 0      | OK     | 1.05
        |
| KW24D-GCC_ARM | KW24D         | mbed-os-tests-mbed_drivers-lp_timeout | 500us LowPowerTimeout               | 1      | 0      | OK     | 0.06
        |
| KW24D-GCC_ARM | KW24D         | mbed-os-tests-mbed_drivers-lp_timeout | 5sec LowPowerTimeout                | 1      | 0      | OK     | 5.05
        |
+---------------+---------------+---------------------------------------+-------------------------------------+--------+--------+--------+------------
--------+
mbedgt: test case results: 6 OK
mbedgt: completed in 22.64 sec
_______________________________________________

@bridadan
Copy link
Contributor

@mmahadevan108 It's possible, I admit I'm not all that familiar with that particular test case. The fact that it passes when ran in exclusion is a good sign that it isn't actually broken.

Is the same true for the lp_ticker test?

@mmahadevan108
Copy link
Contributor Author

Yes, same observation with the lp_ticker test. Results below:


c:\cygwin\home\r9aadq\my_mbed>mbed test --run -t GCC_ARM -m KW24D -n mbed-os-tests-mbed_hal-lp_ticker -v
[mbed] Working path "c:\cygwin\home\r9aadq\my_mbed" (library)
[mbed] Exec "mbedgt --test-spec c:\cygwin\home\r9aadq\my_mbed\BUILD\tests\KW24D\GCC_ARM\test_spec.json -n mbed-os-tests-mbed_hal-lp_ticker -V" in c:\c
ygwin\home\r9aadq\my_mbed
mbedgt: greentea test automation tool ver. 1.2.2
mbedgt: test specification file 'c:\cygwin\home\r9aadq\my_mbed\BUILD\tests\KW24D\GCC_ARM\test_spec.json' (specified with --test-spec option)
mbedgt: using 'c:\cygwin\home\r9aadq\my_mbed\BUILD\tests\KW24D\GCC_ARM\test_spec.json' from current directory!
mbedgt: detecting connected mbed-enabled devices...
mbedgt: detected 2 devices
+---------------+----------------------+-------------+-------------+--------------------------------------------------+
| platform_name | platform_name_unique | serial_port | mount_point | target_id |
+---------------+----------------------+-------------+-------------+--------------------------------------------------+
| KW24D | KW24D[0] | COM28 | D: | 0250000033514e45002d5015846c00096cb1000097969900 |
| K64F | K64F[0] | COM21 | E: | 0240000025354e450043400d47d00042bb91000097969900 |
+---------------+----------------------+-------------+-------------+--------------------------------------------------+
mbedgt: processing target 'KW24D' toolchain 'GCC_ARM' compatible platforms... (note: switch set to --parallel 1)
+---------------+----------------------+-------------+-------------+--------------------------------------------------+
| platform_name | platform_name_unique | serial_port | mount_point | target_id |
+---------------+----------------------+-------------+-------------+--------------------------------------------------+
| KW24D | KW24D[0] | COM28:9600 | D: | 0250000033514e45002d5015846c00096cb1000097969900 |
+---------------+----------------------+-------------+-------------+--------------------------------------------------+
mbedgt: test case filter (specified with -n option)
test filtered in 'mbed-os-tests-mbed_hal-lp_ticker'
mbedgt: running 1 test for platform 'KW24D' and toolchain 'GCC_ARM'
use 1 instance of execution threads for testing
mbedgt: checking for 'host_tests' directory above image directory structure
found 'host_tests' directory in: 'mbed-os\TESTS\host_tests'
mbedgt: selecting test case observer...
calling mbedhtrun: mbedhtrun -m KW24D -p COM28:9600 -f "BUILD/tests/KW24D/GCC_ARM/mbed-os/TESTS/mbed_hal/lp_ticker/lp_ticker.bin" -d D: -C 4 -
c shell -t 0250000033514e45002d5015846c00096cb1000097969900 -e "mbed-os\TESTS\host_tests"
mbedgt: mbed-host-test-runner: started
[1476303349.06][HTST][INF] host test executor ver. 1.1.3
[1476303349.06][HTST][INF] copy image onto target...
[1476303349.06][COPY][INF] Waiting up to 60 sec for '0250000033514e45002d5015846c00096cb1000097969900' mount point (current is 'D:')...
1 file(s) copied.
[1476303358.47][HTST][INF] starting host test process...
[1476303359.08][CONN][INF] starting connection process...
[1476303359.08][CONN][INF] notify event queue about extra 60 sec timeout for serial port pooling
[1476303359.09][CONN][INF] initializing serial port listener...
[1476303359.09][SERI][INF] serial(port=COM28, baudrate=9600, timeout=0.01)
[1476303359.09][PLGN][INF] Waiting up to 60 sec for '0250000033514e45002d5015846c00096cb1000097969900' serial port (current is 'COM28')...
[1476303359.12][HTST][INF] setting timeout to: 60 sec
[1476303359.33][SERI][INF] reset device using 'default' plugin...
[1476303359.59][SERI][INF] waiting 1.00 sec after reset
[1476303360.60][SERI][INF] wait for it...
[1476303360.60][SERI][TXD] mbedmbedmbedmbedmbedmbedmbedmbedmbedmbed
[1476303360.60][CONN][INF] sending up to 2 __sync packets (specified with --sync=2)
[1476303360.60][CONN][INF] sending preamble '756466c3-b132-4f16-a056-140e45ddcc48'
[1476303360.60][SERI][TXD] {{__sync;756466c3-b132-4f16-a056-140e45ddcc48}}
[1476303360.74][CONN][RXD] mbedmbedmbedmbedmbedmbedmbedmbed
[1476303360.79][CONN][INF] found SYNC in stream: {{__sync;756466c3-b132-4f16-a056-140e45ddcc48}} it is #0 sent, queued...
[1476303360.81][HTST][INF] sync KV found, uuid=756466c3-b132-4f16-a056-140e45ddcc48, timestamp=1476303360.791000
[1476303360.81][CONN][INF] found KV pair in stream: {{__version;1.3.0}}, queued...
[1476303360.81][HTST][INF] DUT greentea-client version: 1.3.0
[1476303360.84][CONN][INF] found KV pair in stream: {{__timeout;20}}, queued...
[1476303360.85][HTST][INF] setting timeout to: 20 sec
[1476303360.87][CONN][INF] found KV pair in stream: {{__host_test_name;default_auto}}, queued...
[1476303360.88][HTST][INF] host test class: '<class 'mbed_host_tests.host_tests.default_auto.DefaultAuto'>'
[1476303360.88][HTST][INF] host test setup() call...
[1476303360.88][HTST][INF] CALLBACKs updated
[1476303360.88][HTST][INF] host test detected: default_auto
[1476303360.90][CONN][INF] found KV pair in stream: {{__testcase_count;6}}, queued...
[1476303360.92][CONN][RXD] >>> Running 6 test cases...
[1476303360.96][CONN][INF] found KV pair in stream: {{__testcase_name;500us lp_ticker}}, queued...
[1476303360.99][CONN][INF] found KV pair in stream: {{__testcase_name;1ms lp_ticker}}, queued...
[1476303361.04][CONN][INF] found KV pair in stream: {{__testcase_name;1s lp_ticker}}, queued...
[1476303361.07][CONN][INF] found KV pair in stream: {{__testcase_name;5s lp_ticker}}, queued...
[1476303361.12][CONN][INF] found KV pair in stream: {{__testcase_name;1s lp_ticker sleep}}, queued...
[1476303361.15][CONN][INF] found KV pair in stream: {{__testcase_name;1s lp_ticker deepsleep}}, queued...
[1476303361.17][CONN][RXD]
[1476303361.20][CONN][RXD] >>> Running case #1: '500us lp_ticker'...
[1476303361.24][CONN][INF] found KV pair in stream: {{__testcase_start;500us lp_ticker}}, queued...
[1476303361.29][CONN][INF] found KV pair in stream: {{__testcase_finish;500us lp_ticker;1;0}}, queued...
[1476303361.32][CONN][RXD] >>> '500us lp_ticker': 1 passed, 0 failed
[1476303361.34][CONN][RXD]
[1476303361.37][CONN][RXD] >>> Running case #2: '1ms lp_ticker'...
[1476303361.41][CONN][INF] found KV pair in stream: {{__testcase_start;1ms lp_ticker}}, queued...
[1476303361.45][CONN][INF] found KV pair in stream: {{__testcase_finish;1ms lp_ticker;1;0}}, queued...
[1476303361.49][CONN][RXD] >>> '1ms lp_ticker': 1 passed, 0 failed
[1476303361.49][CONN][RXD]
[1476303361.54][CONN][RXD] >>> Running case #3: '1s lp_ticker'...
[1476303361.57][CONN][INF] found KV pair in stream: {{__testcase_start;1s lp_ticker}}, queued...
[1476303362.62][CONN][INF] found KV pair in stream: {{__testcase_finish;1s lp_ticker;1;0}}, queued...
[1476303362.65][CONN][RXD] >>> '1s lp_ticker': 1 passed, 0 failed
[1476303362.65][CONN][RXD]
[1476303362.69][CONN][RXD] >>> Running case #4: '5s lp_ticker'...
[1476303362.73][CONN][INF] found KV pair in stream: {{__testcase_start;5s lp_ticker}}, queued...
[1476303367.76][CONN][INF] found KV pair in stream: {{__testcase_finish;5s lp_ticker;1;0}}, queued...
[1476303367.81][CONN][RXD] >>> '5s lp_ticker': 1 passed, 0 failed
[1476303367.81][CONN][RXD]
[1476303367.86][CONN][RXD] >>> Running case #5: '1s lp_ticker sleep'...
[1476303367.90][CONN][INF] found KV pair in stream: {{__testcase_start;1s lp_ticker sleep}}, queued...
[1476303368.95][CONN][INF] found KV pair in stream: {{__testcase_finish;1s lp_ticker sleep;1;0}}, queued...
[1476303369.00][CONN][RXD] >>> '1s lp_ticker sleep': 1 passed, 0 failed
[1476303369.00][CONN][RXD]
[1476303369.04][CONN][RXD] >>> Running case #6: '1s lp_ticker deepsleep'...
[1476303369.09][CONN][INF] found KV pair in stream: {{__testcase_start;1s lp_ticker deepsleep}}, queued...
[1476303370.15][CONN][INF] found KV pair in stream: {{__testcase_finish;1s lp_ticker deepsleep;1;0}}, queued...
[1476303370.20][CONN][RXD] >>> '1s lp_ticker deepsleep': 1 passed, 0 failed
[1476303370.20][CONN][RXD]
[1476303370.23][CONN][RXD] >>> Test cases: 6 passed, 0 failed
[1476303370.26][CONN][INF] found KV pair in stream: {{__testcase_summary;6;0}}, queued...
[1476303370.29][CONN][INF] found KV pair in stream: {{max_heap_usage;0}}, queued...
[1476303370.31][CONN][INF] found KV pair in stream: {{end;success}}, queued...
[1476303370.31][HTST][ERR] orphan event in main phase: {{max_heap_usage;0}}, timestamp=1476303370.291000
[1476303370.32][CONN][INF] found KV pair in stream: {{__exit;0}}, queued...
[1476303370.32][HTST][INF] __notify_complete(True)
[1476303370.32][HTST][INF] __exit(0)
[1476303370.34][HTST][INF] __exit_event_queue received
[1476303370.34][HTST][INF] test suite run finished after 9.48 sec...
[1476303370.35][CONN][INF] received special even '__host_test_finished' value='True', finishing
[1476303370.37][HTST][INF] CONN exited with code: 0
[1476303370.37][HTST][INF] No events in queue
[1476303370.37][HTST][INF] stopped consuming events
[1476303370.37][HTST][INF] host test result() call skipped, received: True
[1476303370.37][HTST][INF] calling blocking teardown()
[1476303370.37][HTST][INF] teardown() finished
[1476303370.37][HTST][INF] {{result;success}}
mbedgt: checking for GCOV data...
mbedgt: mbed-host-test-runner: stopped and returned 'OK'
mbedgt: test on hardware with target id: 0250000033514e45002d5015846c00096cb1000097969900
mbedgt: test suite 'mbed-os-tests-mbed_hal-lp_ticker' ................................................ OK in 22.00 sec
test case: '1ms lp_ticker' ................................................................... OK in 0.04 sec
test case: '1s lp_ticker' .................................................................... OK in 1.05 sec
test case: '1s lp_ticker deepsleep' .......................................................... OK in 1.06 sec
test case: '1s lp_ticker sleep' .............................................................. OK in 1.05 sec
test case: '500us lp_ticker' ................................................................. OK in 0.05 sec
test case: '5s lp_ticker' .................................................................... OK in 5.03 sec
mbedgt: test case summary: 6 passes, 0 failures
mbedgt: all tests finished!
mbedgt: shuffle seed: 0.9097550424
mbedgt: test suite report:
+---------------+---------------+----------------------------------+--------+--------------------+-------------+
| target | platform_name | test suite | result | elapsed_time (sec) | copy_method |
+---------------+---------------+----------------------------------+--------+--------------------+-------------+
| KW24D-GCC_ARM | KW24D | mbed-os-tests-mbed_hal-lp_ticker | OK | 22.0 | shell |
+---------------+---------------+----------------------------------+--------+--------------------+-------------+
mbedgt: test suite results: 1 OK
mbedgt: test case report:
+---------------+---------------+----------------------------------+------------------------+--------+--------+--------+--------------------+
| target | platform_name | test suite | test case | passed | failed | result | elapsed_time (sec) |
+---------------+---------------+----------------------------------+------------------------+--------+--------+--------+--------------------+
| KW24D-GCC_ARM | KW24D | mbed-os-tests-mbed_hal-lp_ticker | 1ms lp_ticker | 1 | 0 | OK | 0.04 |
| KW24D-GCC_ARM | KW24D | mbed-os-tests-mbed_hal-lp_ticker | 1s lp_ticker | 1 | 0 | OK | 1.05 |
| KW24D-GCC_ARM | KW24D | mbed-os-tests-mbed_hal-lp_ticker | 1s lp_ticker deepsleep | 1 | 0 | OK | 1.06 |
| KW24D-GCC_ARM | KW24D | mbed-os-tests-mbed_hal-lp_ticker | 1s lp_ticker sleep | 1 | 0 | OK | 1.05 |
| KW24D-GCC_ARM | KW24D | mbed-os-tests-mbed_hal-lp_ticker | 500us lp_ticker | 1 | 0 | OK | 0.05 |
| KW24D-GCC_ARM | KW24D | mbed-os-tests-mbed_hal-lp_ticker | 5s lp_ticker | 1 | 0 | OK | 5.03 |
+---------------+---------------+----------------------------------+------------------------+--------+--------+--------+--------------------+
mbedgt: test case results: 6 OK
mbedgt: completed in 22.37 sec


@maclobdell
Copy link
Contributor

@mmahadevan108 I can confirm that my results correlate with yours. The other fails I saw were due to having an old greentea version.

@sg-
Copy link
Contributor

sg- commented Oct 12, 2016

Ready for merge?!? @mmahadevan108 @maclobdell @bridadan

@bridadan
Copy link
Contributor

bridadan commented Oct 12, 2016

I'm starting to see some actual test failures that happen intermittently. Here's what I've been able to reproduce after running the tests a few times (it doesn't fail every time).

I had to run tests-mbed_hal-lp_ticker manually to get all of the output (compiling with GCC_ARM:

mbedmbedmbedmbedmbedmbedmbedmbed
{{__sync;0b91cb6e-acda-497b-9242-249ad68989f4}}
{{__version;1.3.0}}
{{__timeout;20}}
{{__host_test_name;default_auto}}
{{__testcase_count;6}}
>>> Running 6 test cases...
{{__testcase_name;500us lp_ticker}}
{{__testcase_name;1ms lp_ticker}}
{{__testcase_name;1s lp_ticker}}
{{__testcase_name;5s lp_ticker}}
{{__testcase_name;1s lp_ticker sleep}}
{{__testcase_name;1s lp_ticker deepsleep}}

>>> Running case #1: '500us lp_ticker'...
{{__testcase_start;500us lp_ticker}}
:58::FAIL: Values Not Within Delta 600 Expected 500 Was 193914
{{__testcase_finish;500us lp_ticker;0;1}}
>>> '500us lp_ticker': 0 passed, 1 failed with reason 'Test Cases Failed'

>>> Running case #2: '1ms lp_ticker'...
{{__testcase_start;1ms lp_ticker}}
{{__testcase_finish;1ms lp_ticker;1;0}}
>>> '1ms lp_ticker': 1 passed, 0 failed

>>> Running case #3: '1s lp_ticker'...
{{__testcase_start;1s lp_ticker}}
{{__testcase_finish;1s lp_ticker;1;0}}
>>> '1s lp_ticker': 1 passed, 0 failed

>>> Running case #4: '5s lp_ticker'...
{{__testcase_start;5s lp_ticker}}
{{__testcase_finish;5s lp_ticker;1;0}}
>>> '5s lp_ticker': 1 passed, 0 failed

>>> Running case #5: '1s lp_ticker sleep'...
{{__testcase_start;1s lp_ticker sleep}}
{{__testcase_finish;1s lp_ticker sleep;1;0}}
>>> '1s lp_ticker sleep': 1 passed, 0 failed

>>> Running case #6: '1s lp_ticker deepsleep'...
{{__testcase_start;1s lp_ticker deepsleep}}▒H▒{{__testcase_finish;1s lp_ticker deepsleep;1;0}}
>>> '1s lp_ticker deepsleep': 1 passed, 0 failed

>>> Test cases: 5 passed, 1 failed with reason 'Test Cases Failed'
>>> TESTS FAILED!
{{__testcase_summary;5;1}}
{{max_heap_usage;0}}
{{end;failure}}
{{__exit;0}}

There is a failure for the 1s lp_ticker deepsleep test case.

This is the problem line:

{{__testcase_start;1s lp_ticker deepsleep}}▒H▒{{__testcase_finish;1s lp_ticker deepsleep;1;0}}

The test tools expect a new line to be printed at the end of {{key;value}} pairs. It looks like the call to deepsleep may be occurring before the serial data has been pushed across the UART lines. The thing is, the function that prints the {{key;value}} pairs is supposed to be completely blocking. It uses the RawSerial class and uses putc. So I'm not sure how deep sleep is being called before complete sending the data. Do you have any ideas @mmahadevan108 ?

Also, I received the following failure for the 500us lp_ticker test case:

[1476307177.33][CONN][RXD] >>> Running case #1: '500us lp_ticker'...
[1476307177.37][CONN][INF] found KV pair in stream: {{__testcase_start;500us lp_ticker}}, queued...
[1476307177.58][CONN][RXD] :58::FAIL: Values Not Within Delta 600 Expected 500 Was 143725
[1476307177.62][CONN][INF] found KV pair in stream: {{__testcase_finish;500us lp_ticker;0;1}}, queued...
[1476307177.70][CONN][RXD] >>> '500us lp_ticker': 0 passed, 1 failed with reason 'Test Cases Failed'

The line :58::FAIL: Values Not Within Delta 600 Expected 500 Was 143725 actually comes from the device, not the tools, meaning that the value described was measured by the on board timers. This one was very intermittent, but could be a fairly big issue.

EDIT: I mistakenly labled the 500us lp_ticker case as the 1s lp_ticker deepsleep case, copy and paste error!

@mmahadevan108
Copy link
Contributor Author

I am confused by your analysis. The comment says the failure is related to deepsleep test but the test log shows failures in 500us lp_ticker which is different.

Running case #1: '500us lp_ticker'...
'500us lp_ticker': 0 passed, 1 failed with reason 'Test Cases Failed'

I have not seen this failures in this test case after running multiple times.

I have no idea on the serial issue, why would it show up only when running this test. Could it be related to the amount of time the test waits for deepsleep to complete.

@bridadan
Copy link
Contributor

@mmahadevan108 You're right, I mistakenly commented that the case was the deepsleep test, sorry about that! I meant to write it was the 500 us lp_ticker test. I only saw it happen once, so it may be a very rare case when it happens, but because the failure message was so clear I wanted to post it here in case you had any ideas.

@mmahadevan108
Copy link
Contributor Author

No idea. I have not been able to reproduce failure in the 500us lp_ticker case. The sleep code is fairly simple.

@bridadan
Copy link
Contributor

With regards to the deepsleep test, deepsleep shuts off the UART peripheral, correct? This would be a good explanation as to why we're seeing the data get corrupted.

The thing is, there shouldn't be any more serial data in the buffers since putc should be blocking until the data has actually been put across the serial lines, right? Or is putc putting the serial data into a FIFO? If that's the case, it's totally possible that the deepsleep is call is shutting off the UART peripheral before all the data is sent.

@mmahadevan108
Copy link
Contributor Author

The UART does have a FIFO. I could potentially flush the serial FIFO in the deep sleep function before going into deepsleep mode.

@bridadan
Copy link
Contributor

We've actually come across this before, and there has been quite a lengthy discussion on this: #1849

It looks like I was mistaken about putc, it is not intended to be 100% blocking, meaning waiting until the data goes out over the lines. It still allows for data to be in the UART FIFO buffers when it returns, which is for performance reasons.

We may need to look into flushing the buffers in the test framework each time to ensure the all the output has been sent. This affects other platforms, not just this one.

This particular issue shouldn't block this PR though. As far as the 500us lp_ticker test, if we start to see it more often I suppose we can always come back to it.

@sg-
Copy link
Contributor

sg- commented Oct 13, 2016

Sounds like this problem exists across most all boards. A wait(baud/10) should do the trick in the test until the HAL behavior is better defined.

@bridadan
Copy link
Contributor

Yeah most likely that's best we can do in terms of a fix for now.

Since the test framework is using RawSerial, it's essentially calling the serial C hal directly. Maybe we need to extend the C hal and the SerialBase class with a function for checking to see if there is anything in the FIFO?

@bridadan
Copy link
Contributor

@mmahadevan108 There's a conflict with targets/targets.json, could you please resolve it?

@mmahadevan108
Copy link
Contributor Author

I have updated the PR to resolve the conflict in targets,json

@bridadan
Copy link
Contributor

Thanks @mmahadevan108 !

/morph test

@mbed-bot
Copy link

Result: SUCCESS

Your command has finished executing! Here's what you wrote!

/morph test

Output

mbed Build Number: 0

All builds and test passed!

@bridadan
Copy link
Contributor

@sg- and @0xc0170 if you're happy I'm happy! LGTM 👍

@mmahadevan108
Copy link
Contributor Author

@maclobdell I have added some additions to the PinNames.h file to include pins used to communicate with the RF chip. Thanks Mac for finding this.

@bridadan
Copy link
Contributor

/morph test

Signed-off-by: Mahadevan Mahesh <Mahesh.Mahadevan@nxp.com>
… than setting the clock mode.

Signed-off-by: Mahadevan Mahesh <Mahesh.Mahadevan@nxp.com>
@mmahadevan108
Copy link
Contributor Author

@bridadan @maclobdell
I have update the branch to add the below define to PeripheralNames.h.

/* SPI defines used to communicate with the MCR20 RF device */
#define MCR20A_SPI_MOSI PTB16
#define MCR20A_SPI_MISO PTB17
#define MCR20A_SPI_SCLK PTB11
#define MCR20A_SPI_CS PTB10
#define MCR20A_SPI_RST PTB19
#define MCR20A_SPI_IRQ PTB3

This is to fix issues seen when testing the MCR20 RF driver. I think this should be the last update needed. Apologies for these late additions.

@mbed-bot
Copy link

Result: FAILURE

Your command has finished executing! Here's what you wrote!

/morph test

@bridadan
Copy link
Contributor

@mmahadevan108 No worries, that explains the above failure. Thanks for the update!

/morph test

@mazimkhan
Copy link

retest mbed-os

1 similar comment
@mazimkhan
Copy link

retest mbed-os

@mbed-bot
Copy link

Result: SUCCESS

Your command has finished executing! Here's what you wrote!

/morph test

Output

mbed Build Number: 0

All builds and test passed!

@sg- sg- merged commit 0650988 into ARMmbed:master Oct 19, 2016
@mmahadevan108 mmahadevan108 deleted the Add_KW24_Support branch October 20, 2016 15:07
aisair pushed a commit to aisair/mbed that referenced this pull request Apr 30, 2024
Ports for Upcoming Targets


Fixes and Changes

2966: Add kw24 support ARMmbed/mbed-os#2966
3068: MultiTech mDot - clean up PeripheralPins.c and add new pin names ARMmbed/mbed-os#3068
3089: Kinetis HAL: Remove clock initialization code from serial and ticker  ARMmbed/mbed-os#3089
2943: [NRF5] NVIC_SetVector functionality ARMmbed/mbed-os#2943
2938: InterruptIn changes in NCS36510 HAL. ARMmbed/mbed-os#2938
3108: Fix sleep function for NRF52. ARMmbed/mbed-os#3108
3076: STM32F1: Correct timer master value reading ARMmbed/mbed-os#3076
3085: Add LOWPOWERTIMER capability for NUCLEO_F303ZE ARMmbed/mbed-os#3085
3046: [BEETLE] Update BLE stack on Beetle board ARMmbed/mbed-os#3046
3122: [Silicon Labs] Update of Silicon Labs HAL ARMmbed/mbed-os#3122
3022: OnSemi RAM usage fix ARMmbed/mbed-os#3022
3121: STM32F3: Correct UART4 and UART5 defines when using DEVICE_SERIAL_ASYNCH ARMmbed/mbed-os#3121
3142: Targets- NUMAKER_PFM_NUC47216 remove mbed 2 ARMmbed/mbed-os#3142
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants