Commit Graph

84 Commits

Author SHA1 Message Date
Aurelien Jarno b66ecc5765 ext: hal: stm32cube: fix stm32l4xx VDDUSB supply control
The STM32L4x2 SoCs need to control the isolation of the USB features
from VDDUSB. This is done through the PWR_CR2 bit USV. The STM32L4 HAL
in stm32l4xx_ll_pwr.h wrongly checks for the PWR_CR2_PVME1 bit, which
is only available on Cat. 3 devices. Replace the check by PWR_CR2_USV
like it is already done in stm32l4xx_hal_pwr_ex.c.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2018-05-24 09:42:30 -05:00
Ilya Tagunov 849c8a4ea1 ext: hal: stm32l0xx: spi: remove offending cast
stm32l0xx_ll_spi.h causes compile warnings about aliasing.
Solution for F0 works here as well.
Tested on STM32L073RZ with 16-bit transfers.

Signed-off-by: Ilya Tagunov <tagunil@gmail.com>
2018-03-15 10:53:26 -05:00
Yannis Damigos bb3e5d71a8 ext/hal/stm32l0xx: Remove stm32l0xx_ll_usb from CMakeLists
STM32Cube doesn't provide a USB LL API for STM32L0XX series.
This patch removes stm32l0xx_ll_usb.c from CMakeLists because
it doesn't exist.

Signed-off-by: Yannis Damigos <giannis.damigos@gmail.com>
2018-03-14 08:52:10 -05:00
Endre Karlson 3c789e6ae7 hal: stm32l0x: Add HAL for the STM32L0x series
This adds the HAL code needed for the SoC in a later patch for
the stm32l0 series.

Origin: ST Microelectronics
License: BSD-3-Clause
URL: http://www.st.com/en/embedded-software/stm32cubel0.html
Commit: 1.10.0
Purpose: HAL layer for stm32l0
Maintained-by: External

Signed-off-by: Endre Karlson <endre.karlson@gmail.com>
2018-03-10 11:42:25 -06:00
Erwan Gouriou 053df3bd30 ext/hal: stm32cube: Update STM32L4 README file
To comply with Zephyr Contributing guidelines regarding
ext/ components, update README for STM32L4 series

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2018-03-08 08:47:15 -06:00
Erwan Gouriou e3679dbf60 ext/hal: stm32cube: Update STM32F7 README file
To comply with Zephyr Contributing guidelines regarding
ext/ components, update README for STM32F7 series

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2018-03-08 08:47:15 -06:00
Erwan Gouriou 138346901e ext/hal: stm32cube: Update STM32F4 README file
To comply with Zephyr Contributing guidelines regarding
ext/ components, update README for STM32F4 series

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2018-03-08 08:47:15 -06:00
Erwan Gouriou 1fe67bd205 ext/hal: stm32cube: Update STM32F3 README file
To comply with Zephyr Contributing guidelines regarding
ext/ components, update README for STM32F3 series

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2018-03-08 08:47:15 -06:00
Erwan Gouriou 0377143f54 ext/hal: stm32cube: Update STM32F1 README file
To comply with Zephyr Contributing guidelines regarding
ext/ components, update README for STM32F1 series

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2018-03-08 08:47:15 -06:00
Erwan Gouriou 9e3bbfd285 ext/hal: stm32cube: Update STM32F0 README file
To comply with Zephyr Contributing guidelines regarding
ext/ components, update README for STM32F0 series

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2018-03-08 08:47:15 -06:00
Sebastian Bøe 7d5755865c stm32cube: cmake: Pure refactoring of build script
Reduce the code duplication in ext/hal/st/stm32cube/CMakeLists.txt by
using a foreach loop instead of copy-paste for each SoC.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2018-03-03 09:01:10 +01:00
Erwin Rol 2e0c11d604 ext: hal: stm32cube: update README
Update the README file to reflect the new Kconfig structure.

Signed-off-by: Erwin Rol <erwin@erwinrol.com>
2018-01-23 08:46:16 -06:00
Erwin Rol 772ac20336 ext: hal: stm32cube: allow HAL/LL files to be selected via Kconfig
By providing USE_STM32_HAL_* and USE_STM32_LL_* menuconfig
options drivers and user aplications can select parts of the HAL
without needing to change the Zephyr source code.

