zephyr/ext/hal/st/stm32cube
Erwan Gouriou 4827f2f386 pwm/stm32: add PWM driver for STM32 F1/F4/L4
Provide PWM driver for STM32 series F1/F4/L4.
Driver is ported on STM32Cube HAL and should support other STM32
series with minor updates.
Configuration is done so that PWM sample driver could be run on
all nucleo boards supporting PWM driver.

Change-Id: I6522a565451085df932e0eefd8404268380b5bfe
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2016-12-06 10:31:46 -06:00
..
stm32f1xx stm32cube: Add Zephyr build system files for stm32f1 series 2016-11-03 20:29:04 +00:00
stm32f3xx ext/hal: Introduce STM32Cube SDK for STM32F3xx family 2016-11-10 16:23:00 +00:00
stm32f4xx stm32cube: Add Zephyr build system files for stm32f4 series 2016-11-03 20:29:05 +00:00
stm32f7xx stm32cube: Introduce STM32Cube for STM32F7xx series 2016-11-11 19:04:34 +00:00
stm32l4xx stm32cube: import stm32cube files for STM32L4xx 2016-11-07 18:57:46 +00:00
Kbuild pwm/stm32: add PWM driver for STM32 F1/F4/L4 2016-12-06 10:31:46 -06:00
Kconfig stm32cube: Add Zephyr build system files for stm32f1 series 2016-11-03 20:29:04 +00:00
Makefile stm32cube: Add Zephyr build system files for stm32f3 series 2016-11-11 22:12:14 +00:00
README stm32cube: Add README as porting guidelines 2016-12-06 09:50:11 -06:00

README

How to introduce a new version of stm32cube:
============================================

Original STM32Cube tree structure has been modified to a minimum
structure for a better fit into Zephyr.
STM32Cube is divided into drivers and soc section, with:

drivers/
       include/ contains Cube HAL/LL files from:
       STM32Cube_FW_F1_VX.X.X/Drivers/STM32YYxx_HAL_Driver/Inc/*
       src/ contains:
       STM32Cube_FW_F1_VX.X.X/Drivers/STM32YYxx_HAL_Driver/Src/*
soc/ contains STM32 CMSIS files from
       *STM32Cube_FW_F1_VX.X.X/Drivers/CMSIS/Device/ST/STM32F1xx/Include/*
       *STM32Cube_FW_F1_VX.X.X/Drivers/CMSIS/Device/ST/STM32F1xx/Source/Templates/system_stm32f1xx.c

One file needs to be renamed:
driver/include/stm32f1xx_hal_conf_template.h
into:
driver/include/stm32f1xx_hal_conf.h


In order to enjoy ST CMSIS definitions:
    *CONFIG_HAS_STM32CUBE should be defined
    *stm32yyxx.h should be included in soc.h
       **E.g.: #include <stm32f1xx.h>

In order to use STM32Cube HAL, these files should be compiled:
In /ext/hal/st/stm32cube/Kbuild :
obj-y += stm32yyxx/drivers/src/stm32yyxx_hal.o
obj-y += stm32yyxx/drivers/src/stm32yyxx_hal_rcc.o
obj-y += stm32yyxx/soc/system_stm32yyxx.o
Plus add HAL driver file (when needed):
obj-$(CONFIG_SERIAL_HAS_DRIVER) += stm32yyxx/drivers/src/stm32yyxx_hal_uart.o


Additionally, in order to use STM32Cube LL (when needed):
    *include stm32yyxx_ll_usart.h in soc.h
       **E.g.: #include <stm32f1xx_ll_usart.h>