Skip to content

I2C polling#76

Draft
jhalmen wants to merge 3 commits intomasterfrom
i2cpoll
Draft

I2C polling#76
jhalmen wants to merge 3 commits intomasterfrom
i2cpoll

Conversation

@jhalmen
Copy link
Copy Markdown
Contributor

@jhalmen jhalmen commented Aug 18, 2023

This patchset introduces a public poll method on the I2C interface that must be called regularly to check for stalled communication and initialize transfers.

do something like

k.every(1, [](uint32_t, uint32_t) {
    i2cbus.poll();
});

@jhalmen jhalmen marked this pull request as draft October 18, 2023 10:00
@jhalmen jhalmen force-pushed the i2cpoll branch 2 times, most recently from 7706a53 to f93f870 Compare November 6, 2023 19:33
@jhalmen jhalmen changed the title I2cpoll I2C polling Nov 6, 2023
@jhalmen
Copy link
Copy Markdown
Contributor Author

jhalmen commented Nov 6, 2023

I feel like #90 is the fix i've been looking for, but this is probably a feature we should consider anyways

call this regularly and more frequently than queueing i2c requests in
order to process requests & deadlines correctly

also fixes potential bug referred to in 6313be
for some reason polling right when pushing a request to the interface
will stall communication, always going into the error handler.

calling `poll` regularly in its own 'task' instead seems to fix this
particular bug.

this probably only fixes the symptoms instead of the actual reason
behind it, but works for now. more investigation will be necessary to
find the underlying reason and find a proper fix.
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.

1 participant