Skip to content

Commit

Permalink
Fix CMD17 READ_SINGLE_BLOCK only working once
Browse files Browse the repository at this point in the history
Reset the CMD17 state once the block data has been handled.

Fix by blastsnes, taken from PR sigrokproject#87 from https://github.com/blastsnes/libsigrokdecode_sd_card_spi/tree/sd_card_spi_fix
  • Loading branch information
snmoore committed Nov 11, 2022
1 parent e303fd4 commit dcd73ae
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions decoders/sdcard_spi/pd.py
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +385,9 @@ def handle_data_cmd17(self, miso):
# TODO: Check CRC.
self.put(self.ss_crc, self.es_crc, self.out_ann, [Ann.CMD17, ['CRC']])
self.state = 'IDLE'
self.read_buf = []
self.cmd17_start_token_found = False
self.is_cmd17 = False
elif miso == 0xfe:
self.put(self.ss, self.es, self.out_ann, [Ann.CMD17, ['Start Block']])
self.cmd17_start_token_found = True
Expand Down

0 comments on commit dcd73ae

Please sign in to comment.