Signed-off-by: Erwin Rol <erwin@erwinrol.com>
2018-01-23 08:46:16 -06:00
Erwan Gouriou 28c2079c63 ext: stm32cube: update stm32l4xx cube version
Update Cube version for STM32L4XX family
from version: V1.9.0
to version: V1.10.0

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2018-01-17 09:55:30 -06:00
Erwan Gouriou 366c31c03b ext: stm32cube: update stm32f4xx cube version
Update Cube version for STM32F4XX family
from version: V1.16.0
to version: V1.18.0

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2018-01-17 09:55:30 -06:00
Erwan Gouriou a6d9fef241 stm32cube: f3: fix wrong package version
Fix stm32f3xx README with actual package version : V1.9.0


Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2018-01-17 09:55:30 -06:00
Neil Armstrong 5f5480ac7d hal: stm32cube: Fix warning when SPI STM32F0 LL API is compiled
Current implementation of LL_SPI_TransmitData16 on F0 family
generates following warning:
"warning: dereferencing type-punned pointer will break strict-aliasing
rules [-Wstrict-aliasing]"
Besides being forbidden by rule, this cast is not needed, as register is
16 bits wide. Modification has been tested on F0 SoC.
stm32yyxx_ll_spi.h being included in soc.h file, warning is generated
at each compiled object, this commit allows a clean build.
This issue is referenced in ST and tracked under
reference  13359. Code will be updated on upcoming stm32cube updates.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2018-01-11 19:00:19 -05:00
Neil Armstrong b5938c43fb ext: hal: stm32cube: build LL SPI code for STM32F0
Build the STM32Cube LL SPI Code for STM32F0

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2018-01-11 19:00:19 -05:00
Neil Armstrong cc9642402d ext: stm32cube: build I2C+RCC LL for STM32F0
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2017-12-12 12:36:08 -06:00
Johann Fischer a14dd6309e cmake: fix build of the entropy drivers
Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2017-11-11 19:01:42 -05:00
Sebastian Bøe fc978328b5 cmake: ext/hal/st/stm32cube: Fixed formatting and removed hal_uart
Signed-off-by: Sebastian Boe <sebastian.boe@nordicsemi.no>
2017-11-08 20:00:22 -05:00
Sebastian Bøe 0829ddfe9a kbuild: Removed KBuild
Signed-off-by: Sebastian Boe <sebastian.boe@nordicsemi.no>
2017-11-08 20:00:22 -05:00
Sebastian Bøe 12f8f76165 Introduce cmake-based rewrite of KBuild
Introducing CMake is an important step in a larger effort to make
Zephyr easy to use for application developers working on different
platforms with different development environment needs.

Simplified, this change retains Kconfig as-is, and replaces all
Makefiles with CMakeLists.txt. The DSL-like Make language that KBuild
offers is replaced by a set of CMake extentions. These extentions have
either provided simple one-to-one translations of KBuild features or
introduced new concepts that replace KBuild concepts.

This is a breaking change for existing test infrastructure and build
scripts that are maintained out-of-tree. But for FW itself, no porting
should be necessary.

For users that just want to continue their work with minimal
disruption the following should suffice:

Install CMake 3.8.2+

Port any out-of-tree Makefiles to CMake.

Learn the absolute minimum about the new command line interface:

$ cd samples/hello_world
$ mkdir build && cd build
$ cmake -DBOARD=nrf52_pca10040 ..

$ cd build
$ make

PR: zephyrproject-rtos#4692
docs: http://docs.zephyrproject.org/getting_started/getting_started.html

Signed-off-by: Sebastian Boe <sebastian.boe@nordicsemi.no>
2017-11-08 20:00:22 -05:00
Bobby Noelte 3849b36f09 arch: arm: soc: provide support for stm32f091
Support the ST STM32F091xC SoC.

Signed-off-by: Bobby Noelte <b0661n0e17e@gmail.com>
2017-11-06 11:39:16 -06:00
Leandro Pereira da9b0ddf5b drivers: Rename `random` to `entropy`
This should clear up some of the confusion with random number
generators and drivers that obtain entropy from the hardware.  Also,
many hardware number generators have limited bandwidth, so it's natural
for their output to be only used for seeding a random number generator.

Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
2017-11-01 08:26:29 -04:00
Maciej Debski cfe28f579e ext: hal: stm32cube: provide build method for stm32f0 HAL/LL lib.
Fixes #3923

Signed-off-by: Maciej Debski <maciej.debski@rndity.com>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2017-10-23 12:31:47 +02:00
Maciej Debski 3f0da4ba16 ext: hal: stm32cube: HAL/LL static library for stm32f0xx v.1.9.
The commit delivers HAL/LL static library source files for STM32F0 SoC.
Using STM32Cube provides generic access to all families, maximizes
code reuse across different STM32 families and helps taking benefits
of a mature SDK.

Origin: STM32Cube
URL: http://www.st.com/en/embedded-software/stm32cubef0.html
Purpose: Introduction of STM32F0xx STM32Cube definitions
and Abstraction Layers
Maintained-by: External

