We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
read_byte
Running on a LOLIN D1 mini I've had to decrease the delay in read_byte to 16 or 17 swim clock cycles or there's always a timeout on bits 6, 7 or 8.
The decimal "indicate which bit failed" offset isn't very usable because stm8flash reports unknown error codes as hex.
--- src/driver/swim.c +++ src/driver/swim.c @@ -181,11 +182,11 @@ static int read_byte() { uint32_t parity = 0; uint32_t i; for (i = 0; i < 9; i++) { - sync_ccount(next + 18 * SWIM_CLOCK); + sync_ccount(next + 17 * SWIM_CLOCK); int bit = read_bit(&next); if (bit == SWIM_ERROR_READ_BIT_TIMEOUT) { // indicate which bit failed (for debugging) - return -i - 20; + return -i - 0x20; } result = result << 1 | !!bit; parity ^= result;
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Running on a LOLIN D1 mini I've had to decrease the delay in
read_byte
to 16 or 17 swim clock cycles or there's always a timeout on bits 6, 7 or 8.The decimal "indicate which bit failed" offset isn't very usable because stm8flash reports unknown error codes as hex.
The text was updated successfully, but these errors were encountered: