Skip to content

STM32H7 update drivers version to CUBE V1.8.0 #13690

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 5 commits into from
Oct 20, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion targets/TARGET_STM/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ This table summarizes the STM32Cube versions currently used in Mbed OS master br
| F7 | 1.16.0 | https://github.com/STMicroelectronics/STM32CubeF7 |
| G0 | 1.3.0 | https://github.com/STMicroelectronics/STM32CubeG0 |
| G4 | 1.1.0 | https://github.com/STMicroelectronics/STM32CubeG4 |
| H7 | 1.7.0 | https://github.com/STMicroelectronics/STM32CubeH7 |
| H7 | 1.8.0 | https://github.com/STMicroelectronics/STM32CubeH7 |
| L0 | 1.11.3 | https://github.com/STMicroelectronics/STM32CubeL0 |
| L1 | 1.8.1 | https://github.com/STMicroelectronics/STM32CubeL1 |
| L4 | 1.14.0 | https://github.com/STMicroelectronics/STM32CubeL4 |
Expand Down
59 changes: 34 additions & 25 deletions targets/TARGET_STM/TARGET_STM32H7/PeripheralNames.h
Original file line number Diff line number Diff line change
@@ -1,32 +1,18 @@
/* mbed Microcontroller Library
*******************************************************************************
* Copyright (c) 2016, STMicroelectronics
* All rights reserved.
* SPDX-License-Identifier: BSD-3-Clause
******************************************************************************
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* Copyright (c) 2015-2020 STMicroelectronics.
* All rights reserved.
*
* 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 component is licensed by ST under BSD 3-Clause license,
* the "License"; You may not use this file except in compliance with the
* License. You may obtain a copy of the License at:
* opensource.org/licenses/BSD-3-Clause
*
* 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.
*******************************************************************************
******************************************************************************
*/

#ifndef MBED_PERIPHERALNAMES_H
#define MBED_PERIPHERALNAMES_H