Original STM32Cube tree structure has been modified to a minimum
structure for a better fit into Zephyr. HAL is split into 2 parts:
-driver: initially Drivers/STM32F0xx_HAL_Driver, contains HAL and LL
-soc: initially Drivers/CMSIS/Device/ST/STM32F0xx, contains stm32f0xx
SoCs header files.

Fixes #3923

Signed-off-by: Maciej Debski <maciej.debski@rndity.com>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2017-10-23 12:31:47 +02:00
Erwan Gouriou de770f56b4 stm32cube: clean kbuild after removing usage of HAL in serial driver
Since STM32 serial driver is no more using HAL, update kbuild for all
STM32 series.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2017-10-20 12:28:11 -05:00
Yannis Damigos a172f72d84 boards: stm32f3_disco: Add I2C support
Add I2C support to STM32F3DISCOVERY board

Signed-off-by: Yannis Damigos <giannis.damigos@gmail.com>
2017-10-20 12:28:11 -05:00
Yannis Damigos b248b85c76 ext: stm32cube: Define USE_FULL_LL_DRIVER
This patch enables the LL API get funtions for system and
peripherals clocks frequency.

Signed-off-by: Yannis Damigos <giannis.damigos@gmail.com>
2017-10-20 12:28:11 -05:00
Yannis Damigos 213df22c99 ext: hal: stm32cube: Fix LSI_VALUE for F1, F3 families
This patch sets the correct LSI_VALUE, according to
STM32F3 reference manual's (RM0316) section 9.2.5 and
STM32F1 reference manual's (RM0008) section 7.2.5.

Signed-off-by: Yannis Damigos <giannis.damigos@gmail.com>
2017-10-20 12:28:11 -05:00
Loic Poulain 8a11f91252 usb: Add support for STM32 family USB driver
This is a USB controller driver for STM32F4xx devices using
the STM32 Cube HAL_PCD framework. This has been tested with
the cdc_acm driver on a 96b_carbon board (STM32F401RE).

This is a refactoring of:
usb: usb_dc_stm: Add support for STM32Cube HAL_PCD USB driver
Signed-off-by: Christer Weinigel <christer@weinigel.se>
[daniel.thompson@linaro.org: Removed STM32F40(157) defconfig changes
together with STM32F4Discovery pinmux and defconfig changes, updated
clock settings and pad configuration to match latest mainline]
Signed-off-by: Daniel Thompson <daniel.thompson@linaro.org>
[giannis.damigos@gmail.com: Change uint*_t types to u*_t types,
change SYS_LOG_USB_DC_STM_LEVEL to SYS_LOG_USB_DRIVER_LEVEL and
update pinmux to match latest arm branch]
Signed-off-by: Yannis Damigos <giannis.damigos@gmail.com>

Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
2017-10-17 09:14:47 -04:00
Erwan Gouriou 3a0dbda3bc stm32cube: Add impacted files in README Patch List
To further ease stm32cube packages update, add impacted lines
section in Patch List section.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2017-09-25 12:31:59 -05:00
Erwan Gouriou bd5942aa5a ext: stm32cube: update stm32l4xx cube version
Update Cube version for STM32L4XX family
from version: V1.8.0
to version: V1.9.0

Note: git shows 100% diff on all files.
You need to tick "Ignore space change" in git UI to see real
differences. I tried different things to fix this without
success (dos2unix, file encoding, files access right).

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2017-09-25 12:31:59 -05:00
Erwan Gouriou 9bf5aededd ext: stm32cube: update stm32f7xx cube version
Update Cube version for STM32F7XX family
from version: V1.6.0
to version: V1.8.0

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2017-09-25 12:31:59 -05:00
Erwan Gouriou faa0aee21a ext: stm32cube: update stm32f4xx cube version
Update Cube version for STM32F4XX family
from version: V1.15.0
to version: V1.16.0

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2017-09-25 12:31:59 -05:00
Erwan Gouriou 653d0242ca ext: stm32cube: update stm32f3xx cube version
Update Cube version for STM32F3XX family
from version: V1.7.0
to version: V1.9.0

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2017-09-25 12:31:59 -05:00
Erwan Gouriou 24a5f1012e ext: stm32cube: update stm32f1xx cube version
Update Cube version for STM32F1XX family
from version: V1.5.0
to version: V1.6.0

