Possibly outdated Assembly code in STM32.GPIO#Lock_The_Pin
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 35/100
- Tipo di issue
- Bug
- Chiarezza
- Da chiarire
- Stato di attività
- Attiva
- Ambito
- embedded-iot
Direzione di ricerca
Inizia da STM32.GPIO#Lock_The_Pin e ispeziona la sequenza Assembly insieme alla dichiarazione di GPIO_Peripheral. Confronta l’implementazione con i requisiti citati di RM0090 per GPIOx_LCKR e con il comportamento della compilazione di Cortex-M0+; il lavoro è completato quando si determina se l’approccio attuale è valido o necessita di una modifica documentata e compilabile.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- Ada
- Stelle
- 286
- Fork
- 165
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di AdaCore/Ada_Drivers_Library
-
Outdated SVD bindingsAperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
AdaCore/Ada_Drivers_Library#481 · 1 commento ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 48/100
AdaCore/Ada_Drivers_Library#462 · 1 commento ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 58/100
AdaCore/Ada_Drivers_Library#447 · 2 reazioni ·
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 15/100
AdaCore/Ada_Drivers_Library#440 · 2 commenti ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 48/100
AdaCore/Ada_Drivers_Library#431 · 4 commenti ·
Tutte le issue di AdaCore/Ada_Drivers_Library
Issue simili
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 75/100
NabuCasa/silabs-firmware-builder#231 · 1 commento ·
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 12 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
espruino/BangleApps#4364 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
I maintainer di solito rispondono entro 1 giorno