Expand All @@ -39,11 +25,16 @@ extern "C" {
typedef enum {
ADC_1 = (int)ADC1_BASE,
ADC_2 = (int)ADC2_BASE,
#if ADC3_BASE
ADC_3 = (int)ADC3_BASE
#endif
} ADCName;

typedef enum {
DAC_1 = DAC1_BASE
DAC_1 = DAC1_BASE,
#if DAC2_BASE
DAC_2 = DAC2_BASE,
#endif
} DACName;

typedef enum {
Expand All @@ -55,6 +46,12 @@ typedef enum {
UART_6 = (int)USART6_BASE,
UART_7 = (int)UART7_BASE,
UART_8 = (int)UART8_BASE,
#if UART9_BASE
UART_9 = (int)UART9_BASE,
#endif
#if USART10_BASE
UART_10 = (int)USART10_BASE,
#endif
LPUART_1 = (int)LPUART1_BASE
} UARTName;

Expand All @@ -76,7 +73,9 @@ typedef enum {
} I2CName;

typedef enum {
#if HRTIM1_BASE
PWM_I = (int)HRTIM1_BASE,
#endif
PWM_1 = (int)TIM1_BASE,
PWM_2 = (int)TIM2_BASE,
PWM_3 = (int)TIM3_BASE,
Expand All @@ -97,11 +96,21 @@ typedef enum {
} CANName;

typedef enum {
#if QSPI_R_BASE
QSPI_1 = (int)QSPI_R_BASE,
#endif
#if OCTOSPI1_R_BASE
QSPI_1 = (int)OCTOSPI1_R_BASE,
#endif
#if OCTOSPI2_R_BASE
QSPI_2 = (int)OCTOSPI2_R_BASE,
#endif
} QSPIName;

typedef enum {
#if USB_OTG_FS_PERIPH_BASE
USB_FS = (int)USB_OTG_FS_PERIPH_BASE,
#endif
USB_HS = (int)USB_OTG_HS_PERIPH_BASE
} USBName;

Expand Down
103 changes: 88 additions & 15 deletions targets/TARGET_STM/TARGET_STM32H7/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,20 @@

[GitHub STM32CubeH7 FW](https://github.com/STMicroelectronics/STM32CubeH7)

# Single core STM32

# NUCLEO_H743ZI / NUCLEO_H743ZI2

Note that NUCLEO_H743ZI is deprecated. Please update your board to NUCLEO_H743ZI2:
- new MCU chip revision
- new ST Link version
## STM32H743xx

STM32H743ZI devices are based on the high-performance Arm Cortex-M7 32-bit RISC core operating at up to 480 MHz.

[st.com STM32H743ZI MCU page](https://www.st.com/en/microcontrollers-microprocessors/stm32h743zi.html)

### NUCLEO_H743ZI2

[st.com NUCLEO page](https://www.st.com/en/evaluation-tools/nucleo-h743zi.html)

[mbed.com Target page](https://os.mbed.com/platforms/ST-Nucleo-H743ZI2/)


- Total FLASH is 2 MB (0x200000)
- 2x8 sectors of 128 KB
- Flash memory bank 1 @ 0x0800 0000
Expand All @@ -33,10 +31,53 @@ STM32H743ZI devices are based on the high-performance Arm Cortex-M7 32-bit RISC
- SRAM3 : 32 KB (0x8000) @0x3004 0000
- SRAM4 : 64 KB (0x10000) @0x3800 0000

### NUCLEO_H743ZI

Note that NUCLEO_H743ZI is deprecated. Please update your board to NUCLEO_H743ZI2:
- new MCU chip revision
- new ST Link version

**How to use NUCLEO_H743ZI with mbed-os-6:**

PeripheralPins.c and PinNames.h are available in mbed-os repo,
so you just have to create a custom_targets.json file with:

# DISCO_H747I
```
{
"NUCLEO_H743ZI": {
"inherits": [
"MCU_STM32H743xI"
],
"config": {
"d11_configuration": {
"help": "Value: PB_5 for the default board configuration, PA_7 in case of solder bridge update (SB33 on/ SB35 off)",
"value": "PB_5",
"macro_name": "STM32_D11_SPI_ETHERNET_PIN"
},
"hse_value": {
"value": "8000000",
"macro_name": "HSE_VALUE"
}
},
"device_has_add": [
"EMAC"
],
"overrides": {
"network-default-interface-type": "ETHERNET"
},
"supported_form_factors": [
"ARDUINO"
],
"device_name": "STM32H743ZI"
}
}
```

## Overview
# Dual core STM32

## STM32H747xx

### DISCO_H747I

The STM32H7x7 lines combine the performance of the Cortex-M7 (with double-precision floating point unit) running up to 480 MHz and the Cortex-M4 core (with single-precision floating point unit).

Expand All @@ -58,6 +99,45 @@ The STM32H7x7 lines combine the performance of the Cortex-M7 (with double-precis
- SRAM3 : 32 KB (0x8000) @0x3004 0000 - shared
- SRAM4 : 64 KB (0x10000) @0x3800 0000 - shared


**WARNING**: Ethernet connector is not enabled by default on this board

More information in the wiki page : [Ethernet HW Patch](https://os.mbed.com/teams/ST/wiki/DISCO_H747I-modifications-for-Ethernet)


## STM32H745xx


[st.com STM32H745 MCU page](https://www.st.com/en/microcontrollers-microprocessors/stm32h745-755.html)

**How to create a custom board with STM32H745xI MCU:**

After creating your local PeripheralPins.c and PinNames.h files in TARGET_BOARD_H745xI directory,

create a custom_targets.json file with:

```
{
"BOARD_H745xI_CM4": {
"inherits": [
"MCU_STM32H745xI_CM4"
],
"extra_labels_add": [
"BOARD_H745xI"
]
},
"BOARD_H745xI_CM7": {
"inherits": [
"MCU_STM32H745xI_CM7"
],
"extra_labels_add": [
"BOARD_H745xI"
]
}
}
```


## Dual mode configuration

Configuration can be checked/changed with STM32CubeProgrammer software in the Option bytes (OB) panel.
Expand Down Expand Up @@ -151,10 +231,3 @@ export PATH=$FLASHPATH:$PATH
STM32_Programmer_CLI -c port=SWD mode=UR -w BUILD/DISCO_H747I_CM4/ARM/mbed-os.bin 0x8100000
```

## Ethernet limitation

**WARNING**: Ethernet connector is not enabled by default

More information in the wiki page : [Ethernet HW Patch](https://os.mbed.com/teams/ST/wiki/DISCO_H747I-modifications-for-Ethernet)


Loading