Possibly outdated Assembly code in STM32.GPIO#Lock_The_Pin
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 35/100
- issue の種類
- バグ
- 明瞭さ
- 説明が足りない
- 活発さ
- 活発
- 領域
- embedded-iot
調査の方向性
STM32.GPIO#Lock_The_Pin から開始し、GPIO_Peripheral の宣言と合わせて Assembly シーケンスを調べます。実装を、GPIOx_LCKR に関して引用されている RM0090 の要件および Cortex-M0+ のコンパイル動作と比較します。現在のアプローチが有効か、文書化されたコンパイル可能な変更が必要かを判断できれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Greetings!
I was working on my project that uses STM32.GPIO package and faced a compilation error. Assembly code in STM32.GPIO#Lock_The_Pin works well for Cortex-M3 and up, but fails compilation on my Cortex-M0+. The comment in Lock_The_Pin justifies use of Assembly by the fact that setting pin's lock bit requires an exact write sequence, which is confirmed by the documentation:
RM0090 Rev 22
8.4.8 GPIO port configuration lock register (GPIOx_LCKR)
(x = A..I/J/K)
This register is used to lock the configuration of the port bits when a correct write sequence
is applied to bit 16 (LCKK). The value of bits [15:0] is used to lock the configuration of the
GPIO. During the write sequence, the value of LCKR[15:0] must not change. When the
LOCK sequence has been applied on a port bit, the value of this port bit can no longer be
modified until the next MCU or peripheral reset.
Note: A specific write sequence is used to write to the GPIOx_LCKR register. Only word access
(32-bit long) is allowed during this write sequence.
Each lock bit freezes a specific configuration register (control and alternate function
registers).
Address offset: 0x1C
Reset value: 0x0000 0000
Access: 32-bit word only, read/write register
But isn't the write sequence guaranteed by the fact that GPIO_Peripheral is declared with Volatile? I understood it so that Volatile tells the compiler not to optimize and truly execute all reads and writes, in the order they are written in the source code. Is my reasoning correct or am i missing something? I am somewhat new to Ada and embedded and thus ignorant about many things.
- 主要言語
- Ada
- スター
- 287
- フォーク
- 166
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
AdaCore/Ada_Drivers_Library のほかの issue
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
AdaCore/Ada_Drivers_Library#481 · コメント 1 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 48/100
AdaCore/Ada_Drivers_Library#462 · コメント 1 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 58/100
AdaCore/Ada_Drivers_Library#447 · リアクション 2 件 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 15/100
AdaCore/Ada_Drivers_Library#440 · コメント 2 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 48/100
AdaCore/Ada_Drivers_Library#431 · コメント 4 件 ·
AdaCore/Ada_Drivers_Library の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
adafruit/Adafruit_LSM6DS#59 ·
-
v9.6.0: CMake incorrectly enforces presence of libevdev対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
contiki-ng/contiki-ng#3289 ·
メンテナーはふだん 3 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
OpenCarControls/firmware#34 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
zephyrproject-rtos/zephyr#122906 ·
メンテナーはふだん 2 日以内に返信