Skip to content

Commit de76ad8

Browse files
committed
Update patchset
1 parent 6c3abc9 commit de76ad8

12 files changed

+136
-43
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
From 88e1023c6fb7197e529d3054b2dcb4bbdee8b73f Mon Sep 17 00:00:00 2001
2+
From: giulcioffi <[email protected]>
3+
Date: Mon, 28 Mar 2022 11:02:58 +0200
4+
Subject: [PATCH 140/150] Fix Ethernet pins configuration
5+
6+
---
7+
.../TARGET_PORTENTA_H7/stm32h7_eth_init.c | 32 ++++++++++++++++---
8+
1 file changed, 28 insertions(+), 4 deletions(-)
9+
10+
diff --git a/connectivity/drivers/emac/TARGET_STM/TARGET_STM32H7/TARGET_PORTENTA_H7/stm32h7_eth_init.c b/connectivity/drivers/emac/TARGET_STM/TARGET_STM32H7/TARGET_PORTENTA_H7/stm32h7_eth_init.c
11+
index 3fbac0555f..643fc5acd3 100644
12+
--- a/connectivity/drivers/emac/TARGET_STM/TARGET_STM32H7/TARGET_PORTENTA_H7/stm32h7_eth_init.c
13+
+++ b/connectivity/drivers/emac/TARGET_STM/TARGET_STM32H7/TARGET_PORTENTA_H7/stm32h7_eth_init.c
14+
@@ -100,9 +100,12 @@ void HAL_ETH_MspInit(ETH_HandleTypeDef *heth)
15+
HAL_GPIO_Init(GPIOC, &gpio_eth_rst_init_structure);
16+
HAL_GPIO_WritePin(GPIOC, ETH_RXD0_Pin, 1);
17+
HAL_GPIO_WritePin(GPIOC, ETH_RXD1_Pin, 1);
18+
- gpio_eth_rst_init_structure.Pin = ETH_CRS_DV_Pin;
19+
+
20+
+ gpio_eth_rst_init_structure.Mode = GPIO_MODE_OUTPUT_PP;
21+
+ gpio_eth_rst_init_structure.Pin = GPIO_PIN_1;
22+
+ gpio_eth_rst_init_structure.Pull = GPIO_NOPULL;
23+
HAL_GPIO_Init(GPIOA, &gpio_eth_rst_init_structure);
24+
- HAL_GPIO_WritePin(GPIOA, ETH_CRS_DV_Pin, 1);
25+
+ HAL_GPIO_WritePin(GPIOA, GPIO_PIN_1, 1);
26+
27+
HAL_Delay(25);
28+
HAL_GPIO_WritePin(GPIOJ, GPIO_PIN_15, 0);
29+
@@ -127,14 +130,35 @@ void HAL_ETH_MspInit(ETH_HandleTypeDef *heth)
30+
GPIO_InitStruct.Alternate = GPIO_AF11_ETH;
31+
HAL_GPIO_Init(GPIOG, &GPIO_InitStruct);
32+
33+
- GPIO_InitStruct.Pin = ETH_MDC_SAI4_D1_Pin | ETH_RXD0_Pin | ETH_RXD1_Pin;
34+
+ GPIO_InitStruct.Pin = ETH_MDC_SAI4_D1_Pin;
35+
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
36+
GPIO_InitStruct.Pull = GPIO_NOPULL;
37+
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
38+
GPIO_InitStruct.Alternate = GPIO_AF11_ETH;
39+
HAL_GPIO_Init(GPIOC, &GPIO_InitStruct);
40+
41+
- GPIO_InitStruct.Pin = ETH_MDIO_Pin | ETH_REF_CLK_Pin | ETH_CRS_DV_Pin;
42+
+ GPIO_InitStruct.Pin = ETH_RXD0_Pin | ETH_RXD1_Pin;
43+
+ GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
44+
+ GPIO_InitStruct.Pull = GPIO_PULLDOWN;
45+
+ GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
46+
+ GPIO_InitStruct.Alternate = GPIO_AF11_ETH;
47+
+ HAL_GPIO_Init(GPIOC, &GPIO_InitStruct);
48+
+
49+
+ GPIO_InitStruct.Pin = ETH_CRS_DV_Pin;
50+
+ GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
51+
+ GPIO_InitStruct.Pull = GPIO_PULLUP;
52+
+ GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
53+
+ GPIO_InitStruct.Alternate = GPIO_AF11_ETH;
54+
+ HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
55+
+
56+
+ GPIO_InitStruct.Pin = ETH_MDIO_Pin;
57+
+ GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
58+
+ GPIO_InitStruct.Pull = GPIO_PULLDOWN;
59+
+ GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
60+
+ GPIO_InitStruct.Alternate = GPIO_AF11_ETH;
61+
+ HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
62+
+
63+
+ GPIO_InitStruct.Pin = ETH_REF_CLK_Pin;
64+
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
65+
GPIO_InitStruct.Pull = GPIO_NOPULL;
66+
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
67+
--
68+
2.25.1
69+

