X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=decoders%2Fjtag_stm32%2Fpd.py;h=b3e1e46551e3b34e5620b9669a04bb5827de4af1;hb=4c180223a8ae12feb7bc3601e07e848fb9cdb493;hp=4cd58bbfdc501188b58727a0d3fe7e0fbdbbd980;hpb=bf1eeb932f319b3984580e5d47ecb65ff9a62020;p=libsigrokdecode.git diff --git a/decoders/jtag_stm32/pd.py b/decoders/jtag_stm32/pd.py index 4cd58bb..b3e1e46 100644 --- a/decoders/jtag_stm32/pd.py +++ b/decoders/jtag_stm32/pd.py @@ -147,6 +147,7 @@ class Decoder(srd.Decoder): license = 'gplv2+' inputs = ['jtag'] outputs = ['jtag_stm32'] + tags = ['Logic', 'MCU Debugging', 'Bus'] annotations = ( ('item', 'Item'), ('field', 'Field'), @@ -232,11 +233,7 @@ class Decoder(srd.Decoder): val, self.samplenums = val self.samplenums.reverse() - # State machine - if self.state == 'IDLE': - # Wait until a new instruction is shifted into the IR register. - if cmd != 'IR TDI': - return + if cmd == 'IR TDI': # Switch to the state named after the instruction, or 'UNKNOWN'. # The STM32F10xxx has two serially connected JTAG TAPs, the # boundary scan tap (5 bits) and the Cortex-M3 TAP (4 bits). @@ -246,7 +243,9 @@ class Decoder(srd.Decoder): self.putf(4, 8, [1, ['IR (BS TAP): ' + bstap_ir]]) self.putf(0, 3, [1, ['IR (M3 TAP): ' + self.state]]) self.putx([2, ['IR: %s' % self.state]]) - elif self.state == 'BYPASS': + + # State machine + if self.state == 'BYPASS': # Here we're interested in incoming bits (TDI). if cmd != 'DR TDI': return