[HAL][DSI] Provide a way to get the HAL_DSI_DataRate entry matching a lane rate
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 45/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bien especificado
- Estado de actividad
- Estancado
- Stack tecnológico
- c
- Área
- embedded-iot
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- C
- Estrellas
- 19
- Forks
- 6
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de STMicroelectronics/STM32CubeMP2
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 65/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 35/100
-
ADC sample time define namingsAbierto
Dificultad 3/5 1-2 días Aptitud para principiantes 38/100
-
HAL/CMSIS SubmodulesAbierto
Dificultad 4/5 3-5 días Aptitud para principiantes 25/100
STMicroelectronics/STM32CubeMP2#2 · 1 comentario ·
Todos los issues de STMicroelectronics/STM32CubeMP2
Issues similares
-
[WinReg] update to v12.0.0Abiertocategory:port-update
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Los mantenedores suelen responder en 2 días
-
feat(palindrome): add C solutionPosiblemente ocupada @aadiitya2007 la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
techcsispit/code-corner#58 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
[LOGO] Add Ruxt Linux LogoAbiertologo request
Dificultad 2/5 1-3 horas Aptitud para principiantes 77/100
fastfetch-cli/fastfetch#2661 ·
Los mantenedores suelen responder en 1 día
-
Mark ignored Mac OS partitions RecoveryOSContainer and iBootSystemContainerPosiblemente ocupada @meven la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
storaged-project/udisks#1559 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 71/100
awslabs/aws-checksums#121 ·