patches/0140-Start-Ethernet-PHY-address-discovery-from-address-1.patch

-25
This file was deleted.

patches/0141-COMPONENT_SE050-Add-defines-to-exclude-DES-functions.patch

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
From fca7038344f647884151c5df3542236c349246b5 Mon Sep 17 00:00:00 2001
1+
From 15dbc037d15641b09507b65deb9dba43a3c193f3 Mon Sep 17 00:00:00 2001
22
From: pennam <[email protected]>
33
Date: Thu, 17 Mar 2022 10:05:32 +0100
4-
Subject: [PATCH 141/149] COMPONENT_SE050: Add defines to exclude DES functions
4+
Subject: [PATCH 141/150] COMPONENT_SE050: Add defines to exclude DES functions
55
if MBEDTLS_DES_C module is not enabled
66

77
---

patches/0142-Add-build-options-to-allow-to-disable-device-functio.patch

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
From 0bead2417c30bc898b0563ed1c131925d4732df4 Mon Sep 17 00:00:00 2001
1+
From 006f588decaf7e097f6b0cb67460a97b2643cb04 Mon Sep 17 00:00:00 2001
22
From: pennam <[email protected]>
33
Date: Tue, 24 Aug 2021 17:02:47 +0200
4-
Subject: [PATCH 142/149] Add build options to allow to disable device
4+
Subject: [PATCH 142/150] Add build options to allow to disable device
55
functionalities i.e DEVICE_ANALOGOUT
66

77
---

patches/0143-MCUboot-PORTENTA_H7_M7-Change-ST-HAL-configuration-r.patch

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
From e1df8c5554dd8957e956f8d537f07807abf041d6 Mon Sep 17 00:00:00 2001
1+
From 4b16b9a73aad76923101b705c35becf67a2fa447 Mon Sep 17 00:00:00 2001
22
From: pennam <[email protected]>
33
Date: Tue, 24 Aug 2021 17:03:39 +0200
4-
Subject: [PATCH 143/149] MCUboot:PORTENTA_H7_M7:Change ST HAL configuration
4+
Subject: [PATCH 143/150] MCUboot:PORTENTA_H7_M7:Change ST HAL configuration
55
removing unnecessary modules
66

77
---

patches/0144-Add-build-option-to-allow-FATFS-customization-remove.patch

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
From fd50f44f3a155ead9cd4ff61fb436acb5eefcdc0 Mon Sep 17 00:00:00 2001
1+
From e15600c6af3c5d042af46864ebb19032d8a997ad Mon Sep 17 00:00:00 2001
22
From: pennam <[email protected]>
33
Date: Tue, 24 Aug 2021 17:04:35 +0200
4-
Subject: [PATCH 144/149] Add build option to allow FATFS customization: remove
4+
Subject: [PATCH 144/150] Add build option to allow FATFS customization: remove
55
mkfs
66

77
---

patches/0145-Optimize-HAL_RCCEx_PeriphCLKConfig-using-only-HAL-en.patch

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
From 5eb7ccf560f91c68025fbb28709ae7f71cf7406e Mon Sep 17 00:00:00 2001
1+
From c9ea188ab6fedefa03443a6cb336e70e809a34da Mon Sep 17 00:00:00 2001
22
From: pennam <[email protected]>
33
Date: Thu, 26 Aug 2021 15:40:48 +0200
4-
Subject: [PATCH 145/149] Optimize HAL_RCCEx_PeriphCLKConfig using only HAL
4+
Subject: [PATCH 145/150] Optimize HAL_RCCEx_PeriphCLKConfig using only HAL
55
enabled modules
66

77
---

patches/0146-MCUboot-PORTENTA_H7_M7-Remove-HSI-CSI-LSI-HSI48-supp.patch

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
From 3140a297ab09a2797a3899ba9f3db1e03413bbbb Mon Sep 17 00:00:00 2001
1+
From 6df4a3d8af6d4b954bda1635006ea62ec9df0dd7 Mon Sep 17 00:00:00 2001
22
From: pennam <[email protected]>
33
Date: Thu, 26 Aug 2021 15:42:18 +0200
4-
Subject: [PATCH 146/149] MCUboot:PORTENTA_H7_M7:Remove HSI,CSI,LSI,HSI48
4+
Subject: [PATCH 146/150] MCUboot:PORTENTA_H7_M7:Remove HSI,CSI,LSI,HSI48
55
support from HAL_RCC_OscConfig
66

77
---

patches/0147-MCUBoot-PORTENTA_H7_M7-Add-linker-sections-to-store-.patch

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
From 4bb8a4f740e28f1172caefed70d00bae7e586b3e Mon Sep 17 00:00:00 2001
1+
From 669637a00509686bfe313bc2cdb3f597314d5510 Mon Sep 17 00:00:00 2001
22
From: pennam <[email protected]>
33
Date: Wed, 4 Aug 2021 09:33:11 +0200
4-
Subject: [PATCH 147/149] MCUBoot:PORTENTA_H7_M7:Add linker sections to store
4+
Subject: [PATCH 147/150] MCUBoot:PORTENTA_H7_M7:Add linker sections to store
55
boot configuration and gain space
66

