Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 2001114

Browse filesBrowse files
committed
Always stop after reading.
For some reason suspending causes subsequent reads to overrun.
1 parent f96389a commit 2001114
Copy full SHA for 2001114

File tree

Expand file treeCollapse file tree

1 file changed

+4
-7
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+4
-7
lines changed

‎nrf-hal-common/src/twim.rs

Copy file name to clipboardExpand all lines: nrf-hal-common/src/twim.rs
+4-7Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -425,13 +425,10 @@ where
425425
compiler_fence(SeqCst);
426426
unsafe { self.set_rx_buffer(buffer)? };
427427

428-
// Set appropriate lastrx shortcut.
429-
if next_operation_write.is_none() {
430-
self.0.shorts.write(|w| w.lastrx_stop().enabled());
431-
} else {
432-
#[cfg(not(any(feature = "5340-app", feature = "5340-net", feature = "52832")))]
433-
self.0.shorts.write(|w| w.lastrx_suspend().enabled());
434-
}
428+
// TODO: We should suspend rather than stopping if there are more operations to
429+
// follow, but for some reason that results in an overrun error and reading bad
430+
// data in the next read.
431+
self.0.shorts.write(|w| w.lastrx_stop().enabled());
435432

436433
// Start read.
437434
self.0.tasks_startrx.write(|w| unsafe { w.bits(1) });

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.