Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CS switched by upper layers so request-response can be done in single CS switch #7

Closed
wants to merge 1 commit into from

Conversation

p5n
Copy link

@p5n p5n commented Jul 9, 2019

I was able to interact with AT45DBxx flash somehow, at least it reports chip id and status register.

Probably similar fix should be done for spi-bitbang.

@p5n p5n closed this May 25, 2021
@gschorcht
Copy link
Owner

@p5n What was the reason for closing your PR?

@p5n
Copy link
Author

p5n commented Oct 25, 2021

Actually it can be reopened, but I do not use this device anymore

mr-nice pushed a commit to mr-nice/spi-ch341-usb that referenced this pull request Oct 19, 2023
Using requests with multiple 32-byte segments doesn't always
work. Split very transaction in segments of 32 bytes. For the writes,
check that devce chip is ready to process it first. For the read, ask
a status byte for every segemnt.

This fixes 24C eeprom writes, as well as i2cdetect.

  # i2cdetect -r 1
  WARNING! This program can confuse your I2C bus, cause data loss and worse!
  I will probe file /dev/i2c-1 using receive byte commands.
  I will probe address range 0x08-0x77.
  Continue? [Y/n]
       0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
  00:                         -- -- -- -- -- -- -- --
  10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
  20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
  30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
  40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
  50: 50 -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
  60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
  70: -- -- -- -- -- -- -- --

  # i2cdetect -q 1
  WARNING! This program can confuse your I2C bus, cause data loss and worse!
  I will probe file /dev/i2c-1 using quick write commands.
  I will probe address range 0x08-0x77.
  Continue? [Y/n]
       0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
  00:                         -- -- -- -- -- -- -- --
  10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
  20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
  30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
  40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
  50: 50 -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
  60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
  70: -- -- -- -- -- -- -- --

Issue gschorcht#13, based on PR gschorcht#7.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants