]> sigrok.org Git - sigrok-test.git/commitdiff
pwm: Add a few more test-cases.
authorUwe Hermann <redacted>
Thu, 15 Jun 2017 19:26:43 +0000 (21:26 +0200)
committerUwe Hermann <redacted>
Thu, 15 Jun 2017 19:26:43 +0000 (21:26 +0200)
decoder/test/pwm/spi_0x35_cpol0_cpha0_trigger_clk_falling_ok.bin_raw [new file with mode: 0644]
decoder/test/pwm/spi_0x35_cpol0_cpha0_trigger_clk_falling_ok.output [new file with mode: 0644]
decoder/test/pwm/spi_0x35_cpol0_cpha0_trigger_clk_falling_ok_initial1.bin_raw [new file with mode: 0644]
decoder/test/pwm/spi_0x35_cpol0_cpha0_trigger_clk_falling_ok_initial1.output [new file with mode: 0644]
decoder/test/pwm/spi_0x35_cpol0_cpha0_trigger_clk_rising_ok.bin_raw [new file with mode: 0644]
decoder/test/pwm/spi_0x35_cpol0_cpha0_trigger_clk_rising_ok.output [new file with mode: 0644]
decoder/test/pwm/spi_0x35_cpol0_cpha0_trigger_clk_rising_ok_initial0.bin_raw [new file with mode: 0644]
decoder/test/pwm/spi_0x35_cpol0_cpha0_trigger_clk_rising_ok_initial0.output [new file with mode: 0644]
decoder/test/pwm/test.conf

