mbed-ce / mbed-os

Arm Mbed OS is a platform operating system designed for the internet of things
https://mbed.com
Other
37 stars 12 forks source link

Fix PWM API for reading period and pulsewidth on LPC1768 #274

Closed multiplemonomials closed 2 months ago

multiplemonomials commented 2 months ago

Summary of changes

I've been working on testing out my new CI test shield with LPC1768, and I'm trying to actually fix the tests for this target so that I can prove the board itself works.

First up is the PwmOut tests: my CI shield tests discovered that the pwmout_read_period_us() and pwmout_read_pulsewidth_us() functions don't actually work and never have (since 2013 or earlier!). They return the counts value from the PWM register rather than a microseconds value as expected.

Additionally, pwmout_free() was never implemented, so stopping a PWM would not work as expected.

In this PR I updated these functions to actually work, so that LPC1768 can now pass my test shield PWM tests. Additionally, I fixed some compile errors related to earlier changes made to semihosting -- since semihosting is now an option instead of a TARGET_ define, there were some places in the code that were missed and had to be updated.

Impact of changes

Migration actions required

Documentation


Pull request type

[X] Patch update (Bug fix / Target update / Docs update / Test update / Refactor)
[] Feature update (New feature / Functionality change / New API)
[] Major update (Breaking change E.g. Return code change / API behaviour change)

Test results

[] No Tests required for this change (E.g docs only update)
[] Covered by existing mbed-os tests (Greentea or Unittest)
[X] Tests / results supplied as part of this PR

Passes my PWM test shield test:

