- # The STM32F10xxx has two serially connected JTAG TAPs, the
- # boundary scan tap (5 bits) and the Cortex-M3 TAP (4 bits).
- # See UM 31.5 "STM32F10xxx JTAG TAP connection" for details.
- # Due to this, we need to ignore the last bit of each data shift.
- val = val[:-1]
+ if cmd != 'NEW STATE':
+ val, self.samplenums = val
+
+ # The right-most char in the 'val' bitstring is the LSB.
+
+ # The STM32F10xxx has two serially connected JTAG TAPs, the
+ # boundary scan tap (5 bits) and the Cortex-M3 TAP (4 bits).
+ # See UM 31.5 "STM32F10xxx JTAG TAP connection" for details.
+ # Due to this, we need to ignore the last bit of each data shift.
+ val = val[:-1]