77
---

patches/0148-Add-build-option-DEVICE_SERIAL_FC-preventing-build-i.patch

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
From 812d3d082e49c375c9d500e448eb4b200720c717 Mon Sep 17 00:00:00 2001
1+
From f9a49286a17f8394ff0071fb8cc2cd5c0de9cf68 Mon Sep 17 00:00:00 2001
22
From: pennam <[email protected]>
33
Date: Mon, 14 Mar 2022 09:39:31 +0100
4-
Subject: [PATCH 148/149] Add build option DEVICE_SERIAL_FC preventing build if
4+
Subject: [PATCH 148/150] Add build option DEVICE_SERIAL_FC preventing build if
55
flow control is disabled
66

77
---

patches/0149-MCUboot-PORTENTA_H7_M7-Remove-FATFS-mkdir-and-rename.patch

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
From 204cd6a65e368022528c3087dfd420026219fcf1 Mon Sep 17 00:00:00 2001
1+
From f52fb039b673a3c137340680e42a14246444e7b9 Mon Sep 17 00:00:00 2001
22
From: pennam <[email protected]>
33
Date: Fri, 18 Mar 2022 14:57:45 +0100
4-
Subject: [PATCH 149/149] MCUboot:PORTENTA_H7_M7:Remove FATFS mkdir and rename
4+
Subject: [PATCH 149/150] MCUboot:PORTENTA_H7_M7:Remove FATFS mkdir and rename
55

66
---
77
storage/filesystem/fat/include/fat/FATFileSystem.h | 4 ++++
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
From f0b1b6c7375568f3256d09287956dc0649b46b20 Mon Sep 17 00:00:00 2001
2+
From: Alexander Entinger <[email protected]>
3+
Date: Tue, 29 Mar 2022 13:01:34 +0200
4+
Subject: [PATCH 150/150] Fix: Only return true for 'uart_is_writeable' if the
5+
TX FIFO is empty.
6+
7+
This allows the Arduino_Braccio_plusplus library to work again, since it depends on precisely trimmed timeouts to change data direction on the RS485 lines.
8+
9+
This means that when '_serial->flush();' is called, we do wait until the FIFO is empty before turning of DATA ENABLE. Currently if we call _serial->flush(); we are instead only waiting until at least one element has been removed from the transmit FIFO.
10+
---
11+
.../pico-sdk/rp2_common/hardware_uart/include/hardware/uart.h | 4 ++--
12+
targets/TARGET_RASPBERRYPI/TARGET_RP2040/serial_api.c | 2 +-
13+
2 files changed, 3 insertions(+), 3 deletions(-)
14+
15+
diff --git a/targets/TARGET_RASPBERRYPI/TARGET_RP2040/pico-sdk/rp2_common/hardware_uart/include/hardware/uart.h b/targets/TARGET_RASPBERRYPI/TARGET_RP2040/pico-sdk/rp2_common/hardware_uart/include/hardware/uart.h
16+
index 2eafc7ac50..58c0e800be 100644
17+
--- a/targets/TARGET_RASPBERRYPI/TARGET_RP2040/pico-sdk/rp2_common/hardware_uart/include/hardware/uart.h
18+
+++ b/targets/TARGET_RASPBERRYPI/TARGET_RP2040/pico-sdk/rp2_common/hardware_uart/include/hardware/uart.h
19+
@@ -253,14 +253,14 @@ static inline void uart_set_fifo_enabled(uart_inst_t *uart, bool enabled) {
20+
// ----------------------------------------------------------------------------
21+
// Generic input/output
22+
23+
-/*! \brief Determine if space is available in the TX FIFO
24+
+/*! \brief Determine if the TX FIFO is empty.
25+
* \ingroup hardware_uart
26+
*
27+
* \param uart UART instance. \ref uart0 or \ref uart1
28+
* \return false if no space available, true otherwise
29+
*/
30+
static inline bool uart_is_writable(uart_inst_t *uart) {
31+
- return !(uart_get_hw(uart)->fr & UART_UARTFR_TXFF_BITS);
32+
+ return (uart_get_hw(uart)->fr & UART_UARTFR_TXFE_BITS);
33+
}
34+
35+
/*! \brief Wait for the UART TX fifo to be drained
36+
diff --git a/targets/TARGET_RASPBERRYPI/TARGET_RP2040/serial_api.c b/targets/TARGET_RASPBERRYPI/TARGET_RP2040/serial_api.c
37+
index a6f01a6063..4b2398b397 100644
38+
--- a/targets/TARGET_RASPBERRYPI/TARGET_RP2040/serial_api.c
39+
+++ b/targets/TARGET_RASPBERRYPI/TARGET_RP2040/serial_api.c
40+
@@ -212,4 +212,4 @@ const PinMap *serial_rts_pinmap(void)
41+
return PinMap_UART_RTS;
42+
}
43+
44+
-#endif
45+
\ No newline at end of file
46+
+#endif
47+
--
48+
2.25.1
49+

0 commit comments

Comments
 (0)