8: Executing: /home/jamie/Mbed/mbed-ce-test-tools/CI-Shield-Tests/mbed-os/venv/bin/python3.10 -m mbed_host_tests.mbedhtrun --skip-flashing -p /dev/ttyLPC1768 --skip-reset -e /home/jamie/Mbed/mbed-ce-test-tools/CI-Shield-Tests/host_tests -m LPC1768 --baud-rate=115200
8: [1714667476.74][HTST][INF] host test executor ver. 0.0.16
8: [1714667476.74][HTST][INF] copy image onto target... SKIPPED!
8: [1714667476.76][HTST][INF] starting host test process...
8: [1714667476.77][CONN][INF] starting connection process...
8: [1714667476.78][CONN][INF] notify event queue about extra 60 sec timeout for serial port pooling
8: [1714667476.78][CONN][INF] initializing serial port listener... 
8: [1714667476.78][SERI][INF] using specified port '/dev/ttyLPC1768'
8: [1714667476.78][HTST][INF] setting timeout to: 60 sec
8: [1714667476.78][SERI][INF] serial(port=/dev/ttyLPC1768, baudrate=115200, read_timeout=0.01, write_timeout=5)
8: [1714667476.79][SERI][TXD] mbedmbedmbedmbedmbedmbedmbedmbedmbedmbed
8: [1714667476.79][CONN][INF] sending up to 2 __sync packets (specified with --sync=2)
8: [1714667476.79][CONN][INF] sending preamble '92a66a8f-0c49-4b12-be5c-fa5b4b3194f9'
8: [1714667476.79][SERI][TXD] {{__sync;92a66a8f-0c49-4b12-be5c-fa5b4b3194f9}}
8: [1714667476.80][CONN][RXD] mbedmbedmbedmbedmbedmbedmbedmbed
8: [1714667476.81][CONN][RXD] >>> Running 9 test cases...
8: [1714667476.81][CONN][INF] found SYNC in stream: {{__sync;92a66a8f-0c49-4b12-be5c-fa5b4b3194f9}} it is #0 sent, queued...
8: [1714667476.81][HTST][INF] sync KV found, uuid=92a66a8f-0c49-4b12-be5c-fa5b4b3194f9, timestamp=1714667476.813233
8: [1714667476.82][CONN][INF] found KV pair in stream: {{__version;1.3.0}}, queued...
8: [1714667476.82][CONN][INF] found KV pair in stream: {{__timeout;60}}, queued...
8: [1714667476.82][CONN][INF] found KV pair in stream: {{__host_test_name;signal_analyzer_test}}, queued...
8: [1714667476.82][HTST][INF] DUT greentea-client version: 1.3.0
8: [1714667476.82][HTST][INF] setting timeout to: 60 sec
8: [1714667476.82][HTST][INF] host test class: '<class 'signal_analyzer_test.SignalAnalyzerHostTest'>'
8: [1714667476.82][TEST][INF] Signal Analyzer Test host test setup complete.
8: [1714667476.82][HTST][INF] host test setup() call...
8: [1714667476.82][HTST][INF] CALLBACKs updated
8: [1714667476.82][HTST][INF] host test detected: signal_analyzer_test
8: [1714667476.83][CONN][INF] found KV pair in stream: {{__testcase_name;Test reading digital values with the ADC}}, queued...
8: [1714667476.83][CONN][INF] found KV pair in stream: {{__testcase_name;Test reading analog values with the ADC}}, queued...
8: [1714667476.84][CONN][INF] found KV pair in stream: {{__testcase_name;Test PWM frequency and duty cycle (freq = 50 Hz)}}, queued...
8: [1714667476.84][CONN][INF] found KV pair in stream: {{__testcase_name;Test PWM frequency and duty cycle (freq = 1 kHz)}}, queued...
8: [1714667476.85][CONN][INF] found KV pair in stream: {{__testcase_name;Test PWM frequency and duty cycle (freq = 10 kHz)}}, queued...
8: [1714667476.85][CONN][INF] found KV pair in stream: {{__testcase_name;Test PWM frequency and duty cycle (freq = 100 kHz)}}, queued...
8: [1714667476.86][CONN][INF] found KV pair in stream: {{__testcase_name;Test PWM frequency and duty cycle (freq = 1 MHz)}}, queued...
8: [1714667476.87][CONN][RXD] 
8: [1714667476.87][CONN][INF] found KV pair in stream: {{__testcase_name;Test PWM Suspend/Resume (freq = 1kHz)}}, queued...
8: [1714667476.87][CONN][INF] found KV pair in stream: {{__testcase_name;Test PWM Maintains Duty Cycle (freq = 1kHz)}}, queued...
8: [1714667476.88][CONN][RXD] >>> Running case #1: 'Test reading digital values with the ADC'...
8: [1714667476.88][CONN][INF] found KV pair in stream: {{__testcase_start;Test reading digital values with the ADC}}, queued...
8: [1714667476.91][CONN][RXD] With the PWM at full off, the ADC reads 0.0% of reference voltage.
8: [1714667476.97][CONN][RXD] With the PWM at full on, the ADC reads 99.8% of reference voltage.
8: [1714667476.97][CONN][INF] found KV pair in stream: {{__testcase_finish;Test reading digital values with the ADC;1;0}}, queued...
8: [1714667476.98][CONN][RXD] >>> 'Test reading digital values with the ADC': 1 passed, 0 failed
8: [1714667476.98][CONN][RXD] <greentea test suite>:0::PASS
8: [1714667476.99][CONN][RXD] Cannot convert to volts, target.default-adc-vref is not set for this target
8: [1714667476.99][CONN][RXD] >>> Running case #2: 'Test reading analog values with the ADC'...
8: [1714667476.99][CONN][INF] found KV pair in stream: {{__testcase_start;Test reading analog values with the ADC}}, queued...
8: [1714667477.03][CONN][RXD] PWM duty cycle of 0.0% produced an ADC reading of 0.0% (expected 0.0%)
8: [1714667477.08][CONN][RXD] PWM duty cycle of 10.0% produced an ADC reading of 9.8% (expected 10.0%)
8: [1714667477.13][CONN][RXD] PWM duty cycle of 20.0% produced an ADC reading of 19.6% (expected 20.0%)
8: [1714667477.19][CONN][RXD] PWM duty cycle of 30.0% produced an ADC reading of 30.0% (expected 29.9%)
8: [1714667477.23][CONN][RXD] PWM duty cycle of 40.0% produced an ADC reading of 40.3% (expected 39.9%)
8: [1714667477.28][CONN][RXD] PWM duty cycle of 50.0% produced an ADC reading of 50.5% (expected 49.9%)
8: [1714667477.33][CONN][RXD] PWM duty cycle of 60.0% produced an ADC reading of 60.6% (expected 59.9%)
8: [1714667477.38][CONN][RXD] PWM duty cycle of 70.0% produced an ADC reading of 69.9% (expected 69.8%)
8: [1714667477.43][CONN][RXD] PWM duty cycle of 80.0% produced an ADC reading of 80.0% (expected 79.8%)
8: [1714667477.48][CONN][RXD] PWM duty cycle of 90.0% produced an ADC reading of 89.7% (expected 89.8%)
8: [1714667477.48][CONN][INF] found KV pair in stream: {{__testcase_finish;Test reading analog values with the ADC;1;0}}, queued...
8: [1714667477.50][CONN][RXD] >>> 'Test reading analog values with the ADC': 1 passed, 0 failed
8: [1714667477.50][CONN][RXD] <greentea test suite>:0::PASS
8: [1714667477.50][CONN][RXD] 
8: [1714667477.51][CONN][RXD] >>> Running case #3: 'Test PWM frequency and duty cycle (freq = 50 Hz)'...
8: [1714667477.51][CONN][INF] found KV pair in stream: {{__testcase_start;Test PWM frequency and duty cycle (freq = 50 Hz)}}, queued...
8: [1714667477.51][CONN][INF] found KV pair in stream: {{analyze_signal;please}}, queued...
8: [1714667479.11][SERI][TXD] {{frequency;50.0}}
8: [1714667479.12][SERI][TXD] {{duty_cycle;0.053192367019082455}}
8: [1714667479.14][CONN][RXD] Expected PWM frequency was 50 Hz (+- 20 Hz) and duty cycle was 5.32% (+-0.10%), host measured frequency 50 Hz and duty cycle 5.32%
8: [1714667479.14][CONN][INF] found KV pair in stream: {{analyze_signal;please}}, queued...
8: [1714667480.73][SERI][TXD] {{frequency;50.0}}
8: [1714667480.74][SERI][TXD] {{duty_cycle;0.16010459973850066}}
8: [1714667480.76][CONN][RXD] Expected PWM frequency was 50 Hz (+- 20 Hz) and duty cycle was 16.01% (+-0.10%), host measured frequency 50 Hz and duty cycle 16.01%
8: [1714667480.76][CONN][INF] found KV pair in stream: {{analyze_signal;please}}, queued...
8: [1714667482.37][SERI][TXD] {{frequency;50.0}}
8: [1714667482.38][SERI][TXD] {{duty_cycle;0.6614058464853838}}
8: [1714667482.40][CONN][RXD] Expected PWM frequency was 50 Hz (+- 20 Hz) and duty cycle was 66.14% (+-0.10%), host measured frequency 50 Hz and duty cycle 66.14%
8: [1714667482.40][CONN][INF] found KV pair in stream: {{analyze_signal;please}}, queued...
8: [1714667484.01][SERI][TXD] {{frequency;50.0}}
8: [1714667484.02][SERI][TXD] {{duty_cycle;0.8503853740365649}}
8: [1714667484.04][CONN][RXD] Expected PWM frequency was 50 Hz (+- 20 Hz) and duty cycle was 85.04% (+-0.10%), host measured frequency 50 Hz and duty cycle 85.04%
8: [1714667484.04][CONN][INF] found KV pair in stream: {{analyze_signal;please}}, queued...
8: [1714667485.63][SERI][TXD] {{frequency;50.0}}
8: [1714667485.64][SERI][TXD] {{duty_cycle;0.6394734013164967}}
8: [1714667485.67][CONN][RXD] Expected PWM frequency was 50 Hz (+- 20 Hz) and duty cycle was 63.95% (+-0.10%), host measured frequency 50 Hz and duty cycle 63.95%
8: [1714667485.68][CONN][RXD] >>> 'Test PWM frequency and duty cycle (freq = 50 Hz)': 1 passed, 0 failed
8: [1714667485.68][CONN][INF] found KV pair in stream: {{__testcase_finish;Test PWM frequency and duty cycle (freq = 50 Hz);1;0}}, queued...
8: [1714667485.69][CONN][RXD] <greentea test suite>:0::PASS
8: [1714667485.69][CONN][RXD] 
8: [1714667485.69][CONN][RXD] >>> Running case #4: 'Test PWM frequency and duty cycle (freq = 1 kHz)'...
8: [1714667485.70][CONN][INF] found KV pair in stream: {{__testcase_start;Test PWM frequency and duty cycle (freq = 1 kHz)}}, queued...
8: [1714667485.70][CONN][INF] found KV pair in stream: {{analyze_signal;please}}, queued...
8: [1714667487.30][SERI][TXD] {{frequency;1000.0}}
8: [1714667487.31][SERI][TXD] {{duty_cycle;0.6189134527163682}}
8: [1714667487.33][CONN][RXD] Expected PWM frequency was 1000 Hz (+- 20 Hz) and duty cycle was 61.89% (+-0.10%), host measured frequency 1000 Hz and duty cycle 61.89%
8: [1714667487.33][CONN][INF] found KV pair in stream: {{analyze_signal;please}}, queued...
8: [1714667488.92][SERI][TXD] {{frequency;1000.0}}
8: [1714667488.94][SERI][TXD] {{duty_cycle;0.41496396259009355}}
8: [1714667488.96][CONN][RXD] Expected PWM frequency was 1000 Hz (+- 20 Hz) and duty cycle was 41.49% (+-0.10%), host measured frequency 1000 Hz and duty cycle 41.50%
8: [1714667488.96][CONN][INF] found KV pair in stream: {{analyze_signal;please}}, queued...
8: [1714667490.56][SERI][TXD] {{frequency;1000.0}}
8: [1714667490.57][SERI][TXD] {{duty_cycle;0.7679680800797998}}
8: [1714667490.59][CONN][RXD] Expected PWM frequency was 1000 Hz (+- 20 Hz) and duty cycle was 76.80% (+-0.10%), host measured frequency 1000 Hz and duty cycle 76.80%
8: [1714667490.59][CONN][INF] found KV pair in stream: {{analyze_signal;please}}, queued...
8: [1714667492.20][SERI][TXD] {{frequency;1000.0}}
8: [1714667492.21][SERI][TXD] {{duty_cycle;0.9824975437561406}}
8: [1714667492.23][CONN][RXD] Expected PWM frequency was 1000 Hz (+- 20 Hz) and duty cycle was 98.25% (+-0.10%), host measured frequency 1000 Hz and duty cycle 98.25%
8: [1714667492.24][CONN][INF] found KV pair in stream: {{analyze_signal;please}}, queued...
8: [1714667493.83][SERI][TXD] {{frequency;1000.0}}
8: [1714667493.84][SERI][TXD] {{duty_cycle;0.48712628218429455}}
8: [1714667493.86][CONN][RXD] Expected PWM frequency was 1000 Hz (+- 20 Hz) and duty cycle was 48.71% (+-0.10%), host measured frequency 1000 Hz and duty cycle 48.71%
8: [1714667493.87][CONN][RXD] >>> 'Test PWM frequency and duty cycle (freq = 1 kHz)': 1 passed, 0 failed
8: [1714667493.87][CONN][INF] found KV pair in stream: {{__testcase_finish;Test PWM frequency and duty cycle (freq = 1 kHz);1;0}}, queued...
8: [1714667493.88][CONN][RXD] <greentea test suite>:0::PASS
8: [1714667493.88][CONN][RXD] 
8: [1714667493.89][CONN][RXD] >>> Running case #5: 'Test PWM frequency and duty cycle (freq = 10 kHz)'...
8: [1714667493.90][CONN][INF] found KV pair in stream: {{__testcase_start;Test PWM frequency and duty cycle (freq = 10 kHz)}}, queued...
8: [1714667493.90][CONN][INF] found KV pair in stream: {{analyze_signal;please}}, queued...
8: [1714667495.50][SERI][TXD] {{frequency;10000.0}}
8: [1714667495.51][SERI][TXD] {{duty_cycle;0.7959780100549748}}
8: [1714667495.53][CONN][RXD] Expected PWM frequency was 10000 Hz (+- 20 Hz) and duty cycle was 79.60% (+-0.10%), host measured frequency 10000 Hz and duty cycle 79.60%
8: [1714667495.53][CONN][INF] found KV pair in stream: {{analyze_signal;please}}, queued...
8: [1714667497.14][SERI][TXD] {{frequency;10000.0}}
8: [1714667497.15][SERI][TXD] {{duty_cycle;0.96960007599981}}
8: [1714667497.17][CONN][RXD] Expected PWM frequency was 10000 Hz (+- 20 Hz) and duty cycle was 96.95% (+-0.10%), host measured frequency 10000 Hz and duty cycle 96.96%
8: [1714667497.17][CONN][INF] found KV pair in stream: {{analyze_signal;please}}, queued...
8: [1714667498.76][SERI][TXD] {{frequency;10000.0}}
8: [1714667498.78][SERI][TXD] {{duty_cycle;0.2456643858390354}}
8: [1714667498.80][CONN][RXD] Expected PWM frequency was 10000 Hz (+- 20 Hz) and duty cycle was 24.59% (+-0.10%), host measured frequency 10000 Hz and duty cycle 24.57%
8: [1714667498.80][CONN][INF] found KV pair in stream: {{analyze_signal;please}}, queued...
8: [1714667500.40][SERI][TXD] {{frequency;10000.0}}
8: [1714667500.41][SERI][TXD] {{duty_cycle;0.8312179219551951}}
8: [1714667500.43][CONN][RXD] Expected PWM frequency was 10000 Hz (+- 20 Hz) and duty cycle was 83.13% (+-0.10%), host measured frequency 10000 Hz and duty cycle 83.12%
8: [1714667500.43][CONN][INF] found KV pair in stream: {{analyze_signal;please}}, queued...
8: [1714667502.03][SERI][TXD] {{frequency;10000.0}}
8: [1714667502.04][SERI][TXD] {{duty_cycle;0.2928342679143302}}
8: [1714667502.06][CONN][RXD] Expected PWM frequency was 10000 Hz (+- 20 Hz) and duty cycle was 29.28% (+-0.10%), host measured frequency 10000 Hz and duty cycle 29.28%
8: [1714667502.07][CONN][RXD] >>> 'Test PWM frequency and duty cycle (freq = 10 kHz)': 1 passed, 0 failed
8: [1714667502.07][CONN][INF] found KV pair in stream: {{__testcase_finish;Test PWM frequency and duty cycle (freq = 10 kHz);1;0}}, queued...
8: [1714667502.08][CONN][RXD] <greentea test suite>:0::PASS
8: [1714667502.08][CONN][RXD] 
8: [1714667502.08][CONN][RXD] >>> Running case #6: 'Test PWM frequency and duty cycle (freq = 100 kHz)'...
8: [1714667502.09][CONN][INF] found KV pair in stream: {{__testcase_start;Test PWM frequency and duty cycle (freq = 100 kHz)}}, queued...
8: [1714667502.10][CONN][INF] found KV pair in stream: {{analyze_signal;please}}, queued...
8: [1714667503.69][SERI][TXD] {{frequency;100000.0}}
8: [1714667503.70][SERI][TXD] {{duty_cycle;0.34997412506468734}}
8: [1714667503.72][CONN][RXD] Expected PWM frequency was 100000 Hz (+- 20 Hz) and duty cycle was 34.90% (+-1.00%), host measured frequency 100000 Hz and duty cycle 35.00%
8: [1714667503.72][CONN][INF] found KV pair in stream: {{analyze_signal;please}}, queued...
8: [1714667505.32][SERI][TXD] {{frequency;100000.0}}
8: [1714667505.33][SERI][TXD] {{duty_cycle;0.22163694590763522}}
8: [1714667505.35][CONN][RXD] Expected PWM frequency was 100000 Hz (+- 20 Hz) and duty cycle was 22.19% (+-1.00%), host measured frequency 100000 Hz and duty cycle 22.16%
8: [1714667505.35][CONN][INF] found KV pair in stream: {{analyze_signal;please}}, queued...
8: [1714667506.96][SERI][TXD] {{frequency;100000.0}}
8: [1714667506.97][SERI][TXD] {{duty_cycle;0.62879092802268}}
8: [1714667506.99][CONN][RXD] Expected PWM frequency was 100000 Hz (+- 20 Hz) and duty cycle was 63.09% (+-1.00%), host measured frequency 100000 Hz and duty cycle 62.88%
8: [1714667506.99][CONN][INF] found KV pair in stream: {{analyze_signal;please}}, queued...
8: [1714667508.59][SERI][TXD] {{frequency;100000.0}}
8: [1714667508.61][SERI][TXD] {{duty_cycle;0.8135054662363345}}
8: [1714667508.63][CONN][RXD] Expected PWM frequency was 100000 Hz (+- 20 Hz) and duty cycle was 81.33% (+-1.00%), host measured frequency 100000 Hz and duty cycle 81.35%
8: [1714667508.63][CONN][INF] found KV pair in stream: {{analyze_signal;please}}, queued...
8: [1714667510.23][SERI][TXD] {{frequency;100000.0}}
8: [1714667510.24][SERI][TXD] {{duty_cycle;0.49500376249059375}}
8: [1714667510.26][CONN][RXD] Expected PWM frequency was 100000 Hz (+- 20 Hz) and duty cycle was 49.56% (+-1.00%), host measured frequency 100000 Hz and duty cycle 49.50%
8: [1714667510.27][CONN][RXD] >>> 'Test PWM frequency and duty cycle (freq = 100 kHz)': 1 passed, 0 failed
8: [1714667510.27][CONN][INF] found KV pair in stream: {{__testcase_finish;Test PWM frequency and duty cycle (freq = 100 kHz);1;0}}, queued...
8: [1714667510.29][CONN][RXD] <greentea test suite>:0::PASS
8: [1714667510.29][CONN][RXD] 
8: [1714667510.29][CONN][RXD] >>> Running case #7: 'Test PWM frequency and duty cycle (freq = 1 MHz)'...
8: [1714667510.30][CONN][INF] found KV pair in stream: {{__testcase_start;Test PWM frequency and duty cycle (freq = 1 MHz)}}, queued...
8: [1714667510.30][CONN][INF] found KV pair in stream: {{analyze_signal;please}}, queued...
8: [1714667511.92][SERI][TXD] {{frequency;999990.0}}
8: [1714667511.93][SERI][TXD] {{duty_cycle;0.29685925785185535}}
8: [1714667511.95][CONN][RXD] Expected PWM frequency was 1000000 Hz (+- 20 Hz) and duty cycle was 30.80% (+-10.00%), host measured frequency 999990 Hz and duty cycle 29.69%
8: [1714667511.95][CONN][INF] found KV pair in stream: {{analyze_signal;please}}, queued...
8: [1714667513.56][SERI][TXD] {{frequency;999980.0}}
8: [1714667513.57][SERI][TXD] {{duty_cycle;0.4645263386841533}}
8: [1714667513.60][CONN][RXD] Expected PWM frequency was 1000000 Hz (+- 20 Hz) and duty cycle was 46.96% (+-10.00%), host measured frequency 999980 Hz and duty cycle 46.45%
8: [1714667513.60][CONN][INF] found KV pair in stream: {{analyze_signal;please}}, queued...
8: [1714667515.21][SERI][TXD] {{frequency;999990.0}}
8: [1714667515.22][SERI][TXD] {{duty_cycle;0.342241644395889}}
8: [1714667515.24][CONN][RXD] Expected PWM frequency was 1000000 Hz (+- 20 Hz) and duty cycle was 34.13% (+-10.00%), host measured frequency 999990 Hz and duty cycle 34.22%
8: [1714667515.24][CONN][INF] found KV pair in stream: {{analyze_signal;please}}, queued...
8: [1714667516.86][SERI][TXD] {{frequency;999990.0}}
8: [1714667516.87][SERI][TXD] {{duty_cycle;0.3369016577458556}}
8: [1714667516.89][CONN][RXD] Expected PWM frequency was 1000000 Hz (+- 20 Hz) and duty cycle was 35.34% (+-10.00%), host measured frequency 999990 Hz and duty cycle 33.69%
8: [1714667516.89][CONN][INF] found KV pair in stream: {{analyze_signal;please}}, queued...
8: [1714667518.51][SERI][TXD] {{frequency;999990.0}}
8: [1714667518.52][SERI][TXD] {{duty_cycle;0.46656633358416605}}
8: [1714667518.54][CONN][RXD] Expected PWM frequency was 1000000 Hz (+- 20 Hz) and duty cycle was 44.74% (+-10.00%), host measured frequency 999990 Hz and duty cycle 46.66%
8: [1714667518.55][CONN][RXD] >>> 'Test PWM frequency and duty cycle (freq = 1 MHz)': 1 passed, 0 failed
8: [1714667518.55][CONN][INF] found KV pair in stream: {{__testcase_finish;Test PWM frequency and duty cycle (freq = 1 MHz);1;0}}, queued...
8: [1714667518.56][CONN][RXD] <greentea test suite>:0::PASS
8: [1714667518.56][CONN][RXD] 
8: [1714667518.57][CONN][RXD] >>> Running case #8: 'Test PWM Suspend/Resume (freq = 1kHz)'...
8: [1714667518.58][CONN][INF] found KV pair in stream: {{__testcase_start;Test PWM Suspend/Resume (freq = 1kHz)}}, queued...
8: [1714667518.58][CONN][INF] found KV pair in stream: {{analyze_signal;please}}, queued...
8: [1714667520.18][SERI][TXD] {{frequency;1000.0}}
8: [1714667520.19][SERI][TXD] {{duty_cycle;0.7499931250171875}}
8: [1714667520.21][CONN][RXD] Expected PWM frequency was 1000 Hz (+- 20 Hz) and duty cycle was 75.00% (+-0.10%), host measured frequency 1000 Hz and duty cycle 75.00%
8: [1714667520.21][CONN][INF] found KV pair in stream: {{analyze_signal;please}}, queued...
8: [1714667521.81][SERI][TXD] {{frequency;0.0}}
8: [1714667521.82][SERI][TXD] {{duty_cycle;0.0}}
8: [1714667521.84][CONN][RXD] Expected PWM frequency was 0 Hz (+- 20 Hz) and duty cycle was 0.00% (+-0.10%), host measured frequency 0 Hz and duty cycle 0.00%
8: [1714667521.84][CONN][INF] found KV pair in stream: {{analyze_signal;please}}, queued...
8: [1714667523.45][SERI][TXD] {{frequency;1000.0}}
8: [1714667523.46][SERI][TXD] {{duty_cycle;0.7499981250046875}}
8: [1714667523.48][CONN][RXD] Expected PWM frequency was 1000 Hz (+- 20 Hz) and duty cycle was 75.00% (+-0.10%), host measured frequency 1000 Hz and duty cycle 75.00%
8: [1714667523.49][CONN][RXD] >>> 'Test PWM Suspend/Resume (freq = 1kHz)': 1 passed, 0 failed
8: [1714667523.49][CONN][RXD] <greentea test suite>:0::PASS
8: [1714667523.49][CONN][RXD] 
8: [1714667523.49][CONN][INF] found KV pair in stream: {{__testcase_finish;Test PWM Suspend/Resume (freq = 1kHz);1;0}}, queued...
8: [1714667523.50][CONN][RXD] >>> Running case #9: 'Test PWM Maintains Duty Cycle (freq = 1kHz)'...
8: [1714667523.50][CONN][INF] found KV pair in stream: {{__testcase_start;Test PWM Maintains Duty Cycle (freq = 1kHz)}}, queued...
8: [1714667523.51][CONN][INF] found KV pair in stream: {{analyze_signal;please}}, queued...
8: [1714667525.12][SERI][TXD] {{frequency;1000.0}}
8: [1714667525.13][SERI][TXD] {{duty_cycle;0.7499981250046875}}
8: [1714667525.15][CONN][RXD] Expected PWM frequency was 1000 Hz (+- 20 Hz) and duty cycle was 75.00% (+-0.10%), host measured frequency 1000 Hz and duty cycle 75.00%
8: [1714667525.15][CONN][INF] found KV pair in stream: {{analyze_signal;please}}, queued...
8: [1714667526.76][SERI][TXD] {{frequency;40000.0}}
8: [1714667526.77][SERI][TXD] {{duty_cycle;0.7499981250046875}}
8: [1714667526.79][CONN][RXD] Expected PWM frequency was 40000 Hz (+- 20 Hz) and duty cycle was 75.00% (+-0.40%), host measured frequency 40000 Hz and duty cycle 75.00%
8: [1714667526.79][CONN][INF] found KV pair in stream: {{analyze_signal;please}}, queued...
8: [1714667528.40][SERI][TXD] {{frequency;200.0}}
8: [1714667528.41][SERI][TXD] {{duty_cycle;0.7499931250171875}}
8: [1714667528.43][CONN][RXD] Expected PWM frequency was 200 Hz (+- 20 Hz) and duty cycle was 75.00% (+-0.10%), host measured frequency 200 Hz and duty cycle 75.00%
8: [1714667528.44][CONN][RXD] >>> 'Test PWM Maintains Duty Cycle (freq = 1kHz)': 1 passed, 0 failed
8: [1714667528.44][CONN][RXD] <greentea test suite>:0::PASS
8: [1714667528.44][CONN][RXD] 
8: [1714667528.44][CONN][INF] found KV pair in stream: {{__testcase_finish;Test PWM Maintains Duty Cycle (freq = 1kHz);1;0}}, queued...
8: [1714667528.45][CONN][RXD] >>> Test cases: 9 passed, 0 failed
8: [1714667528.45][CONN][RXD] 
8: [1714667528.45][CONN][RXD] -----------------------
8: [1714667528.45][CONN][RXD] 0 Tests 0 Failures 0 Ignored 
8: [1714667528.45][CONN][RXD] OK
8: [1714667528.45][CONN][INF] found KV pair in stream: {{__testcase_summary;9;0}}, queued...
8: [1714667528.45][CONN][INF] found KV pair in stream: {{end;success}}, queued...
8: [1714667528.46][HTST][INF] __notify_complete(True)
8: [1714667528.46][HTST][INF] __exit_event_queue received
8: [1714667528.46][HTST][INF] test suite run finished after 51.64 sec...
8: [1714667528.46][CONN][INF] found KV pair in stream: {{__exit;0}}, queued...
8: [1714667528.47][CONN][INF] received special event '__host_test_finished' value='True', finishing
8: [1714667528.47][HTST][INF] CONN exited with code: 0
8: [1714667528.47][HTST][INF] Some events in queue
8: [1714667528.47][HTST][INF] stopped consuming events
8: [1714667528.47][HTST][INF] host test result() call skipped, received: True
8: [1714667528.47][HTST][WRN] missing __exit event from DUT
8: [1714667528.47][HTST][INF] calling blocking teardown()
8: [1714667528.47][HTST][INF] teardown() finished
8: [1714667528.48][HTST][INF] {{result;success}}
1/1 Test #8: test-testshield-pwm-and-adc ......   Passed   67.57 sec

The following tests passed:
        test-testshield-pwm-and-adc

100% tests passed, 0 tests failed out of 1

Reviewers