at24cx write time delay not long enough
メンテナーはふだん 3 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 47/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- go
- 領域
- embedded-iot
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- Go
- スター
- 756
- フォーク
- 251
- 平均マージ
- 7日 12時間
- マージ済み PR(30日)
- 8
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
tinygo-org/drivers のほかの issue
-
難易度 5/5 1週間以上 初心者へのやさしさ 20/100
tinygo-org/drivers#946 ·
メンテナーはふだん 3 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 55/100
tinygo-org/drivers#927 ·
メンテナーはふだん 3 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 22/100
tinygo-org/drivers#901 ·
メンテナーはふだん 3 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 32/100
tinygo-org/drivers#886 · コメント 1 件 ·
メンテナーはふだん 3 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
tinygo-org/drivers#877 ·
メンテナーはふだん 3 日以内に返信
tinygo-org/drivers の issue をすべて見る
似ている issue
-
release
難易度 1/5 1時間未満 初心者へのやさしさ 75/100
github/gh-aw-mcpg#17603 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
tinygo-org/tinygo#6727 ·
メンテナーはふだん 1 日以内に返信
-
help wanted
難易度 1/5 1時間未満 初心者へのやさしさ 94/100
oras-project/oras-go#1827 ·
メンテナーはふだん 1 日以内に返信
-
docs: database/sql Sessions example never commits its batch, and its "Full Example" link is a 404オープンdocumentation
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
ClickHouse/clickhouse-go#2185 ·
メンテナーはふだん 1 日以内に返信
-
bug needs triage receiver/podman
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
open-telemetry/opentelemetry-collector-contrib#53700 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信