diff --git a/decoder/test/pwm/spi_0x35_cpol0_cpha0_trigger_clk_falling_ok.bin_raw b/decoder/test/pwm/spi_0x35_cpol0_cpha0_trigger_clk_falling_ok.bin_raw
new file mode 100644 (file)
index 0000000..c548be0
--- /dev/null
@@ -0,0 +1,30 @@
+0-0 pwm: 80
+1-1 pwm: 74
+2-2 pwm: 80
+3-3 pwm: 74
+4-4 pwm: 8b
+5-5 pwm: 80
+6-6 pwm: e6
+7-7 pwm: 74
+8-8 pwm: 8b
+9-9 pwm: 80
+10-10 pwm: 74
+11-11 pwm: 8b
+12-12 pwm: 80
+13-13 pwm: 8b
+14-14 pwm: e6
+15-15 pwm: 80
+16-16 pwm: 74
+17-17 pwm: 8b
+18-18 pwm: 80
+19-19 pwm: 74
+20-20 pwm: 8b
+21-21 pwm: 80
+22-22 pwm: e6
+23-23 pwm: 74
+24-24 pwm: 8b
+25-25 pwm: 80
+26-26 pwm: 74
+27-27 pwm: 80
+28-28 pwm: 74
+29-29 pwm: 8b
diff --git a/decoder/test/pwm/spi_0x35_cpol0_cpha0_trigger_clk_falling_ok.output b/decoder/test/pwm/spi_0x35_cpol0_cpha0_trigger_clk_falling_ok.output
new file mode 100644 (file)
index 0000000..329267a
--- /dev/null
@@ -0,0 +1,60 @@
+11-23 pwm: duty-cycle: "50.000000%"
+11-23 pwm: period: "750.0 ns"
+23-34 pwm: duty-cycle: "45.454545%"
+23-34 pwm: period: "687.5 ns"
+34-46 pwm: duty-cycle: "50.000000%"
+34-46 pwm: period: "750.0 ns"
+46-57 pwm: duty-cycle: "45.454545%"
+46-57 pwm: period: "687.5 ns"
+57-68 pwm: duty-cycle: "54.545455%"
+57-68 pwm: period: "687.5 ns"
+68-80 pwm: duty-cycle: "50.000000%"
+68-80 pwm: period: "750.0 ns"
+80-140 pwm: duty-cycle: "90.000000%"
+80-140 pwm: period: "3.8 μs"
+140-151 pwm: duty-cycle: "45.454545%"
+140-151 pwm: period: "687.5 ns"
+151-162 pwm: duty-cycle: "54.545455%"
+151-162 pwm: period: "687.5 ns"
+162-174 pwm: duty-cycle: "50.000000%"
+162-174 pwm: period: "750.0 ns"
+174-185 pwm: duty-cycle: "45.454545%"
+174-185 pwm: period: "687.5 ns"
+185-196 pwm: duty-cycle: "54.545455%"
+185-196 pwm: period: "687.5 ns"
+196-208 pwm: duty-cycle: "50.000000%"
+196-208 pwm: period: "750.0 ns"
+208-219 pwm: duty-cycle: "54.545455%"
+208-219 pwm: period: "687.5 ns"
+219-279 pwm: duty-cycle: "90.000000%"
+219-279 pwm: period: "3.8 μs"
+279-291 pwm: duty-cycle: "50.000000%"
+279-291 pwm: period: "750.0 ns"
+291-302 pwm: duty-cycle: "45.454545%"
+291-302 pwm: period: "687.5 ns"
+302-313 pwm: duty-cycle: "54.545455%"
+302-313 pwm: period: "687.5 ns"
+313-325 pwm: duty-cycle: "50.000000%"
+313-325 pwm: period: "750.0 ns"
+325-336 pwm: duty-cycle: "45.454545%"
+325-336 pwm: period: "687.5 ns"
+336-347 pwm: duty-cycle: "54.545455%"
+336-347 pwm: period: "687.5 ns"
+347-359 pwm: duty-cycle: "50.000000%"
+347-359 pwm: period: "750.0 ns"
+359-419 pwm: duty-cycle: "90.000000%"
+359-419 pwm: period: "3.8 μs"
+419-430 pwm: duty-cycle: "45.454545%"
+419-430 pwm: period: "687.5 ns"
+430-441 pwm: duty-cycle: "54.545455%"
+430-441 pwm: period: "687.5 ns"
+441-453 pwm: duty-cycle: "50.000000%"
+441-453 pwm: period: "750.0 ns"
+453-464 pwm: duty-cycle: "45.454545%"
+453-464 pwm: period: "687.5 ns"
+464-476 pwm: duty-cycle: "50.000000%"
+464-476 pwm: period: "750.0 ns"
+476-487 pwm: duty-cycle: "45.454545%"
+476-487 pwm: period: "687.5 ns"
+487-498 pwm: duty-cycle: "54.545455%"
+487-498 pwm: period: "687.5 ns"
diff --git a/decoder/test/pwm/spi_0x35_cpol0_cpha0_trigger_clk_falling_ok_initial1.bin_raw b/decoder/test/pwm/spi_0x35_cpol0_cpha0_trigger_clk_falling_ok_initial1.bin_raw
new file mode 100644 (file)
index 0000000..df58bde
--- /dev/null
@@ -0,0 +1,31 @@
+0-0 pwm: 8b
+1-1 pwm: 80
+2-2 pwm: 74
+3-3 pwm: 80
+4-4 pwm: 74
+5-5 pwm: 8b
+6-6 pwm: 80
+7-7 pwm: e6
+8-8 pwm: 74
+9-9 pwm: 8b
+10-10 pwm: 80
+11-11 pwm: 74
+12-12 pwm: 8b
+13-13 pwm: 80
+14-14 pwm: 8b
+15-15 pwm: e6
+16-16 pwm: 80
+17-17 pwm: 74
+18-18 pwm: 8b
+19-19 pwm: 80
+20-20 pwm: 74
+21-21 pwm: 8b
+22-22 pwm: 80
+23-23 pwm: e6
+24-24 pwm: 74
+25-25 pwm: 8b
+26-26 pwm: 80
+27-27 pwm: 74
+28-28 pwm: 80
+29-29 pwm: 74
+30-30 pwm: 8b
diff --git a/decoder/test/pwm/spi_0x35_cpol0_cpha0_trigger_clk_falling_ok_initial1.output b/decoder/test/pwm/spi_0x35_cpol0_cpha0_trigger_clk_falling_ok_initial1.output
new file mode 100644 (file)
index 0000000..676f77d
--- /dev/null
@@ -0,0 +1,62 @@
+0-11 pwm: duty-cycle: "54.545455%"
+0-11 pwm: period: "687.5 ns"
+11-23 pwm: duty-cycle: "50.000000%"
+11-23 pwm: period: "750.0 ns"
+23-34 pwm: duty-cycle: "45.454545%"
+23-34 pwm: period: "687.5 ns"
+34-46 pwm: duty-cycle: "50.000000%"
+34-46 pwm: period: "750.0 ns"
+46-57 pwm: duty-cycle: "45.454545%"
+46-57 pwm: period: "687.5 ns"
+57-68 pwm: duty-cycle: "54.545455%"
+57-68 pwm: period: "687.5 ns"
+68-80 pwm: duty-cycle: "50.000000%"
+68-80 pwm: period: "750.0 ns"
+80-140 pwm: duty-cycle: "90.000000%"
+80-140 pwm: period: "3.8 μs"
+140-151 pwm: duty-cycle: "45.454545%"
+140-151 pwm: period: "687.5 ns"
+151-162 pwm: duty-cycle: "54.545455%"
+151-162 pwm: period: "687.5 ns"
+162-174 pwm: duty-cycle: "50.000000%"
+162-174 pwm: period: "750.0 ns"
+174-185 pwm: duty-cycle: "45.454545%"
+174-185 pwm: period: "687.5 ns"
+185-196 pwm: duty-cycle: "54.545455%"
+185-196 pwm: period: "687.5 ns"
+196-208 pwm: duty-cycle: "50.000000%"
+196-208 pwm: period: "750.0 ns"
+208-219 pwm: duty-cycle: "54.545455%"
+208-219 pwm: period: "687.5 ns"
+219-279 pwm: duty-cycle: "90.000000%"
+219-279 pwm: period: "3.8 μs"
+279-291 pwm: duty-cycle: "50.000000%"
+279-291 pwm: period: "750.0 ns"
+291-302 pwm: duty-cycle: "45.454545%"
+291-302 pwm: period: "687.5 ns"
+302-313 pwm: duty-cycle: "54.545455%"
+302-313 pwm: period: "687.5 ns"
+313-325 pwm: duty-cycle: "50.000000%"
+313-325 pwm: period: "750.0 ns"
+325-336 pwm: duty-cycle: "45.454545%"
+325-336 pwm: period: "687.5 ns"
+336-347 pwm: duty-cycle: "54.545455%"
+336-347 pwm: period: "687.5 ns"
+347-359 pwm: duty-cycle: "50.000000%"
+347-359 pwm: period: "750.0 ns"
+359-419 pwm: duty-cycle: "90.000000%"
+359-419 pwm: period: "3.8 μs"
+419-430 pwm: duty-cycle: "45.454545%"
+419-430 pwm: period: "687.5 ns"
+430-441 pwm: duty-cycle: "54.545455%"
+430-441 pwm: period: "687.5 ns"
+441-453 pwm: duty-cycle: "50.000000%"
+441-453 pwm: period: "750.0 ns"
+453-464 pwm: duty-cycle: "45.454545%"
+453-464 pwm: period: "687.5 ns"
+464-476 pwm: duty-cycle: "50.000000%"
+464-476 pwm: period: "750.0 ns"
+476-487 pwm: duty-cycle: "45.454545%"
+476-487 pwm: period: "687.5 ns"
+487-498 pwm: duty-cycle: "54.545455%"
+487-498 pwm: period: "687.5 ns"
diff --git a/decoder/test/pwm/spi_0x35_cpol0_cpha0_trigger_clk_rising_ok.bin_raw b/decoder/test/pwm/spi_0x35_cpol0_cpha0_trigger_clk_rising_ok.bin_raw
new file mode 100644 (file)
index 0000000..e81bc15
--- /dev/null
@@ -0,0 +1,30 @@
+0-0 pwm: 80
+1-1 pwm: 74
+2-2 pwm: 8b
+3-3 pwm: 80
+4-4 pwm: 74
+5-5 pwm: 8b
+6-6 pwm: 19
+7-7 pwm: 80
+8-8 pwm: 74
+9-9 pwm: 8b
+10-10 pwm: 80
+11-11 pwm: 8b
+12-12 pwm: 80
+13-13 pwm: 74
+14-14 pwm: 19
+15-15 pwm: 8b
+16-16 pwm: 80
+17-17 pwm: 74
+18-18 pwm: 8b
+19-19 pwm: 80
+20-20 pwm: 74
+21-21 pwm: 80
+22-22 pwm: 15
+23-23 pwm: 80
+24-24 pwm: 8b
+25-25 pwm: 80
+26-26 pwm: 74
+27-27 pwm: 8b
+28-28 pwm: 80
+29-29 pwm: 74
diff --git a/decoder/test/pwm/spi_0x35_cpol0_cpha0_trigger_clk_rising_ok.output b/decoder/test/pwm/spi_0x35_cpol0_cpha0_trigger_clk_rising_ok.output
new file mode 100644 (file)
index 0000000..165af88
--- /dev/null
@@ -0,0 +1,60 @@
+11-23 pwm: duty-cycle: "50.000000%"
+11-23 pwm: period: "750.0 ns"
+23-34 pwm: duty-cycle: "45.454545%"
+23-34 pwm: period: "687.5 ns"
+34-45 pwm: duty-cycle: "54.545455%"
+34-45 pwm: period: "687.5 ns"
+45-57 pwm: duty-cycle: "50.000000%"
+45-57 pwm: period: "750.0 ns"
+57-68 pwm: duty-cycle: "45.454545%"
+57-68 pwm: period: "687.5 ns"
+68-79 pwm: duty-cycle: "54.545455%"
+68-79 pwm: period: "687.5 ns"
+79-139 pwm: duty-cycle: "10.000000%"
+79-139 pwm: period: "3.8 μs"
+139-151 pwm: duty-cycle: "50.000000%"
+139-151 pwm: period: "750.0 ns"
+151-162 pwm: duty-cycle: "45.454545%"
+151-162 pwm: period: "687.5 ns"
+162-173 pwm: duty-cycle: "54.545455%"
+162-173 pwm: period: "687.5 ns"
+173-185 pwm: duty-cycle: "50.000000%"
+173-185 pwm: period: "750.0 ns"
+185-196 pwm: duty-cycle: "54.545455%"
+185-196 pwm: period: "687.5 ns"
+196-208 pwm: duty-cycle: "50.000000%"
+196-208 pwm: period: "750.0 ns"
+208-219 pwm: duty-cycle: "45.454545%"
+208-219 pwm: period: "687.5 ns"
+219-279 pwm: duty-cycle: "10.000000%"
+219-279 pwm: period: "3.8 μs"
+279-290 pwm: duty-cycle: "54.545455%"
+279-290 pwm: period: "687.5 ns"
+290-302 pwm: duty-cycle: "50.000000%"
+290-302 pwm: period: "750.0 ns"
+302-313 pwm: duty-cycle: "45.454545%"
+302-313 pwm: period: "687.5 ns"
+313-324 pwm: duty-cycle: "54.545455%"
+313-324 pwm: period: "687.5 ns"
+324-336 pwm: duty-cycle: "50.000000%"
+324-336 pwm: period: "750.0 ns"
+336-347 pwm: duty-cycle: "45.454545%"
+336-347 pwm: period: "687.5 ns"
+347-359 pwm: duty-cycle: "50.000000%"
+347-359 pwm: period: "750.0 ns"
+359-418 pwm: duty-cycle: "8.474576%"
+359-418 pwm: period: "3.7 μs"
+418-430 pwm: duty-cycle: "50.000000%"
+418-430 pwm: period: "750.0 ns"
+430-441 pwm: duty-cycle: "54.545455%"
+430-441 pwm: period: "687.5 ns"
+441-453 pwm: duty-cycle: "50.000000%"
+441-453 pwm: period: "750.0 ns"
+453-464 pwm: duty-cycle: "45.454545%"
+453-464 pwm: period: "687.5 ns"
+464-475 pwm: duty-cycle: "54.545455%"
+464-475 pwm: period: "687.5 ns"
+475-487 pwm: duty-cycle: "50.000000%"
+475-487 pwm: period: "750.0 ns"
+487-498 pwm: duty-cycle: "45.454545%"
+487-498 pwm: period: "687.5 ns"
diff --git a/decoder/test/pwm/spi_0x35_cpol0_cpha0_trigger_clk_rising_ok_initial0.bin_raw b/decoder/test/pwm/spi_0x35_cpol0_cpha0_trigger_clk_rising_ok_initial0.bin_raw
new file mode 100644 (file)
index 0000000..f1f599d
--- /dev/null
@@ -0,0 +1,31 @@
+0-0 pwm: 8b
+1-1 pwm: 80
+2-2 pwm: 74
+3-3 pwm: 8b
+4-4 pwm: 80
+5-5 pwm: 74
+6-6 pwm: 8b
+7-7 pwm: 19
+8-8 pwm: 80
+9-9 pwm: 74
+10-10 pwm: 8b
+11-11 pwm: 80
+12-12 pwm: 8b
+13-13 pwm: 80
+14-14 pwm: 74
+15-15 pwm: 19
+16-16 pwm: 8b
+17-17 pwm: 80
+18-18 pwm: 74
+19-19 pwm: 8b
+20-20 pwm: 80
+21-21 pwm: 74
+22-22 pwm: 80
+23-23 pwm: 15
+24-24 pwm: 80
+25-25 pwm: 8b
+26-26 pwm: 80
+27-27 pwm: 74
+28-28 pwm: 8b
+29-29 pwm: 80
+30-30 pwm: 74
diff --git a/decoder/test/pwm/spi_0x35_cpol0_cpha0_trigger_clk_rising_ok_initial0.output b/decoder/test/pwm/spi_0x35_cpol0_cpha0_trigger_clk_rising_ok_initial0.output
new file mode 100644 (file)
index 0000000..4f1ba8d
--- /dev/null
@@ -0,0 +1,62 @@
+0-11 pwm: duty-cycle: "54.545455%"
+0-11 pwm: period: "687.5 ns"
+11-23 pwm: duty-cycle: "50.000000%"
+11-23 pwm: period: "750.0 ns"
+23-34 pwm: duty-cycle: "45.454545%"
+23-34 pwm: period: "687.5 ns"
+34-45 pwm: duty-cycle: "54.545455%"
+34-45 pwm: period: "687.5 ns"
+45-57 pwm: duty-cycle: "50.000000%"
+45-57 pwm: period: "750.0 ns"
+57-68 pwm: duty-cycle: "45.454545%"
+57-68 pwm: period: "687.5 ns"
+68-79 pwm: duty-cycle: "54.545455%"
+68-79 pwm: period: "687.5 ns"
+79-139 pwm: duty-cycle: "10.000000%"
+79-139 pwm: period: "3.8 μs"
+139-151 pwm: duty-cycle: "50.000000%"
+139-151 pwm: period: "750.0 ns"
+151-162 pwm: duty-cycle: "45.454545%"
+151-162 pwm: period: "687.5 ns"
+162-173 pwm: duty-cycle: "54.545455%"
+162-173 pwm: period: "687.5 ns"
+173-185 pwm: duty-cycle: "50.000000%"
+173-185 pwm: period: "750.0 ns"
+185-196 pwm: duty-cycle: "54.545455%"
+185-196 pwm: period: "687.5 ns"
+196-208 pwm: duty-cycle: "50.000000%"
+196-208 pwm: period: "750.0 ns"
+208-219 pwm: duty-cycle: "45.454545%"
+208-219 pwm: period: "687.5 ns"
+219-279 pwm: duty-cycle: "10.000000%"
+219-279 pwm: period: "3.8 μs"
+279-290 pwm: duty-cycle: "54.545455%"
+279-290 pwm: period: "687.5 ns"
+290-302 pwm: duty-cycle: "50.000000%"
+290-302 pwm: period: "750.0 ns"
+302-313 pwm: duty-cycle: "45.454545%"
+302-313 pwm: period: "687.5 ns"
+313-324 pwm: duty-cycle: "54.545455%"
+313-324 pwm: period: "687.5 ns"
+324-336 pwm: duty-cycle: "50.000000%"
+324-336 pwm: period: "750.0 ns"
+336-347 pwm: duty-cycle: "45.454545%"
+336-347 pwm: period: "687.5 ns"
+347-359 pwm: duty-cycle: "50.000000%"
+347-359 pwm: period: "750.0 ns"
+359-418 pwm: duty-cycle: "8.474576%"
+359-418 pwm: period: "3.7 μs"
+418-430 pwm: duty-cycle: "50.000000%"
+418-430 pwm: period: "750.0 ns"
+430-441 pwm: duty-cycle: "54.545455%"
+430-441 pwm: period: "687.5 ns"
+441-453 pwm: duty-cycle: "50.000000%"
+441-453 pwm: period: "750.0 ns"
+453-464 pwm: duty-cycle: "45.454545%"
+453-464 pwm: period: "687.5 ns"
+464-475 pwm: duty-cycle: "54.545455%"
+464-475 pwm: period: "687.5 ns"
+475-487 pwm: duty-cycle: "50.000000%"
+475-487 pwm: period: "750.0 ns"
+487-498 pwm: duty-cycle: "45.454545%"
+487-498 pwm: period: "687.5 ns"
index 83f4be4c4be990fb9619861e569d948c9e4084b9..f3ace8ff79a2c66f1cdeff67a19bdffc76e64016 100644 (file)
@@ -3,3 +3,27 @@ test alsa_test_snippet
        input pwm/alsa_test/pwmtest_snippet.sr
        output pwm annotation match alsa_test_snippet.output
        output pwm binary class raw match alsa_test_snippet.bin_raw
+
+test spi_0x35_cpol0_cpha0_trigger_clk_falling_ok
+       protocol-decoder pwm channel data=4 option polarity=active-low
+       input spi/allmodes/spi_0x35_cpol0_cpha0_trigger_clk_falling_ok.sr
+       output pwm annotation match spi_0x35_cpol0_cpha0_trigger_clk_falling_ok.output
+       output pwm binary class raw match spi_0x35_cpol0_cpha0_trigger_clk_falling_ok.bin_raw
+
+test spi_0x35_cpol0_cpha0_trigger_clk_falling_ok_initial1
+       protocol-decoder pwm channel data=4 initial_pin data=1 option polarity=active-low
+       input spi/allmodes/spi_0x35_cpol0_cpha0_trigger_clk_falling_ok.sr
+       output pwm annotation match spi_0x35_cpol0_cpha0_trigger_clk_falling_ok_initial1.output
+       output pwm binary class raw match spi_0x35_cpol0_cpha0_trigger_clk_falling_ok_initial1.bin_raw
+
+test spi_0x35_cpol0_cpha0_trigger_clk_rising_ok
+       protocol-decoder pwm channel data=4 option polarity=active-high
+       input spi/allmodes/spi_0x35_cpol0_cpha0_trigger_clk_rising_ok.sr
+       output pwm annotation match spi_0x35_cpol0_cpha0_trigger_clk_rising_ok.output
+       output pwm binary class raw match spi_0x35_cpol0_cpha0_trigger_clk_rising_ok.bin_raw
+
+test spi_0x35_cpol0_cpha0_trigger_clk_rising_ok_initial0
+       protocol-decoder pwm channel data=4 initial_pin data=0 option polarity=active-high
+       input spi/allmodes/spi_0x35_cpol0_cpha0_trigger_clk_rising_ok.sr
+       output pwm annotation match spi_0x35_cpol0_cpha0_trigger_clk_rising_ok_initial0.output
+       output pwm binary class raw match spi_0x35_cpol0_cpha0_trigger_clk_rising_ok_initial0.bin_raw