at24cx write time delay not long enough
Maintainer thường phản hồi trong vòng 3 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 47/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- go
- Lĩnh vực
- embedded-iot
Hướng nghiên cứu
Read at24cx/at24cx.go, focusing on WriteByte and writeAt, and compare their delays with the datasheet’s documented 10 ms maximum write time. Check the at24cx example’s repeated WriteByte calls to understand how the missing delay affects callers. Done means both write paths reliably allow the chip’s write cycle to complete; the issue reports no test file.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
First, thank you for the amazing tinygo work - am having much success on both Raspberry Pi Pico and Seeed Studio XIAO RP2040 boards.
The documented maximum write time in the datasheet is 10 milliseconds.
In file:
https://github.com/tinygo-org/drivers/blob/v0.32.0/at24cx/at24cx.go
The method "WriteByte" there is no write time delay so the engineer using this driver must know to include a write time delay when calling iteratively (as demonstrated by the at24cx example main.go file)
The method "writeAt" contains a write time delay but it is only 2 milliseconds - this obviously works for many/most at24cx chips but not all as i have one at24cx which must be on the slower-side to complete the write cycle.
In my local copy of the driver, i added the following to the two appropriate locations, in "WriteByte" before "return d.bus.Tx(d.Address, address, nil)" which results in the delay when iteratively called and is less disruptive to the code than trying to add afterward (though it would be better to delay afterward), and replacing the existing 2 millisecond write time delay in the "writeAt" method:
// The required time delay should be in the driver and preferably not the responsibility of the application
//time.Sleep(2 * time.Millisecond) // empirically NOT enough sleep time
//time.Sleep(3 * time.Millisecond) // empirically YES enough sleep time
//time.Sleep(10 * time.Millisecond) // DATASHEET-REQUIRED sleep time
time.Sleep(11 * time.Millisecond) // DATASHEET-REQUIRED-SAFETY-MARGIN sleep time
Again, thank you for all the great work on tinygo!
I hope this helps others in the future.
- Ngôn ngữ chính
- Go
- Star
- 756
- Fork
- 251
- Merge trung bình
- 7 ngày 12 giờ
- Pull request đã merge (30 ngày)
- 8
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của tinygo-org/drivers
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 20/100
tinygo-org/drivers#946 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 55/100
tinygo-org/drivers#927 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 22/100
tinygo-org/drivers#901 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 32/100
tinygo-org/drivers#886 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 3 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
tinygo-org/drivers#877 ·
Maintainer thường phản hồi trong vòng 3 ngày
Tất cả issue của tinygo-org/drivers
Issue tương tự
-
release
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 75/100
github/gh-aw-mcpg#17603 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
avr: SPI Mode2 runs as mode 1Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
tinygo-org/tinygo#6727 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
help wanted
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 94/100
oras-project/oras-go#1827 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
docs: database/sql Sessions example never commits its batch, and its "Full Example" link is a 404Đang mởdocumentation
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
ClickHouse/clickhouse-go#2185 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug needs triage receiver/podman
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
open-telemetry/opentelemetry-collector-contrib#53700 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày