forked from ARMmbed/mbed-os
-
Notifications
You must be signed in to change notification settings - Fork 26
Add new target: DISCO_STM32H573I (STM32H573I-DK) #491
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
acc6f7e
add QSPI support (with DMA) for STM32H5
wdx04 e921aaf
add basic files for STM32H573I-DISCO(STM32H573I-DK)
wdx04 2c10c8e
add USB support for STM32H563/STM32H573
wdx04 fa647b2
add STMOD and PMOD pins
wdx04 b826f0b
verified OSPI Flash can work without DMA
wdx04 6644237
added DMA support for OCTOSPI
wdx04 e1e2419
add ethernet files
wdx04 64d965b
fix crash during FlashIAP by temporarily increase Flash latency
wdx04 3c40a21
do not use XSPI on STM32U5
wdx04 d8516fd
add a upload method config file
wdx04 20ca5c5
update linker script
wdx04 14b0344
fix issues found in the review
wdx04 b89e23e
unified the linker script for STM32H563x and STM32H57x
wdx04 e7b3a9b
add reference to errata sheet
wdx04 3eee003
fix some comments in ospi_api.c and qspi_api.c
wdx04 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
connectivity/drivers/emac/TARGET_STM/TARGET_STM32H5/TARGET_DISCO_H573I/CMakeLists.txt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Copyright (c) 2025 Jamie Smith | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
target_sources(mbed-emac | ||
PRIVATE | ||
stm32h5_eth_init.c | ||
) |
117 changes: 117 additions & 0 deletions
117
connectivity/drivers/emac/TARGET_STM/TARGET_STM32H5/TARGET_DISCO_H573I/stm32h5_eth_init.c
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,117 @@ | ||
/* mbed Microcontroller Library | ||
* Copyright (c) 2025, STMicroelectronics | ||
* All rights reserved. | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
* | ||
* Redistribution and use in source and binary forms, with or without | ||
* modification, are permitted provided that the following conditions are met: | ||
* | ||
* 1. Redistributions of source code must retain the above copyright notice, | ||
* this list of conditions and the following disclaimer. | ||
* 2. Redistributions in binary form must reproduce the above copyright notice, | ||
* this list of conditions and the following disclaimer in the documentation | ||
* and/or other materials provided with the distribution. | ||
* 3. Neither the name of STMicroelectronics nor the names of its contributors | ||
* may be used to endorse or promote products derived from this software | ||
* without specific prior written permission. | ||
* | ||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE | ||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | ||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER | ||
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, | ||
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | ||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
*/ | ||
|
||
#include "stm32h5xx_hal.h" | ||
#include "platform/mbed_critical.h" | ||
#include "PinNames.h" | ||
|
||
/** | ||
* Override HAL Eth Init function. | ||
* | ||
* Note: This was copied from HAL_ETH_MspInit() in a project for the DISCO-H573I in STM32CubeIDE | ||
*/ | ||
void EthInitPinmappings(void) | ||
{ | ||
GPIO_InitTypeDef GPIO_InitStruct = {0}; | ||
|
||
/* Peripheral clock enable */ | ||
__HAL_RCC_ETH_CLK_ENABLE(); | ||
__HAL_RCC_ETHTX_CLK_ENABLE(); | ||
__HAL_RCC_ETHRX_CLK_ENABLE(); | ||
|
||
__HAL_RCC_GPIOC_CLK_ENABLE(); | ||
__HAL_RCC_GPIOA_CLK_ENABLE(); | ||
__HAL_RCC_GPIOG_CLK_ENABLE(); | ||
/**ETH GPIO Configuration | ||
PC1 ------> ETH_MDC | ||
PA1 ------> ETH_REF_CLK | ||
PA2 ------> ETH_MDIO | ||
PA7 ------> ETH_CRS_DV | ||
PC4 ------> ETH_RXD0 | ||
PC5 ------> ETH_RXD1 | ||
PG12 ------> ETH_TXD1 | ||
PG11 ------> ETH_TX_EN | ||
PG13 ------> ETH_TXD0 | ||
*/ | ||
GPIO_InitStruct.Pin = GPIO_PIN_1|GPIO_PIN_4|GPIO_PIN_5; | ||
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; | ||
GPIO_InitStruct.Pull = GPIO_NOPULL; | ||
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH; | ||
GPIO_InitStruct.Alternate = GPIO_AF11_ETH; | ||
HAL_GPIO_Init(GPIOC, &GPIO_InitStruct); | ||
|
||
GPIO_InitStruct.Pin = GPIO_PIN_1|GPIO_PIN_2|GPIO_PIN_7; | ||
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; | ||
GPIO_InitStruct.Pull = GPIO_NOPULL; | ||
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH; | ||
GPIO_InitStruct.Alternate = GPIO_AF11_ETH; | ||
HAL_GPIO_Init(GPIOA, &GPIO_InitStruct); | ||
|
||
GPIO_InitStruct.Pin = GPIO_PIN_11|GPIO_PIN_12|GPIO_PIN_13; | ||
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; | ||
GPIO_InitStruct.Pull = GPIO_NOPULL; | ||
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH; | ||
GPIO_InitStruct.Alternate = GPIO_AF11_ETH; | ||
HAL_GPIO_Init(GPIOG, &GPIO_InitStruct); | ||
} | ||
|
||
/** | ||
* Override HAL Eth DeInit function | ||
*/ | ||
void EthDeinitPinmappings() | ||
{ | ||
/* Peripheral clock disable */ | ||
__HAL_RCC_ETH_CLK_DISABLE(); | ||
__HAL_RCC_ETHTX_CLK_DISABLE(); | ||
__HAL_RCC_ETHRX_CLK_DISABLE(); | ||
|
||
/**ETH GPIO Configuration | ||
PC1 ------> ETH_MDC | ||
PA1 ------> ETH_REF_CLK | ||
PA2 ------> ETH_MDIO | ||
PA7 ------> ETH_CRS_DV | ||
PC4 ------> ETH_RXD0 | ||
PC5 ------> ETH_RXD1 | ||
PB15 ------> ETH_TXD1 | ||
PG11 ------> ETH_TX_EN | ||
PG13 ------> ETH_TXD0 | ||
*/ | ||
HAL_GPIO_DeInit(GPIOC, GPIO_PIN_1|GPIO_PIN_4|GPIO_PIN_5); | ||
|
||
HAL_GPIO_DeInit(GPIOA, GPIO_PIN_1|GPIO_PIN_2|GPIO_PIN_7); | ||
|
||
HAL_GPIO_DeInit(GPIOG, GPIO_PIN_11|GPIO_PIN_12|GPIO_PIN_13); | ||
} | ||
|
||
// Get Ethernet PHY reset pin | ||
PinName EthGetPhyResetPin(void) | ||
{ | ||
return NC; // Not connected on this board | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.