From: Uwe Hermann Date: Wed, 17 Apr 2019 20:38:35 +0000 (+0200) Subject: cc1101: Add a few test-cases. X-Git-Url: https://sigrok.org/gitweb/?p=sigrok-test.git;a=commitdiff_plain;h=a487901a9965921dc9118e60e4cfcc68fff2ff3f cc1101: Add a few test-cases. --- diff --git a/decoder/test/cc1101/cc1101-burst-read.output b/decoder/test/cc1101/cc1101-burst-read.output new file mode 100644 index 0000000..4132f81 --- /dev/null +++ b/decoder/test/cc1101/cc1101-burst-read.output @@ -0,0 +1,10 @@ +67-99 cc1101: warning: "Status = 0D; STATE is IDLE, 13 bytes available in RX FIFO" "Status = 0D" +67-150 cc1101: status: "Status read: RXBYTES (3B) = 0D" +250-283 cc1101: warning: "Status = 0D; STATE is IDLE, 13 bytes free in TX FIFO" "Status = 0D" +250-333 cc1101: single_read: "Read: FIFO (3F) = 0A" +402-434 cc1101: warning: "Status = 0C; STATE is IDLE, 12 bytes available in RX FIFO" "Status = 0C" +402-1055 cc1101: burst_read: "Burst read: FIFO (3F) = 70 CC AA 98 41 98 22 BA 3F 80" +1119-1151 cc1101: warning: "Status = 02; STATE is IDLE, 2 bytes available in RX FIFO" "Status = 02" +1119-1272 cc1101: burst_read: "Burst read: FIFO (3F) = 29 86" +1333-1365 cc1101: strobe: "Strobe SFRX" +1333-1365 cc1101: warning: "Status = 0F; STATE is IDLE, 15 bytes free in TX FIFO" "Status = 0F" diff --git a/decoder/test/cc1101/cc1101-burst-write.output b/decoder/test/cc1101/cc1101-burst-write.output new file mode 100644 index 0000000..07e0ba0 --- /dev/null +++ b/decoder/test/cc1101/cc1101-burst-write.output @@ -0,0 +1,32 @@ +120-152 cc1101: strobe: "Strobe SFTX" +120-152 cc1101: warning: "Status = 0F; STATE is IDLE, 15 bytes free in TX FIFO" "Status = 0F" +263-295 cc1101: warning: "Status = 0F; STATE is IDLE, 15 bytes free in TX FIFO" "Status = 0F" +263-1107 cc1101: burst_write: "Burst write: FIFO (3F) = 0D 70 E8 D4 E6 86 CB B9 A0 F9 D3 AE 42 A4" +1540-1572 cc1101: strobe: "Strobe SIDLE" +1540-1572 cc1101: warning: "Status = 0F; STATE is IDLE, 15 bytes free in TX FIFO" "Status = 0F" +1656-1688 cc1101: warning: "Status = 0F; STATE is IDLE, 15 bytes free in TX FIFO" "Status = 0F" +1656-1739 cc1101: single_write: "Write: PKTCTRL1 (07) = 0C" +1779-1811 cc1101: warning: "Status = 00; STATE is IDLE, 0 bytes free in TX FIFO" "Status = 00" +1779-1862 cc1101: single_read: "Read: PKTCTRL1 (07) = 0C" +1978-2010 cc1101: warning: "Status = 0F; STATE is IDLE, 15 bytes free in TX FIFO" "Status = 0F" +1978-2061 cc1101: single_write: "Write: MCSM2 (16) = 07" +2101-2133 cc1101: warning: "Status = 00; STATE is IDLE, 0 bytes free in TX FIFO" "Status = 00" +2101-2183 cc1101: single_read: "Read: MCSM2 (16) = 07" +2300-2332 cc1101: warning: "Status = 0F; STATE is IDLE, 15 bytes free in TX FIFO" "Status = 0F" +2300-2383 cc1101: single_write: "Write: WOREVT1 (1E) = 87" +2423-2455 cc1101: warning: "Status = 00; STATE is IDLE, 0 bytes free in TX FIFO" "Status = 00" +2423-2505 cc1101: single_read: "Read: WOREVT1 (1E) = 87" +2622-2654 cc1101: warning: "Status = 0F; STATE is IDLE, 15 bytes free in TX FIFO" "Status = 0F" +2622-2704 cc1101: single_write: "Write: WOREVT0 (1F) = 6B" +2744-2776 cc1101: warning: "Status = 00; STATE is IDLE, 0 bytes free in TX FIFO" "Status = 00" +2744-2827 cc1101: single_read: "Read: WOREVT0 (1F) = 6B" +2935-2967 cc1101: warning: "Status = 0F; STATE is IDLE, 15 bytes free in TX FIFO" "Status = 0F" +2935-3018 cc1101: single_write: "Write: WORCTRL (20) = F8" +3058-3090 cc1101: warning: "Status = 00; STATE is IDLE, 0 bytes free in TX FIFO" "Status = 00" +3058-3140 cc1101: single_read: "Read: WORCTRL (20) = F8" +3285-3317 cc1101: strobe: "Strobe SIDLE" +3285-3317 cc1101: warning: "Status = 0F; STATE is IDLE, 15 bytes free in TX FIFO" "Status = 0F" +3367-3399 cc1101: strobe: "Strobe SFRX" +3367-3399 cc1101: warning: "Status = 0F; STATE is IDLE, 15 bytes free in TX FIFO" "Status = 0F" +3449-3482 cc1101: strobe: "Strobe STX" +3449-3482 cc1101: warning: "Status = 0F; STATE is IDLE, 15 bytes free in TX FIFO" "Status = 0F" diff --git a/decoder/test/cc1101/cc1101-command-strobe.output b/decoder/test/cc1101/cc1101-command-strobe.output new file mode 100644 index 0000000..f540c8d --- /dev/null +++ b/decoder/test/cc1101/cc1101-command-strobe.output @@ -0,0 +1,8 @@ +28-60 cc1101: warning: "Status = 00; STATE is IDLE, 0 bytes available in RX FIFO" "Status = 00" +28-111 cc1101: status: "Status read: MARCSTATE (35) = 01" +201-234 cc1101: strobe: "Strobe SIDLE" +201-234 cc1101: warning: "Status = 0F; STATE is IDLE, 15 bytes free in TX FIFO" "Status = 0F" +284-316 cc1101: strobe: "Strobe SFRX" +284-316 cc1101: warning: "Status = 0F; STATE is IDLE, 15 bytes free in TX FIFO" "Status = 0F" +391-423 cc1101: strobe: "Strobe SRX" +391-423 cc1101: warning: "Status = 0F; STATE is IDLE, 15 bytes free in TX FIFO" "Status = 0F" diff --git a/decoder/test/cc1101/cc1101-read-write.output b/decoder/test/cc1101/cc1101-read-write.output new file mode 100644 index 0000000..cfedab6 --- /dev/null +++ b/decoder/test/cc1101/cc1101-read-write.output @@ -0,0 +1,28 @@ +104-136 cc1101: warning: "Status = 10; STATE is RX, 0 bytes available in RX FIFO" "Status = 10" +104-187 cc1101: status: "Status read: PKTSTATUS (38) = 30" +251-283 cc1101: strobe: "Strobe SIDLE" +251-283 cc1101: warning: "Status = 1F; STATE is RX, 15 bytes free in TX FIFO" "Status = 1F" +367-400 cc1101: warning: "Status = 0F; STATE is IDLE, 15 bytes free in TX FIFO" "Status = 0F" +367-450 cc1101: single_write: "Write: PKTCTRL1 (07) = 4C" +490-522 cc1101: warning: "Status = 00; STATE is IDLE, 0 bytes free in TX FIFO" "Status = 00" +490-572 cc1101: single_read: "Read: PKTCTRL1 (07) = 4C" +689-721 cc1101: warning: "Status = 0F; STATE is IDLE, 15 bytes free in TX FIFO" "Status = 0F" +689-771 cc1101: single_write: "Write: MCSM2 (16) = 1C" +812-844 cc1101: warning: "Status = 00; STATE is IDLE, 0 bytes free in TX FIFO" "Status = 00" +812-894 cc1101: single_read: "Read: MCSM2 (16) = 1C" +1011-1043 cc1101: warning: "Status = 0F; STATE is IDLE, 15 bytes free in TX FIFO" "Status = 0F" +1011-1093 cc1101: single_write: "Write: WOREVT1 (1E) = 2F" +1133-1165 cc1101: warning: "Status = 00; STATE is IDLE, 0 bytes free in TX FIFO" "Status = 00" +1133-1216 cc1101: single_read: "Read: WOREVT1 (1E) = 2F" +1332-1364 cc1101: warning: "Status = 0F; STATE is IDLE, 15 bytes free in TX FIFO" "Status = 0F" +1332-1414 cc1101: single_write: "Write: WOREVT0 (1F) = 65" +1455-1487 cc1101: warning: "Status = 00; STATE is IDLE, 0 bytes free in TX FIFO" "Status = 00" +1455-1537 cc1101: single_read: "Read: WOREVT0 (1F) = 65" +1646-1678 cc1101: warning: "Status = 0F; STATE is IDLE, 15 bytes free in TX FIFO" "Status = 0F" +1646-1728 cc1101: single_write: "Write: WORCTRL (20) = 78" +1768-1802 cc1101: warning: "Status = 00; STATE is IDLE, 0 bytes free in TX FIFO" "Status = 00" +1768-1851 cc1101: single_read: "Read: WORCTRL (20) = 78" +1939-1971 cc1101: strobe: "Strobe SWORRST" +1939-1971 cc1101: warning: "Status = 0F; STATE is IDLE, 15 bytes free in TX FIFO" "Status = 0F" +2022-2054 cc1101: strobe: "Strobe SWOR" +2022-2054 cc1101: warning: "Status = 0F; STATE is IDLE, 15 bytes free in TX FIFO" "Status = 0F" diff --git a/decoder/test/cc1101/test.conf b/decoder/test/cc1101/test.conf new file mode 100644 index 0000000..db46b38 --- /dev/null +++ b/decoder/test/cc1101/test.conf @@ -0,0 +1,27 @@ +test cc1101-burst-read + protocol-decoder spi channel mosi=0 channel miso=2 channel clk=1 channel cs=5 + protocol-decoder cc1101 + stack spi cc1101 + input spi/cc1101/cc1101-burst-read.sr + output cc1101 annotation match cc1101-burst-read.output + +test cc1101-burst-write + protocol-decoder spi channel mosi=0 channel miso=2 channel clk=1 channel cs=5 + protocol-decoder cc1101 + stack spi cc1101 + input spi/cc1101/cc1101-burst-write.sr + output cc1101 annotation match cc1101-burst-write.output + +test cc1101-command-strobe + protocol-decoder spi channel mosi=0 channel miso=2 channel clk=1 channel cs=5 + protocol-decoder cc1101 + stack spi cc1101 + input spi/cc1101/cc1101-command-strobe.sr + output cc1101 annotation match cc1101-command-strobe.output + +test cc1101-read-write + protocol-decoder spi channel mosi=0 channel miso=2 channel clk=1 channel cs=5 + protocol-decoder cc1101 + stack spi cc1101 + input spi/cc1101/cc1101-read-write.sr + output cc1101 annotation match cc1101-read-write.output