-
Notifications
You must be signed in to change notification settings - Fork 6.9k
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
arch/arm/stm32: Basic STM32F7 family support #7220
Conversation
Related to issue #6981
Codecov Report
@@ Coverage Diff @@
## master #7220 +/- ##
=========================================
- Coverage 55.03% 55% -0.03%
=========================================
Files 477 474 -3
Lines 51744 51718 -26
Branches 9949 9935 -14
=========================================
- Hits 28475 28447 -28
- Misses 19306 19308 +2
Partials 3963 3963
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @pic16f887 ,
Thanks for this work.
Some initial comments on the pull request:
- focus your work on uart, gpio, exti and clock-control drivers which are required for basic testing (hello_world and blinky). Clean up everything is relates to USB, I2C, SPI, .... It will ease to focus and fasten the review process.
*Split your work into coherent commit (arch, dts, drivers/clock_control, drivers/uart, ...) - Last: please port a F7 board (in a dedicated commit) so the code could at least be compiled
Also, you should add your Signed-Off in the commit message
Thanks again!
config SOC_SERIES | ||
default stm32f7 | ||
|
||
if USB |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove USB as it is not yet tested/implemented on this series (limited to F4 for now)
|
||
endif #USB | ||
|
||
if I2C && (I2C_1 || I2C_2 || I2C_3 || I2C_4) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove I2C, not yet tested/supported on F7 series
|
||
endif # GPIO_STM32 | ||
|
||
if ENTROPY_GENERATOR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove for now. You could add it in a follow up PR.
#define CONFIG_UART_STM32_PORT_6_IRQ_PRI ST_STM32_USART_40011400_IRQ_0_PRIORITY | ||
#define PORT_6_IRQ ST_STM32_USART_40011400_IRQ_0 | ||
|
||
#define CONFIG_I2C_1_BASE_ADDRESS ST_STM32_I2C_V1_40005400_BASE_ADDRESS |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove I2C, SPI, USB and flash
@@ -0,0 +1,43 @@ | |||
/* | |||
* Copyright (c) 2018 Yurii Hamann | |||
* Copyright (c) 2016 Linaro Limited. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Keep only your copyright, apply on all files
arch/arm/soc/st_stm32/stm32f7/soc.h
Outdated
#include <stm32f7xx_ll_rng.h> | ||
#endif | ||
|
||
#ifdef CONFIG_IWDG_STM32 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove
arch/arm/soc/st_stm32/stm32f7/soc.c
Outdated
* | ||
* @return 0 | ||
*/ | ||
static int st_STM32F7_init(struct device *arg) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
keep lower case
* @file Header for STM32F7 pin multiplexing helper | ||
*/ | ||
|
||
/* Port A */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clean everything which is not UART
drivers/serial/uart_stm32.c
Outdated
@@ -295,7 +295,7 @@ static int uart_stm32_init(struct device *dev) | |||
|
|||
LL_USART_Enable(UartInstance); | |||
|
|||
#if !defined(CONFIG_SOC_SERIES_STM32F4X) && !defined(CONFIG_SOC_SERIES_STM32F1X) | |||
#if !defined(CONFIG_SOC_SERIES_STM32F4X) && !defined(CONFIG_SOC_SERIES_STM32F7X) && !defined(CONFIG_SOC_SERIES_STM32F1X) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Take care to the 80 char limit
dts/arm/st/stm32f7.dtsi
Outdated
label= "I2C_1"; | ||
}; | ||
|
||
i2c2: i2c@40005800 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clean up i2c spi and USB
|
||
config SOC_SERIES_STM32F7X | ||
bool "STM32F7x Series MCU" | ||
select CPU_CORTEX_M |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should remove this. CPU_CORTEX_M is selected when you select CPU_CORTEX_M7.
Signed-off-by: Yurii Hamann <yurii@hamann.site>
Signed-off-by: Yurii Hamann <yurii@hamann.site>
Signed-off-by: Yurii Hamann <yurii@hamann.site>
Signed-off-by: Yurii Hamann <yurii@hamann.site>
Signed-off-by: Yurii Hamann <yurii@hamann.site>
Signed-off-by: Yurii Hamann <yurii@hamann.site>
Hello @erwango , |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the documentation. A few fixes...
Overview | ||
******** | ||
|
||
The discovery kit enables a wide diversity of applications taking benefit from audio, multi-sensor support, graphics, security, video and high-speed connectivity features. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Preference is for lines to be <80 characters
Change the ending to read:
... security, video, and high-speed connectivity features. Important board features include:
System Clock | ||
============ | ||
|
||
STM32F746G System Clock could be driven by internal or external oscillator, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lots of missing articles (the, a, an):
The STM32F746G System Clock can be driven by an internal or external oscillator,
as well as by the main PLL clock. By default, the System clock is driven by the PLL
clock at 216MHz, driven by a 25MHz high speed external clock.
Serial Port | ||
=========== | ||
|
||
The STM32F746G Discovery kit has up to 8 UARTs. The Zephyr console output is assigned to UART1. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suspect the kit has a fixed number of UARTs, so it's better to say:
The STM32F746G Discovery kit has 8 UARTs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dbkinder,
I am not sure that all 8 UARTs are available. Many ports are occupied by LCD display with touchscreen and other peripherals.
=========== | ||
|
||
The STM32F746G Discovery kit has up to 8 UARTs. The Zephyr console output is assigned to UART1. | ||
Default settings are 115200 8N1. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Default communication settings...
======== | ||
|
||
STM32F746G Discovery kit includes an ST-LINK/V2 embedded debug tool interface. | ||
This interface is supported by the openocd version included in Zephyr SDK. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in the Zephyr
This reverts commit b249ec0.
* @file SoC configuration macros for the ST STM32F7 family processors. | ||
* | ||
* Based on reference manual: | ||
* RM0368 Reference manual STM32F401xB/C and STM32F401xD/E |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add STM32F7 reference manuals.
#include <arm/armv7-m.dtsi> | ||
#include <st/mem.h> | ||
#include <dt-bindings/clock/stm32_clock.h> | ||
#include <dt-bindings/i2c/i2c.h> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could remove this.
}; | ||
|
||
soc { | ||
flash-controller@40023c00 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we support flash controller for stm32f7 family? I couldn't find it in the flash drivers. If not, please remove this node.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should cleanup your PR. Please drop the commits that you revert and fix your commits body to make shippable happy.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
documentation seems to be missing now? And there are problems with the commit messages reported by shippable: (https://app.shippable.com/github/zephyrproject-rtos/zephyr/runs/14066/5/tests)
The patch contains basic code support, documentation, dts file and openocd configuration for STM32F746G discovery board Patch related to issue #6982 Signed-off-by: Yurii Hamann <yurii@hamann.site>
Includes support for STM32F746xG subfamily Related to the issue #6981 Signed-off-by: Yurii Hamann <yurii@hamann.site>
Signed-off-by: Yurii Hamann <yurii@hamann.site>
Signed-off-by: Yurii Hamann <yurii@hamann.site>
Signed-off-by: Yurii Hamann <yurii@hamann.site>
Signed-off-by: Yurii Hamann <yurii@hamann.site>
Signed-off-by: Yurii Hamann <yurii@hamann.site>
Signed-off-by: Yurii Hamann <yurii@hamann.site>
The patch contains basic code support, documentation, dts file and openocd configuration for STM32F746G discovery board Patch related to issue #6982 Signed-off-by: Yurii Hamann <yurii@hamann.site>
Related to issue #6981.
Added support for STM32F746XG subfamily.
Signed-off-by: Yurii Hamann yurii@hamann.site