You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by "qbazd (via GitHub)" <gi...@apache.org> on 2023/08/29 06:27:45 UTC
[GitHub] [nuttx] qbazd opened a new issue, #10436: STM32L4XR: LPUART not working on GPIOG
qbazd opened a new issue, #10436:
URL: https://github.com/apache/nuttx/issues/10436
Hi,
Nuttx version 12.2.1
I'm working on running Nuttx on NUCLEO-L4RZI - STM32L4XRXX - STM32L45RZI
Writing this issue/solution for documentation purposes, as it took me some time to figure it out.
**Problem:**
When LPUART1 is configured on port G (connected by default internally to ST-LINKV2 debugger).
#define GPIO_LPUART1_TX GPIO_LPUART1_TX_3 // PG7
#define GPIO_LPUART1_RX GPIO_LPUART1_RX_3 // PG8
on NUCLEO-L4R5ZI is enabled it silently not working, low_putc also don't work (dough Nuttx layer is visible - /dev/ttySx).
**Explenation:**
Port G have to be separately turned on - page: 186, chapter: 5.1.2 of rm0432-stm32l4-series-advanced-armbased-32bit-mcus-stmicroelectronics.pdf
It requires separate external power source (see doc).
In my understanding it touches everything working on GPIOG, about 63 GPIO alternate functions.
**Solution:**
Solution is to put `stm32l4_pwr_vddio2_valid(true);` in your: `void stm32l4_board_initialize(void)`.
see `arch/arm/src/stm32l4/stm32l4_pwr.c` and `boards/arm/stm32l4/steval-stlcs01v1/src/stm32_boot.c` for reference.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [nuttx] qbazd commented on issue #10436: STM32L4XR: LPUART not working on GPIOG
Posted by "qbazd (via GitHub)" <gi...@apache.org>.
qbazd commented on issue #10436:
URL: https://github.com/apache/nuttx/issues/10436#issuecomment-1697064222
Hi @davids5,
Yes - GPIO clock enabling code works as intended, for all GPIOs (in `arch/arm/src/stm32l4/stm32l4xrxx_rcc.c`), but this chip/family have extra step of enabling power to GPIOG[2:15] and had to be enabled additionally if needed. This port works on external power as documentations says.
No PR is needed for this as it is implemented. I just didn't knew about something like this.
I think best PR would be to add NUCLEO-L4R5ZI as supported board as an proper example. And I'm moving forward to it - resolving small issues like this.
So we could just close this issue as resolved right now.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [nuttx] qbazd closed issue #10436: STM32L4XR: LPUART not working on GPIOG
Posted by "qbazd (via GitHub)" <gi...@apache.org>.
qbazd closed issue #10436: STM32L4XR: LPUART not working on GPIOG
URL: https://github.com/apache/nuttx/issues/10436
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [nuttx] davids5 commented on issue #10436: STM32L4XR: LPUART not working on GPIOG
Posted by "davids5 (via GitHub)" <gi...@apache.org>.
davids5 commented on issue #10436:
URL: https://github.com/apache/nuttx/issues/10436#issuecomment-1697017822
@qbazd There is GPIO enabling code in the RCC file that enables the GPIO, it should probably make that call if it is enabled.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org