<meta http-equiv="Content-Type" content="text/html; charset=utf-8"><div dir="ltr"><div>Hi Karel,</div><div>I happen to have a board in hand that doesn't nominally use UART7, but has been reconfigured to use it since the typical USART1 connection was ripped off of the board. It won't ever have a public BSP, but I'm using the base stm32h7 BSP with the right options layered on top to get the necessary functionality. I have a few more pieces that I'm condensing into proper options that will let me make use of the rest of the board's functionality.<br></div><div><br></div><div>Kinsey<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Jul 24, 2023 at 3:06 PM Karel Gardas <karel@functional.vision> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
Hello Kinsey,<br>
<br>
I think the patch looks good, although I've not verified precise <br>
PIN/REGs assignment value. I trust you test this somehow otherwise you <br>
would not submit it. And this steers my curiosity. The only board (from <br>
ST Micro) I know which provides connection to UART7 is stm32h735g-dk <br>
which is not supported by RTEMS due to missing MCU support in old HAL <br>
code. I submitted new HAL patches last week but they are not in yet. So <br>
if this is not company secrete let me ask, what board you are using with <br>
UART7 connection?<br>
<br>
Thanks,<br>
Karel<br>
<br>
On 7/24/23 20:28, Kinsey Moore wrote:<br>
> This change allows for the pins assigned to UART7 to be reconfigured via<br>
> config.ini.<br>
> ---<br>
> bsps/arm/stm32h7/console/console-uart7-cfg.c | 4 ++--<br>
> spec/build/bsps/arm/stm32h7/grp.yml | 4 ++++<br>
> .../build/bsps/arm/stm32h7/optuart7gpiopins.yml | 17 +++++++++++++++++<br>
> .../build/bsps/arm/stm32h7/optuart7gpioregs.yml | 17 +++++++++++++++++<br>
> 4 files changed, 40 insertions(+), 2 deletions(-)<br>
> create mode 100644 spec/build/bsps/arm/stm32h7/optuart7gpiopins.yml<br>
> create mode 100644 spec/build/bsps/arm/stm32h7/optuart7gpioregs.yml<br>
> <br>
> diff --git a/bsps/arm/stm32h7/console/console-uart7-cfg.c b/bsps/arm/stm32h7/console/console-uart7-cfg.c<br>
> index dca19e652d..2ced4cf9c2 100644<br>
> --- a/bsps/arm/stm32h7/console/console-uart7-cfg.c<br>
> +++ b/bsps/arm/stm32h7/console/console-uart7-cfg.c<br>
> @@ -33,9 +33,9 @@<br>
> <br>
> const stm32h7_uart_config stm32h7_uart7_config = {<br>
> .gpio = {<br>
> - .regs = GPIOB,<br>
> + .regs = STM32H7_UART7_GPIO_REGS,<br>
> .config = {<br>
> - .Pin = GPIO_PIN_3 | GPIO_PIN_4,<br>
> + .Pin = STM32H7_UART7_GPIO_PINS,<br>
> .Mode = GPIO_MODE_AF_PP,<br>
> .Pull = GPIO_NOPULL,<br>
> .Speed = GPIO_SPEED_FREQ_LOW,<br>
> diff --git a/spec/build/bsps/arm/stm32h7/grp.yml b/spec/build/bsps/arm/stm32h7/grp.yml<br>
> index 595762c665..239df9b898 100644<br>
> --- a/spec/build/bsps/arm/stm32h7/grp.yml<br>
> +++ b/spec/build/bsps/arm/stm32h7/grp.yml<br>
> @@ -106,6 +106,10 @@ links:<br>
> uid: optusart3gpiopins<br>
> - role: build-dependency<br>
> uid: optusart3gpioregs<br>
> +- role: build-dependency<br>
> + uid: optuart7gpiopins<br>
> +- role: build-dependency<br>
> + uid: optuart7gpioregs<br>
> - role: build-dependency<br>
> uid: optvariant<br>
> - role: build-dependency<br>
> diff --git a/spec/build/bsps/arm/stm32h7/optuart7gpiopins.yml b/spec/build/bsps/arm/stm32h7/optuart7gpiopins.yml<br>
> new file mode 100644<br>
> index 0000000000..0252bdab7c<br>
> --- /dev/null<br>
> +++ b/spec/build/bsps/arm/stm32h7/optuart7gpiopins.yml<br>
> @@ -0,0 +1,17 @@<br>
> +SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause<br>
> +actions:<br>
> +- get-string: null<br>
> +- define-unquoted: null<br>
> +build-type: option<br>
> +copyrights:<br>
> +- Copyright (C) 2023 On-Line Applications Research (OAR)<br>
> +default:<br>
> +- enabled-by: true<br>
> + value: ( GPIO_PIN_3 | GPIO_PIN_4 )<br>
> +description: |<br>
> + GPIO pins used for the UART7 pin configuration.<br>
> +enabled-by: true<br>
> +format: '{}'<br>
> +links: []<br>
> +name: STM32H7_UART7_GPIO_PINS<br>
> +type: build<br>
> diff --git a/spec/build/bsps/arm/stm32h7/optuart7gpioregs.yml b/spec/build/bsps/arm/stm32h7/optuart7gpioregs.yml<br>
> new file mode 100644<br>
> index 0000000000..16ce3bf526<br>
> --- /dev/null<br>
> +++ b/spec/build/bsps/arm/stm32h7/optuart7gpioregs.yml<br>
> @@ -0,0 +1,17 @@<br>
> +SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause<br>
> +actions:<br>
> +- get-string: null<br>
> +- define-unquoted: null<br>
> +build-type: option<br>
> +copyrights:<br>
> +- Copyright (C) 2023 On-Line Applications Research (OAR)<br>
> +default:<br>
> +- enabled-by: true<br>
> + value: GPIOB<br>
> +description: |<br>
> + GPIO registers used for the UART7 pin configuration.<br>
> +enabled-by: true<br>
> +format: '{}'<br>
> +links: []<br>
> +name: STM32H7_UART7_GPIO_REGS<br>
> +type: build<br>
<br>
_______________________________________________<br>
devel mailing list<br>
<a href="mailto:devel@rtems.org" target="_blank">devel@rtems.org</a><br>
<a href="http://lists.rtems.org/mailman/listinfo/devel" rel="noreferrer" target="_blank">http://lists.rtems.org/mailman/listinfo/devel</a><br>
</blockquote></div>