[HAL][DSI] Provide a way to get the HAL_DSI_DataRate entry matching a lane rate
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 45/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Ferma
- Stack tecnologico
- c
- Ambito
- embedded-iot
Direzione di ricerca
Start by reviewing the referenced pull request, then inspect stm32mp2xx_hal_dsi.c and stm32mp2xx_hal_dsi.h where the helper and prototype would belong. Check the existing HAL_DSI_DataRate enumeration and confirm the requested NULL handling and lane-rate boundary behavior. Done means the public API is implemented consistently with the enumeration and validated by the project’s available checks.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Context
On STM32MP2, HAL_DSI_Init() uses DSI_InitTypeDef.PhyDataRate to select the PLL
and PHY regulation settings. This field is of type HAL_DSI_DataRate, whose values
are plain indexes (HAL_DSI_DT_80, HAL_DSI_DT_90, ... HAL_DSI_DT_2500). The lane
rate of each entry only appears in the enumerator names. The table of rates is not
exposed by the HAL.
Problem
A driver that computes the DSI lane rate at runtime from the PLL configuration (for
example the Zephyr STM32 LTDC/DSI display driver, which derives it from the
devicetree clock settings) has to pick the matching HAL_DSI_DataRate entry. The only
way to do that today is to copy the full list of rates (63 entries, from 80 to
2500 Mbps) into the driver and keep it in sync with the enumeration by hand.
This duplicates HAL-internal knowledge in every user and can break silently if the
enumeration changes in a future STM32CubeMP2 release.
Proposal
Add a helper to the DSI HAL that returns the HAL_DSI_DataRate entry for a given lane
rate, so the table stays next to the enumeration it describes:
HAL_StatusTypeDef HAL_DSI_GetPhyDataRate(uint32_t LaneRateMbps,
HAL_DSI_DataRate *PhyDataRate);
- Returns
HAL_ERRORifPhyDataRateisNULL. - Returns
HAL_DSI_DT_2500for lane rates of 2450 Mbps and above. - The result can be written directly to
DSI_InitTypeDef.PhyDataRate.
A reference implementation (about 40 lines in stm32mp2xx_hal_dsi.c plus a prototype
in stm32mp2xx_hal_dsi.h) is available here:
Pull request
Motivation / downstream
We plan to carry this change as a local patch in Zephyr's hal_stm32 module
(stm32cube/stm32mp2xx, based on STM32CubeMP2 v1.3.0) for the STM32MP2 DSI driver.
Zephyr asks that such patches be reported upstream first. Having this API (or an
equivalent, such as exposing the rate table) in STM32CubeMP2 would let us drop the
patch at the next Cube update.
We would also like to know if ST prefers another approach, for example a macro or a
public table.
- Lingua principale
- C
- Stelle
- 19
- Fork
- 6
- 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 STMicroelectronics/STM32CubeMP2
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 65/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 35/100
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 38/100
-
HAL/CMSIS SubmodulesAperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 25/100
STMicroelectronics/STM32CubeMP2#2 · 1 commento ·
Tutte le issue di STMicroelectronics/STM32CubeMP2
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
FujiNetWIFI/fujinet-firmware#2079 ·
I maintainer di solito rispondono entro 1 giorno
-
bug Official Image release/25.12 Supported Device target/kirkwood
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
area/archive bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
DarkFlippers/qUnleashed#374 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 84/100
VirusTotal/yara#2255 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100