Update Patch list, since this version corrects bug 33517

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2017-09-25 12:31:59 -05:00
Erwan Gouriou 71ea34522b ext: hal: stm32cube: Update README with former fixups
Commit "ext: hal: stm32f1x and stm32f4x: disable i2c HAL"
and "stm32cube: Fix warning when SPI LL API is compiled"
modified stm32cube HAL but this was not documented in
series README file, which makes it hazardous to update
stm32cube packages.
This commit corrects this oversight.
Additionally STM32Cube README file to provide this information
and how to use it

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2017-09-25 12:31:59 -05:00
Erwin Rol 6e3782480e driver: eth_stm32_hal: Initial STM32 HAL based Ethernet driver
Signed-off-by: Erwin Rol <erwin@erwinrol.com>
2017-07-12 12:53:51 +03:00
Erwin Rol 2fc9dc61d4 drivers: stm32: random: Initial STM32 random number generator driver
Add a STM32 LL based driver for the RNG processor. The RNG processor
is a random number generator, based on a continuous analog noise, that
provides a random 32-bit value to the host when read. The RNG passed
the FIPS PUB 140-2 (2001 October 10) tests with a success ratio of 99%.

Signed-off-by: Erwin Rol <erwin@erwinrol.com>
2017-07-07 07:27:39 -05:00
Jorge Ramirez-Ortiz ae4363817b stm32cube: build stm32xxx_ll_spi if CONFIG_SPI
Signed-off-by: Jorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2017-07-01 08:36:51 -04:00
Erwan Gouriou 0329450088 stm32cube: Fix warning when SPI LL API is compiled
Current implementation of LL_SPI_TransmitData16 on F3/F7/L4 family
generates following warning:
"warning: dereferencing type-punned pointer will break strict-aliasing
rules [-Wstrict-aliasing]"
Besides being forbidden by rule, this cast is not needed, as register is
16 bits wide. Modification has been tested on L4 SoC.
stm32yyxx_ll_spi.h being included in soc.h file, warning is generated
at each compiled object, this commit allows a clean build.
This issue is referenced in ST and tracked under
reference  13359. Code will be updated on upcoming stm32cube updates.

Change-Id: I3ca54a81d849d4852eca86b52b6825b60e18b752
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2017-07-01 08:36:51 -04:00
Yannis Damigos 220ddb9738 soc: stm32: F1/F3/F4/L4: enable I2C LL
Signed-off-by: Yannis Damigos <giannis.damigos@gmail.com>
Signed-off-by: Jorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org>
2017-07-01 08:36:51 -04:00
Jorge Ramirez-Ortiz 9f420955d9 ext: hal: stm32f1x and stm32f4x: disable i2c HAL
Enabling the HAL and the LL flags duplicate definitions when
compiling in driver.

Since the i2c HAL is not needed, disable it.
This is a HAL issue that needs to be addressed (not zephyr)

Signed-off-by: Jorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org>
2017-07-01 08:36:51 -04:00
Erwan Gouriou e1a90583d4 drivers: clock_control: provide LL based driver to stm32f1xx series
Align stm32f1xx series clock driver to other parts of stm32 family.
Driver support both Connectivity and Density lines of stm32f1 series,
that are based on different Reset and Clock Control architectures.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2017-06-02 14:11:13 -04:00
Neil Armstrong ab1a7aff29 ext: stm32cube: update stm32l4xx cube version
Update Cube version for STM32L4XX family
from version: V1.6.0
to version: V1.8.0

Add support for following soc:
stm32l496xx
stm32l4a6xx

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2017-05-19 10:06:48 -04:00
Erwan Gouriou fda01e52c2 drivers: clock control: Provide LL based clock control for stm32f4 series
This commit enables STM32Cube LL based driver for stm32f4 series.
This generic driver provides a unified API to clock driver for all
stm32 series.
LL API allows driver to be lightweight and to keep genericity across
stm32 family to ease further devlopment and maintenance.

Change-Id: Ie31ae8f433313787f9c9eda77de41925721d54dd
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2017-04-28 15:06:41 -05:00
Erwan Gouriou af6ca469e8 ext: stm32cube: update stm32f1xx cube version
Update Cube version for STM32F1XX family
from version: V1.14.0
to version: V1.15.0

Add support for Low Level API on stm32f1 family

Change-Id: I8cb5fe2fd94be3a320e863c7b5ed59e4c2312e87
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2017-04-28 15:06:40 -05:00
Erwan Gouriou 7fb27de7cc ext: stm32cube: update stm32f3xx cube version
Update Cube version for STM32F3XX family
from version: V1.6.0
to version: V1.7.0

Minor update
Changes from official delivery:
*dos2unix applied
*trailing white spaces removed

Change-Id: I6ff19632cab6e8350f19aa7e17063c05ec36898f
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2017-04-04 17:55:12 -05:00