From: Uwe Hermann Date: Fri, 13 Dec 2019 11:15:39 +0000 (+0100) Subject: uart: Add Grbl test-cases. X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=09544d5f5f3e6ac9387e7b99712c7b00ee319d18;p=sigrok-test.git uart: Add Grbl test-cases. --- diff --git a/decoder/test/uart/grbl_cnc_1_rx_packet.output b/decoder/test/uart/grbl_cnc_1_rx_packet.output new file mode 100644 index 0000000..4aee3f8 --- /dev/null +++ b/decoder/test/uart/grbl_cnc_1_rx_packet.output @@ -0,0 +1,91 @@ +525840-539551 uart: rx-packet: "[0D][0A]" +1773840-1787550 uart: rx-packet: "[0D][0A]" +3021837-3035548 uart: rx-packet: "[0D][0A]" +4269773-4283484 uart: rx-packet: "[0D][0A]" +5523925-5524573 uart: rx-packet: "ok[0D][0A]" +5554714-5568255 uart: rx-packet: "[0D][0A]" +5612182-5612830 uart: rx-packet: "ok[0D][0A]" +5628867-5642408 uart: rx-packet: "[0D][0A]" +6890508-6904049 uart: rx-packet: "[0D][0A]" +8138532-8152243 uart: rx-packet: "[0D][0A]" +9386546-9400257 uart: rx-packet: "[0D][0A]" +10634443-10648324 uart: rx-packet: "[0D][0A]" +11882391-11896272 uart: rx-packet: "[0D][0A]" +13130496-13144547 uart: rx-packet: "[0D][0A]" +14378428-14392478 uart: rx-packet: "[0D][0A]" +15626433-15640483 uart: rx-packet: "[0D][0A]" +16874448-16888837 uart: rx-packet: "[0D][0A]" +18126750-18127398 uart: rx-packet: "ok[0D][0A]" +18155134-18169354 uart: rx-packet: "[0D][0A]" +19401467-19415687 uart: rx-packet: "[0D][0A]" +20649428-20663648 uart: rx-packet: "[0D][0A]" +21897388-21911438 uart: rx-packet: "[0D][0A]" +23145406-23159456 uart: rx-packet: "[0D][0A]" +24393342-24407392 uart: rx-packet: "[0D][0A]" +25641324-25655374 uart: rx-packet: "[0D][0A]" +26889274-26903494 uart: rx-packet: "[0D][0A]" +28137579-28151799 uart: rx-packet: "[0D][0A]" +29385257-29399476 uart: rx-packet: "[0D][0A]" +30633248-30647468 uart: rx-packet: "[0D][0A]" +31881177-31895397 uart: rx-packet: "[0D][0A]" +33129169-33143389 uart: rx-packet: "[0D][0A]" +34377955-34392175 uart: rx-packet: "[0D][0A]" +35625045-35639265 uart: rx-packet: "[0D][0A]" +36873184-36887404 uart: rx-packet: "[0D][0A]" +38125637-38126285 uart: rx-packet: "ok[0D][0A]" +38154842-38168892 uart: rx-packet: "[0D][0A]" +38207774-38208422 uart: rx-packet: "ok[0D][0A]" +38228450-38242500 uart: rx-packet: "[0D][0A]" +39479942-39493992 uart: rx-packet: "[0D][0A]" +40727830-40741881 uart: rx-packet: "[0D][0A]" +41975874-41989924 uart: rx-packet: "[0D][0A]" +43223803-43238023 uart: rx-packet: "[0D][0A]" +44471830-44486050 uart: rx-packet: "[0D][0A]" +45719738-45733957 uart: rx-packet: "[0D][0A]" +46967693-46982082 uart: rx-packet: "[0D][0A]" +48222096-48222744 uart: rx-packet: "ok[0D][0A]" +48248617-48262837 uart: rx-packet: "[0D][0A]" +48303417-48304065 uart: rx-packet: "ok[0D][0A]" +48322206-48336426 uart: rx-packet: "[0D][0A]" +49557322-49571542 uart: rx-packet: "[0D][0A]" +50805238-50819458 uart: rx-packet: "[0D][0A]" +52053204-52067593 uart: rx-packet: "[0D][0A]" +53306096-53306744 uart: rx-packet: "ok[0D][0A]" +53309542-53323762 uart: rx-packet: "[0D][0A]" +54549125-54563345 uart: rx-packet: "[0D][0A]" +55797074-55811293 uart: rx-packet: "[0D][0A]" +57045050-57059100 uart: rx-packet: "[0D][0A]" +58293043-58307093 uart: rx-packet: "[0D][0A]" +59540994-59555044 uart: rx-packet: "[0D][0A]" +60789018-60803068 uart: rx-packet: "[0D][0A]" +62036937-62051157 uart: rx-packet: "[0D][0A]" +63266782-63281002 uart: rx-packet: "[0D][0A]" +64510188-64524408 uart: rx-packet: "[0D][0A]" +65758075-65772295 uart: rx-packet: "[0D][0A]" +67006070-67020290 uart: rx-packet: "[0D][0A]" +68254021-68268241 uart: rx-packet: "[0D][0A]" +69502017-69516237 uart: rx-packet: "[0D][0A]" +70750178-70764397 uart: rx-packet: "[0D][0A]" +71997982-72012202 uart: rx-packet: "[0D][0A]" +73245935-73260155 uart: rx-packet: "[0D][0A]" +74498724-74499372 uart: rx-packet: "ok[0D][0A]" +74531651-74545701 uart: rx-packet: "[0D][0A]" +74584346-74584994 uart: rx-packet: "ok[0D][0A]" +74605389-74619439 uart: rx-packet: "[0D][0A]" +75831919-75845969 uart: rx-packet: "[0D][0A]" +77079867-77093917 uart: rx-packet: "[0D][0A]" +78327860-78341910 uart: rx-packet: "[0D][0A]" +79575828-79590047 uart: rx-packet: "[0D][0A]" +80823825-80838044 uart: rx-packet: "[0D][0A]" +82071828-82086048 uart: rx-packet: "[0D][0A]" +83319733-83334122 uart: rx-packet: "[0D][0A]" +84573798-84574446 uart: rx-packet: "ok[0D][0A]" +84577394-84591614 uart: rx-packet: "[0D][0A]" +84632295-84632943 uart: rx-packet: "ok[0D][0A]" +84651147-84665367 uart: rx-packet: "[0D][0A]" +85909317-85923537 uart: rx-packet: "[0D][0A]" +87157314-87171534 uart: rx-packet: "[0D][0A]" +88405280-88419500 uart: rx-packet: "[0D][0A]" +89653233-89667623 uart: rx-packet: "[0D][0A]" +90872465-90886855 uart: rx-packet: "[0D][0A]" +92109720-92124110 uart: rx-packet: "[0D][0A]" diff --git a/decoder/test/uart/grbl_cnc_1_tx_packet.output b/decoder/test/uart/grbl_cnc_1_tx_packet.output new file mode 100644 index 0000000..06a3de9 --- /dev/null +++ b/decoder/test/uart/grbl_cnc_1_tx_packet.output @@ -0,0 +1,12 @@ +525621-5521840 uart: tx-packet: "????G1 G90 X17.2 Z40.0 F3000[0A]" +5554500-5609850 uart: tx-packet: "?G1 G90 Y108.8 Z40.0 F3000[0A]" +5628651-18125144 uart: tx-packet: "??????????G1 G90 Z56.0 F250[0A]" +18154914-38124031 uart: tx-packet: "????????????????G1 G90 Z40.0 F250[0A]" +38154606-38206485 uart: tx-packet: "?G1 G90 Z40.0 F3000[0A]" +38228213-48220200 uart: tx-packet: "????????G1 G90 X92.599 Z40.0 F3000[0A]" +48248386-48300709 uart: tx-packet: "?G1 G90 Y108.456 Z40.0 F3000[0A]" +48321983-53304507 uart: tx-packet: "????G1 G90 Z56.0 F250[0A]" +53308138-74497125 uart: tx-packet: "?????????????????G1 G90 Z40.0 F250[0A]" +74531427-74583098 uart: tx-packet: "?G1 G90 Z40.0 F3000[0A]" +74605182-84571917 uart: tx-packet: "????????G1 G90 X17.3 Z40.0 F3000[0A]" +84577168-84629734 uart: tx-packet: "?G1 G90 Y130.65 Z40.0 F3000[0A]" diff --git a/decoder/test/uart/grbl_cnc_2_rx_packet.output b/decoder/test/uart/grbl_cnc_2_rx_packet.output new file mode 100644 index 0000000..0352d21 --- /dev/null +++ b/decoder/test/uart/grbl_cnc_2_rx_packet.output @@ -0,0 +1,175 @@ +630453-644164 uart: rx-packet: "[0D][0A]" +1878789-1892500 uart: rx-packet: "[0D][0A]" +3126473-3140184 uart: rx-packet: "[0D][0A]" +4383548-4384196 uart: rx-packet: "ok[0D][0A]" +4407683-4421224 uart: rx-packet: "[0D][0A]" +5653513-5667224 uart: rx-packet: "[0D][0A]" +6901455-6915505 uart: rx-packet: "[0D][0A]" +8149443-8163493 uart: rx-packet: "[0D][0A]" +9369075-9383125 uart: rx-packet: "[0D][0A]" +10577048-10591268 uart: rx-packet: "[0D][0A]" +11823543-11837933 uart: rx-packet: "[0D][0A]" +13076316-13076964 uart: rx-packet: "ok[0D][0A]" +13106363-13120582 uart: rx-packet: "[0D][0A]" +14350601-14364821 uart: rx-packet: "[0D][0A]" +15598567-15612787 uart: rx-packet: "[0D][0A]" +16846568-16860618 uart: rx-packet: "[0D][0A]" +18094589-18108640 uart: rx-packet: "[0D][0A]" +19342586-19356636 uart: rx-packet: "[0D][0A]" +20590530-20604581 uart: rx-packet: "[0D][0A]" +21838505-21852725 uart: rx-packet: "[0D][0A]" +23086455-23100675 uart: rx-packet: "[0D][0A]" +24334426-24348646 uart: rx-packet: "[0D][0A]" +25589772-25603992 uart: rx-packet: "[0D][0A]" +26830283-26844502 uart: rx-packet: "[0D][0A]" +28078254-28092473 uart: rx-packet: "[0D][0A]" +29334690-29348910 uart: rx-packet: "[0D][0A]" +30605462-30619682 uart: rx-packet: "[0D][0A]" +31853747-31867967 uart: rx-packet: "[0D][0A]" +33101402-33115622 uart: rx-packet: "[0D][0A]" +34349520-34363739 uart: rx-packet: "[0D][0A]" +35597366-35611585 uart: rx-packet: "[0D][0A]" +36845483-36859703 uart: rx-packet: "[0D][0A]" +38093391-38107611 uart: rx-packet: "[0D][0A]" +39341822-39356042 uart: rx-packet: "[0D][0A]" +40589331-40603551 uart: rx-packet: "[0D][0A]" +41837366-41851586 uart: rx-packet: "[0D][0A]" +43085231-43099451 uart: rx-packet: "[0D][0A]" +44333203-44347423 uart: rx-packet: "[0D][0A]" +45581132-45595352 uart: rx-packet: "[0D][0A]" +46829143-46843363 uart: rx-packet: "[0D][0A]" +48077304-48091524 uart: rx-packet: "[0D][0A]" +49342941-49357161 uart: rx-packet: "[0D][0A]" +50604282-50618501 uart: rx-packet: "[0D][0A]" +51852232-51866452 uart: rx-packet: "[0D][0A]" +53100267-53114487 uart: rx-packet: "[0D][0A]" +54348237-54362457 uart: rx-packet: "[0D][0A]" +55596126-55610346 uart: rx-packet: "[0D][0A]" +56844432-56858652 uart: rx-packet: "[0D][0A]" +58092213-58106433 uart: rx-packet: "[0D][0A]" +59340038-59354258 uart: rx-packet: "[0D][0A]" +60588156-60602376 uart: rx-packet: "[0D][0A]" +61836064-61850284 uart: rx-packet: "[0D][0A]" +63116560-63130780 uart: rx-packet: "[0D][0A]" +64363170-64377390 uart: rx-packet: "[0D][0A]" +65611140-65625360 uart: rx-packet: "[0D][0A]" +66859468-66873688 uart: rx-packet: "[0D][0A]" +68107397-68121617 uart: rx-packet: "[0D][0A]" +69355223-69369443 uart: rx-packet: "[0D][0A]" +70603551-70617771 uart: rx-packet: "[0D][0A]" +71851417-71865637 uart: rx-packet: "[0D][0A]" +73099115-73113335 uart: rx-packet: "[0D][0A]" +74347045-74361265 uart: rx-packet: "[0D][0A]" +75569826-75584045 uart: rx-packet: "[0D][0A]" +76781164-76795384 uart: rx-packet: "[0D][0A]" +77985021-77999241 uart: rx-packet: "[0D][0A]" +79203066-79217286 uart: rx-packet: "[0D][0A]" +80413085-80427305 uart: rx-packet: "[0D][0A]" +81621070-81635290 uart: rx-packet: "[0D][0A]" +82831381-82845601 uart: rx-packet: "[0D][0A]" +84039159-84053378 uart: rx-packet: "[0D][0A]" +85247247-85261467 uart: rx-packet: "[0D][0A]" +86455296-86469516 uart: rx-packet: "[0D][0A]" +87663491-87677711 uart: rx-packet: "[0D][0A]" +88871372-88885592 uart: rx-packet: "[0D][0A]" +90085331-90099551 uart: rx-packet: "[0D][0A]" +91287448-91301668 uart: rx-packet: "[0D][0A]" +92495558-92509778 uart: rx-packet: "[0D][0A]" +93703545-93717765 uart: rx-packet: "[0D][0A]" +94919681-94933901 uart: rx-packet: "[0D][0A]" +96127541-96141761 uart: rx-packet: "[0D][0A]" +97335672-97349892 uart: rx-packet: "[0D][0A]" +98543700-98557919 uart: rx-packet: "[0D][0A]" +99751686-99765906 uart: rx-packet: "[0D][0A]" +100963904-100978124 uart: rx-packet: "[0D][0A]" +102167845-102182065 uart: rx-packet: "[0D][0A]" +103375893-103390113 uart: rx-packet: "[0D][0A]" +104595510-104609730 uart: rx-packet: "[0D][0A]" +105803872-105818092 uart: rx-packet: "[0D][0A]" +107019989-107034209 uart: rx-packet: "[0D][0A]" +108226565-108227213 uart: rx-packet: "ok[0D][0A]" +108237681-108251731 uart: rx-packet: "[0D][0A]" +108290684-108291332 uart: rx-packet: "ok[0D][0A]" +108311201-108325251 uart: rx-packet: "[0D][0A]" +109524141-109538191 uart: rx-packet: "[0D][0A]" +110726166-110740216 uart: rx-packet: "[0D][0A]" +111934201-111948251 uart: rx-packet: "[0D][0A]" +113142391-113156611 uart: rx-packet: "[0D][0A]" +114354299-114368519 uart: rx-packet: "[0D][0A]" +115558312-115572532 uart: rx-packet: "[0D][0A]" +116768356-116782746 uart: rx-packet: "[0D][0A]" +117984870-117985518 uart: rx-packet: "ok[0D][0A]" +117990011-118004231 uart: rx-packet: "[0D][0A]" +119196447-119210667 uart: rx-packet: "[0D][0A]" +120404531-120418751 uart: rx-packet: "[0D][0A]" +121614518-121628907 uart: rx-packet: "[0D][0A]" +122827132-122827780 uart: rx-packet: "ok[0D][0A]" +122836646-122850865 uart: rx-packet: "[0D][0A]" +124044588-124058808 uart: rx-packet: "[0D][0A]" +125252725-125266945 uart: rx-packet: "[0D][0A]" +126461071-126475291 uart: rx-packet: "[0D][0A]" +127668718-127682769 uart: rx-packet: "[0D][0A]" +128876780-128890830 uart: rx-packet: "[0D][0A]" +130084817-130098867 uart: rx-packet: "[0D][0A]" +131292919-131307138 uart: rx-packet: "[0D][0A]" +132500950-132515170 uart: rx-packet: "[0D][0A]" +133709022-133723242 uart: rx-packet: "[0D][0A]" +134917054-134931274 uart: rx-packet: "[0D][0A]" +136129066-136143286 uart: rx-packet: "[0D][0A]" +137333052-137347272 uart: rx-packet: "[0D][0A]" +138548879-138563099 uart: rx-packet: "[0D][0A]" +139755297-139769517 uart: rx-packet: "[0D][0A]" +140963201-140977421 uart: rx-packet: "[0D][0A]" +142177204-142191424 uart: rx-packet: "[0D][0A]" +143384395-143385043 uart: rx-packet: "ok[0D][0A]" +143396570-143410620 uart: rx-packet: "[0D][0A]" +143450978-143451626 uart: rx-packet: "ok[0D][0A]" +143470238-143484288 uart: rx-packet: "[0D][0A]" +144677387-144691437 uart: rx-packet: "[0D][0A]" +145885382-145899432 uart: rx-packet: "[0D][0A]" +147093395-147107445 uart: rx-packet: "[0D][0A]" +148301589-148315809 uart: rx-packet: "[0D][0A]" +149509606-149523826 uart: rx-packet: "[0D][0A]" +150717537-150731757 uart: rx-packet: "[0D][0A]" +151927577-151941967 uart: rx-packet: "[0D][0A]" +153143485-153144133 uart: rx-packet: "ok[0D][0A]" +153148967-153163186 uart: rx-packet: "[0D][0A]" +154357680-154371900 uart: rx-packet: "[0D][0A]" +155565764-155579984 uart: rx-packet: "[0D][0A]" +156775722-156790111 uart: rx-packet: "[0D][0A]" +157988383-157989031 uart: rx-packet: "ok[0D][0A]" +157997554-158011774 uart: rx-packet: "[0D][0A]" +159205940-159220160 uart: rx-packet: "[0D][0A]" +160413872-160428092 uart: rx-packet: "[0D][0A]" +161622058-161636278 uart: rx-packet: "[0D][0A]" +162830032-162844083 uart: rx-packet: "[0D][0A]" +164037996-164052046 uart: rx-packet: "[0D][0A]" +165246210-165260260 uart: rx-packet: "[0D][0A]" +166454118-166468338 uart: rx-packet: "[0D][0A]" +167664228-167678447 uart: rx-packet: "[0D][0A]" +168872202-168886422 uart: rx-packet: "[0D][0A]" +170115299-170129518 uart: rx-packet: "[0D][0A]" +171322266-171336486 uart: rx-packet: "[0D][0A]" +172542227-172556446 uart: rx-packet: "[0D][0A]" +173754266-173768486 uart: rx-packet: "[0D][0A]" +174958405-174972625 uart: rx-packet: "[0D][0A]" +176167802-176182022 uart: rx-packet: "[0D][0A]" +177376864-177377512 uart: rx-packet: "ok[0D][0A]" +177390769-177404819 uart: rx-packet: "[0D][0A]" +177445035-177445683 uart: rx-packet: "ok[0D][0A]" +177464241-177478292 uart: rx-packet: "[0D][0A]" +178672815-178686866 uart: rx-packet: "[0D][0A]" +179880569-179894619 uart: rx-packet: "[0D][0A]" +181088592-181102642 uart: rx-packet: "[0D][0A]" +182296662-182310882 uart: rx-packet: "[0D][0A]" +183504774-183518994 uart: rx-packet: "[0D][0A]" +184712717-184726936 uart: rx-packet: "[0D][0A]" +185920755-185935144 uart: rx-packet: "[0D][0A]" +187135899-187136547 uart: rx-packet: "ok[0D][0A]" +187146600-187160820 uart: rx-packet: "[0D][0A]" +188354902-188369122 uart: rx-packet: "[0D][0A]" +189565128-189579178 uart: rx-packet: "[0D][0A]" +190772942-190786822 uart: rx-packet: "[0D][0A]" +191983096-191996976 uart: rx-packet: "[0D][0A]" +193191028-193204909 uart: rx-packet: "[0D][0A]" +194401113-194414994 uart: rx-packet: "[0D][0A]" diff --git a/decoder/test/uart/grbl_cnc_2_tx_packet.output b/decoder/test/uart/grbl_cnc_2_tx_packet.output new file mode 100644 index 0000000..89bf467 --- /dev/null +++ b/decoder/test/uart/grbl_cnc_2_tx_packet.output @@ -0,0 +1,13 @@ +630247-4380956 uart: tx-packet: "???G1 G90 X36.05 Y108.714 Z40.0 F3000[0A]" +4407467-13074703 uart: tx-packet: "???????G1 G90 Z56.0 F250[0A]" +13106132-108224951 uart: tx-packet: "?????????????????????????????????????????????????????????????????????????????G1 G90 Z40.0 F250[0A]" +108237466-108289470 uart: tx-packet: "?G1 G90 Z40.0 F3000[0A]" +108310975-117982482 uart: tx-packet: "????????G1 G90 X92.599 Y108.456 Z40.0 F3000[0A]" +117989777-122825542 uart: tx-packet: "????G1 G90 Z56.0 F250[0A]" +122836424-143382782 uart: tx-packet: "?????????????????G1 G90 Z40.0 F250[0A]" +143396340-143449706 uart: tx-packet: "?G1 G90 Z40.0 F3000[0A]" +143470005-153141153 uart: tx-packet: "????????G1 G90 X17.3 Y130.65 Z40.0 F3000[0A]" +153148758-157986792 uart: tx-packet: "????G1 G90 Z56.0 F250[0A]" +157997344-177375245 uart: tx-packet: "????????????????G1 G90 Z40.0 F250[0A]" +177390548-177443758 uart: tx-packet: "?G1 G90 Z40.0 F3000[0A]" +177464012-187133958 uart: tx-packet: "????????G1 G90 X0 Y0 F3000[0A]" diff --git a/decoder/test/uart/test.conf b/decoder/test/uart/test.conf index a0200a6..e19c71f 100644 --- a/decoder/test/uart/test.conf +++ b/decoder/test/uart/test.conf @@ -341,6 +341,18 @@ test max3232e_hello_world_57600_8n1 output uart binary class rx match max3232e_hello_world_57600_8n1.bin_rx output uart binary class tx match max3232e_hello_world_57600_8n1.bin_tx +test grbl_cnc_1 + protocol-decoder uart channel rx=3 channel tx=2 option format=ascii option rx_packet_delim=10 option tx_packet_delim=10 + input stepper_motor/grbl_cnc/grbl_cnc_1.sr + output uart annotation class tx-packet match grbl_cnc_1_tx_packet.output + output uart annotation class rx-packet match grbl_cnc_1_rx_packet.output + +test grbl_cnc_2 + protocol-decoder uart channel rx=3 channel tx=2 option format=ascii option rx_packet_delim=10 option tx_packet_delim=10 + input stepper_motor/grbl_cnc/grbl_cnc_2.sr + output uart annotation class tx-packet match grbl_cnc_2_tx_packet.output + output uart annotation class rx-packet match grbl_cnc_2_rx_packet.output + test exception_samplerate protocol-decoder uart input misc/no-samplerate.sr