is it possible to minimize the time taken to send stop bit in repeated start mode #2503

Open
opened 2025-06-05 02:29:16 -05:00 by kowshick16 · 5 comments
kowshick16 commented 2025-06-05 02:29:16 -05:00 (Migrated from github.com)

Here in below image, stop bit coming after 5ms in repeated start mode. is it possible to configure that time ? i want the stop bit to go immediately / the time i specified is sent.

i'm looking for ways to control this in both start-stop method and repeated start method ?

Image

Here in below image, stop bit coming after 5ms in repeated start mode. is it possible to configure that time ? i want the stop bit to go immediately / the time i specified is sent. i'm looking for ways to control this in both start-stop method and repeated start method ? ![Image](https://github.com/user-attachments/assets/6a069f52-c4cb-4b27-af1f-8cc701832b1c)
peterharperuk commented 2025-06-05 02:38:51 -05:00 (Migrated from github.com)

What code are you using? What hardware are you using?

What code are you using? What hardware are you using?
kowshick16 commented 2025-06-05 07:19:46 -05:00 (Migrated from github.com)

I have PICO H RP2040. im using the function "i2c_write_blocking" for sending the data. similar one for read

int i2c_write_blocking(i2c_inst_t *i2c, uint8_t addr, const uint8_t *src, size_t len, bool nostop) {
return i2c_write_blocking_internal(i2c, addr, src, len, nostop, NULL, NULL);
}

I have PICO H RP2040. im using the function "i2c_write_blocking" for sending the data. similar one for read int i2c_write_blocking(i2c_inst_t *i2c, uint8_t addr, const uint8_t *src, size_t len, bool nostop) { return i2c_write_blocking_internal(i2c, addr, src, len, nostop, NULL, NULL); }
kowshick16 commented 2025-06-06 02:14:03 -05:00 (Migrated from github.com)

code for repeated start mode:

uint8_t i2c_if_read(i2c_inst_t *i2c, uint8_t address, uint8_t *data, uint8_t size)
{
return i2c_read_blocking(i2c, address, data, size, true);
}

code for repeated start mode: uint8_t i2c_if_read(i2c_inst_t *i2c, uint8_t address, uint8_t *data, uint8_t size) { return i2c_read_blocking(i2c, address, data, size, true); }
kowshick16 commented 2025-06-12 12:16:05 -05:00 (Migrated from github.com)

@peterharperuk any suggestions ?

@peterharperuk any suggestions ?
lurch commented 2026-02-04 02:34:42 -06:00 (Migrated from github.com)

Does #1495 fix this? (i.e. use i2c_write_burst_blocking instead of i2c_write_blocking ?)

Does #1495 fix this? (i.e. use `i2c_write_burst_blocking` instead of `i2c_write_blocking` ?)
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
gh-raspberrypi/pico-sdk#2503
No description provided.