Compare commits
8
Commits
08a6932c2a
..
trunk
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bf23313428 | ||
|
|
b88f87c35d | ||
|
|
3fcbaec2fb | ||
|
|
11f9d3b18c | ||
|
|
f0a16c5fa9 | ||
|
|
d29ec7cc44 | ||
|
|
49ef6f2eca | ||
|
|
c83854c6e4 |
No files matched your search
@@ -0,0 +1,3 @@
|
|||||||
|
[*.{c,h}]
|
||||||
|
indent_style = space
|
||||||
|
indent_size = 2
|
||||||
+8
-8
@@ -1,3 +1,11 @@
|
|||||||
|
[PreviousLibFiles]
|
||||||
|
LibFiles=Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_ltdc.h;Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_ltdc_ex.h;Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_dsi.h;Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_rcc.h;Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_rcc_ex.h;Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_ll_bus.h;Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_ll_rcc.h;Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_ll_system.h;Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_ll_utils.h;Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_flash.h;Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_flash_ex.h;Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_flash_ramfunc.h;Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_gpio.h;Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_gpio_ex.h;Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_ll_gpio.h;Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_dma_ex.h;Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_dma.h;Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_ll_dma.h;Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_ll_dmamux.h;Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_pwr.h;Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_pwr_ex.h;Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_ll_pwr.h;Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_cortex.h;Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_ll_cortex.h;Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal.h;Drivers/STM32F4xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h;Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_def.h;Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_exti.h;Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_ll_exti.h;Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_ltdc.c;Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_ltdc_ex.c;Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_dsi.c;Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_rcc.c;Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_rcc_ex.c;Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash.c;Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c;Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ramfunc.c;Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_gpio.c;Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_dma_ex.c;Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_dma.c;Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_pwr.c;Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_pwr_ex.c;Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_cortex.c;Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal.c;Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_exti.c;Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_ltdc.h;Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_ltdc_ex.h;Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_dsi.h;Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_rcc.h;Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_rcc_ex.h;Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_ll_bus.h;Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_ll_rcc.h;Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_ll_system.h;Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_ll_utils.h;Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_flash.h;Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_flash_ex.h;Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_flash_ramfunc.h;Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_gpio.h;Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_gpio_ex.h;Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_ll_gpio.h;Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_dma_ex.h;Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_dma.h;Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_ll_dma.h;Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_ll_dmamux.h;Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_pwr.h;Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_pwr_ex.h;Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_ll_pwr.h;Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_cortex.h;Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_ll_cortex.h;Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal.h;Drivers/STM32F4xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h;Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_def.h;Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_exti.h;Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_ll_exti.h;Drivers/CMSIS/Device/ST/STM32F4xx/Include/stm32f429xx.h;Drivers/CMSIS/Device/ST/STM32F4xx/Include/stm32f4xx.h;Drivers/CMSIS/Device/ST/STM32F4xx/Include/system_stm32f4xx.h;Drivers/CMSIS/Device/ST/STM32F4xx/Include/system_stm32f4xx.h;Drivers/CMSIS/Device/ST/STM32F4xx/Source/Templates/system_stm32f4xx.c;Drivers/CMSIS/Include/cachel1_armv7.h;Drivers/CMSIS/Include/cmsis_armcc.h;Drivers/CMSIS/Include/cmsis_armclang.h;Drivers/CMSIS/Include/cmsis_armclang_ltm.h;Drivers/CMSIS/Include/cmsis_compiler.h;Drivers/CMSIS/Include/cmsis_gcc.h;Drivers/CMSIS/Include/cmsis_iccarm.h;Drivers/CMSIS/Include/cmsis_version.h;Drivers/CMSIS/Include/core_armv81mml.h;Drivers/CMSIS/Include/core_armv8mbl.h;Drivers/CMSIS/Include/core_armv8mml.h;Drivers/CMSIS/Include/core_cm0.h;Drivers/CMSIS/Include/core_cm0plus.h;Drivers/CMSIS/Include/core_cm1.h;Drivers/CMSIS/Include/core_cm23.h;Drivers/CMSIS/Include/core_cm3.h;Drivers/CMSIS/Include/core_cm33.h;Drivers/CMSIS/IncludeLine truncated
|
||||||
|
|
||||||
|
[PreviousUsedMakefileFiles]
|
||||||
|
SourceFiles=Core/Src/main.c;Core/Src/stm32f4xx_it.c;Core/Src/stm32f4xx_hal_msp.c;Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_ltdc.c;Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_ltdc_ex.c;Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_dsi.c;Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_rcc.c;Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_rcc_ex.c;Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash.c;Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c;Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ramfunc.c;Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_gpio.c;Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_dma_ex.c;Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_dma.c;Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_pwr.c;Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_pwr_ex.c;Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_cortex.c;Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal.c;Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_exti.c;Drivers/CMSIS/Device/ST/STM32F4xx/Source/Templates/system_stm32f4xx.c;Core/Src/system_stm32f4xx.c;Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_ltdc.c;Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_ltdc_ex.c;Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_dsi.c;Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_rcc.c;Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_rcc_ex.c;Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash.c;Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c;Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ramfunc.c;Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_gpio.c;Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_dma_ex.c;Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_dma.c;Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_pwr.c;Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_pwr_ex.c;Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_cortex.c;Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal.c;Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_exti.c;Drivers/CMSIS/Device/ST/STM32F4xx/Source/Templates/system_stm32f4xx.c;Core/Src/system_stm32f4xx.c;;;
|
||||||
|
HeaderPath=Drivers/STM32F4xx_HAL_Driver/Inc;Drivers/STM32F4xx_HAL_Driver/Inc/Legacy;Drivers/CMSIS/Device/ST/STM32F4xx/Include;Drivers/CMSIS/Include;Core/Inc;
|
||||||
|
CDefines=USE_HAL_DRIVER;STM32F429xx;USE_HAL_DRIVER;USE_HAL_DRIVER;
|
||||||
|
|
||||||
[PreviousGenFiles]
|
[PreviousGenFiles]
|
||||||
AdvancedFolderStructure=true
|
AdvancedFolderStructure=true
|
||||||
HeaderFileListSize=3
|
HeaderFileListSize=3
|
||||||
@@ -15,11 +23,3 @@ SourceFolderListSize=1
|
|||||||
SourcePath#0=../Core/Src
|
SourcePath#0=../Core/Src
|
||||||
SourceFiles=;
|
SourceFiles=;
|
||||||
|
|
||||||
[PreviousLibFiles]
|
|
||||||
LibFiles=Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_rcc.h;Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_rcc_ex.h;Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_ll_bus.h;Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_ll_rcc.h;Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_ll_system.h;Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_ll_utils.h;Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_flash.h;Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_flash_ex.h;Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_flash_ramfunc.h;Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_gpio.h;Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_gpio_ex.h;Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_ll_gpio.h;Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_dma_ex.h;Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_dma.h;Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_ll_dma.h;Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_ll_dmamux.h;Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_pwr.h;Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_pwr_ex.h;Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_ll_pwr.h;Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_cortex.h;Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_ll_cortex.h;Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal.h;Drivers/STM32F4xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h;Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_def.h;Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_exti.h;Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_ll_exti.h;Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_rcc.c;Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_rcc_ex.c;Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash.c;Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c;Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ramfunc.c;Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_gpio.c;Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_dma_ex.c;Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_dma.c;Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_pwr.c;Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_pwr_ex.c;Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_cortex.c;Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal.c;Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_exti.c;Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_rcc.h;Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_rcc_ex.h;Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_ll_bus.h;Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_ll_rcc.h;Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_ll_system.h;Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_ll_utils.h;Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_flash.h;Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_flash_ex.h;Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_flash_ramfunc.h;Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_gpio.h;Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_gpio_ex.h;Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_ll_gpio.h;Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_dma_ex.h;Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_dma.h;Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_ll_dma.h;Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_ll_dmamux.h;Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_pwr.h;Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_pwr_ex.h;Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_ll_pwr.h;Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_cortex.h;Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_ll_cortex.h;Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal.h;Drivers/STM32F4xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h;Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_def.h;Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_exti.h;Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_ll_exti.h;Drivers/CMSIS/Device/ST/STM32F4xx/Include/stm32f429xx.h;Drivers/CMSIS/Device/ST/STM32F4xx/Include/stm32f4xx.h;Drivers/CMSIS/Device/ST/STM32F4xx/Include/system_stm32f4xx.h;Drivers/CMSIS/Device/ST/STM32F4xx/Include/system_stm32f4xx.h;Drivers/CMSIS/Device/ST/STM32F4xx/Source/Templates/system_stm32f4xx.c;Drivers/CMSIS/Include/cachel1_armv7.h;Drivers/CMSIS/Include/cmsis_armcc.h;Drivers/CMSIS/Include/cmsis_armclang.h;Drivers/CMSIS/Include/cmsis_armclang_ltm.h;Drivers/CMSIS/Include/cmsis_compiler.h;Drivers/CMSIS/Include/cmsis_gcc.h;Drivers/CMSIS/Include/cmsis_iccarm.h;Drivers/CMSIS/Include/cmsis_version.h;Drivers/CMSIS/Include/core_armv81mml.h;Drivers/CMSIS/Include/core_armv8mbl.h;Drivers/CMSIS/Include/core_armv8mml.h;Drivers/CMSIS/Include/core_cm0.h;Drivers/CMSIS/Include/core_cm0plus.h;Drivers/CMSIS/Include/core_cm1.h;Drivers/CMSIS/Include/core_cm23.h;Drivers/CMSIS/Include/core_cm3.h;Drivers/CMSIS/Include/core_cm33.h;Drivers/CMSIS/Include/core_cm35p.h;Drivers/CMSIS/Include/core_cm4.h;Drivers/CMSIS/Include/core_cm55.h;Drivers/CMSIS/Include/core_cm7.h;Drivers/CMSIS/Include/core_cm85.h;Drivers/CMSIS/Include/core_sc000.h;Drivers/CMSIS/Include/core_sc300.h;Drivers/CMSIS/Include/core_starmc1.h;Drivers/CMSIS/Include/mpu_armv7.h;Drivers/CMSIS/Include/mpu_armv8.h;Drivers/CMSIS/Include/pac_armv81.h;Drivers/CMSIS/Include/pmu_armv8.h;Drivers/CMSIS/Include/tz_context.h;
|
|
||||||
|
|
||||||
[PreviousUsedMakefileFiles]
|
|
||||||
SourceFiles=Core/Src/main.c;Core/Src/stm32f4xx_it.c;Core/Src/stm32f4xx_hal_msp.c;Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_rcc.c;Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_rcc_ex.c;Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash.c;Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c;Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ramfunc.c;Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_gpio.c;Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_dma_ex.c;Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_dma.c;Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_pwr.c;Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_pwr_ex.c;Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_cortex.c;Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal.c;Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_exti.c;Drivers/CMSIS/Device/ST/STM32F4xx/Source/Templates/system_stm32f4xx.c;Core/Src/system_stm32f4xx.c;Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_rcc.c;Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_rcc_ex.c;Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash.c;Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c;Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ramfunc.c;Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_gpio.c;Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_dma_ex.c;Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_dma.c;Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_pwr.c;Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_pwr_ex.c;Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_cortex.c;Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal.c;Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_exti.c;Drivers/CMSIS/Device/ST/STM32F4xx/Source/Templates/system_stm32f4xx.c;Core/Src/system_stm32f4xx.c;;;
|
|
||||||
HeaderPath=Drivers/STM32F4xx_HAL_Driver/Inc;Drivers/STM32F4xx_HAL_Driver/Inc/Legacy;Drivers/CMSIS/Device/ST/STM32F4xx/Include;Drivers/CMSIS/Include;Core/Inc;
|
|
||||||
CDefines=USE_HAL_DRIVER;STM32F429xx;USE_HAL_DRIVER;USE_HAL_DRIVER;
|
|
||||||
|
|
||||||
@@ -56,7 +56,7 @@
|
|||||||
/* #define HAL_I2C_MODULE_ENABLED */
|
/* #define HAL_I2C_MODULE_ENABLED */
|
||||||
/* #define HAL_I2S_MODULE_ENABLED */
|
/* #define HAL_I2S_MODULE_ENABLED */
|
||||||
/* #define HAL_IWDG_MODULE_ENABLED */
|
/* #define HAL_IWDG_MODULE_ENABLED */
|
||||||
/* #define HAL_LTDC_MODULE_ENABLED */
|
#define HAL_LTDC_MODULE_ENABLED
|
||||||
/* #define HAL_RNG_MODULE_ENABLED */
|
/* #define HAL_RNG_MODULE_ENABLED */
|
||||||
/* #define HAL_RTC_MODULE_ENABLED */
|
/* #define HAL_RTC_MODULE_ENABLED */
|
||||||
/* #define HAL_SAI_MODULE_ENABLED */
|
/* #define HAL_SAI_MODULE_ENABLED */
|
||||||
|
|||||||
+112
-1
@@ -40,6 +40,7 @@
|
|||||||
/* USER CODE END PM */
|
/* USER CODE END PM */
|
||||||
|
|
||||||
/* Private variables ---------------------------------------------------------*/
|
/* Private variables ---------------------------------------------------------*/
|
||||||
|
LTDC_HandleTypeDef hltdc;
|
||||||
|
|
||||||
/* USER CODE BEGIN PV */
|
/* USER CODE BEGIN PV */
|
||||||
|
|
||||||
@@ -47,6 +48,8 @@
|
|||||||
|
|
||||||
/* Private function prototypes -----------------------------------------------*/
|
/* Private function prototypes -----------------------------------------------*/
|
||||||
void SystemClock_Config(void);
|
void SystemClock_Config(void);
|
||||||
|
static void MX_GPIO_Init(void);
|
||||||
|
static void MX_LTDC_Init(void);
|
||||||
/* USER CODE BEGIN PFP */
|
/* USER CODE BEGIN PFP */
|
||||||
|
|
||||||
/* USER CODE END PFP */
|
/* USER CODE END PFP */
|
||||||
@@ -84,6 +87,8 @@ int main(void)
|
|||||||
/* USER CODE END SysInit */
|
/* USER CODE END SysInit */
|
||||||
|
|
||||||
/* Initialize all configured peripherals */
|
/* Initialize all configured peripherals */
|
||||||
|
MX_GPIO_Init();
|
||||||
|
MX_LTDC_Init();
|
||||||
/* USER CODE BEGIN 2 */
|
/* USER CODE BEGIN 2 */
|
||||||
|
|
||||||
/* USER CODE END 2 */
|
/* USER CODE END 2 */
|
||||||
@@ -92,8 +97,8 @@ int main(void)
|
|||||||
/* USER CODE BEGIN WHILE */
|
/* USER CODE BEGIN WHILE */
|
||||||
while (1)
|
while (1)
|
||||||
{
|
{
|
||||||
|
HAL_Delay(4000);
|
||||||
/* USER CODE END WHILE */
|
/* USER CODE END WHILE */
|
||||||
|
|
||||||
/* USER CODE BEGIN 3 */
|
/* USER CODE BEGIN 3 */
|
||||||
}
|
}
|
||||||
/* USER CODE END 3 */
|
/* USER CODE END 3 */
|
||||||
@@ -145,6 +150,112 @@ void SystemClock_Config(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief LTDC Initialization Function
|
||||||
|
* @param None
|
||||||
|
* @retval None
|
||||||
|
*/
|
||||||
|
static void MX_LTDC_Init(void)
|
||||||
|
{
|
||||||
|
|
||||||
|
/* USER CODE BEGIN LTDC_Init 0 */
|
||||||
|
|
||||||
|
/* USER CODE END LTDC_Init 0 */
|
||||||
|
|
||||||
|
LTDC_LayerCfgTypeDef pLayerCfg = {0};
|
||||||
|
LTDC_LayerCfgTypeDef pLayerCfg1 = {0};
|
||||||
|
|
||||||
|
/* USER CODE BEGIN LTDC_Init 1 */
|
||||||
|
|
||||||
|
/* USER CODE END LTDC_Init 1 */
|
||||||
|
hltdc.Instance = LTDC;
|
||||||
|
hltdc.Init.HSPolarity = LTDC_HSPOLARITY_AL;
|
||||||
|
hltdc.Init.VSPolarity = LTDC_VSPOLARITY_AL;
|
||||||
|
hltdc.Init.DEPolarity = LTDC_DEPOLARITY_AL;
|
||||||
|
hltdc.Init.PCPolarity = LTDC_PCPOLARITY_IPC;
|
||||||
|
hltdc.Init.HorizontalSync = 7;
|
||||||
|
hltdc.Init.VerticalSync = 3;
|
||||||
|
hltdc.Init.AccumulatedHBP = 14;
|
||||||
|
hltdc.Init.AccumulatedVBP = 5;
|
||||||
|
hltdc.Init.AccumulatedActiveW = 654;
|
||||||
|
hltdc.Init.AccumulatedActiveH = 485;
|
||||||
|
hltdc.Init.TotalWidth = 660;
|
||||||
|
hltdc.Init.TotalHeigh = 487;
|
||||||
|
hltdc.Init.Backcolor.Blue = 0;
|
||||||
|
hltdc.Init.Backcolor.Green = 0;
|
||||||
|
hltdc.Init.Backcolor.Red = 0;
|
||||||
|
if (HAL_LTDC_Init(&hltdc) != HAL_OK)
|
||||||
|
{
|
||||||
|
Error_Handler();
|
||||||
|
}
|
||||||
|
pLayerCfg.WindowX0 = 0;
|
||||||
|
pLayerCfg.WindowX1 = 0;
|
||||||
|
pLayerCfg.WindowY0 = 0;
|
||||||
|
pLayerCfg.WindowY1 = 0;
|
||||||
|
pLayerCfg.PixelFormat = LTDC_PIXEL_FORMAT_ARGB8888;
|
||||||
|
pLayerCfg.Alpha = 0;
|
||||||
|
pLayerCfg.Alpha0 = 0;
|
||||||
|
pLayerCfg.BlendingFactor1 = LTDC_BLENDING_FACTOR1_CA;
|
||||||
|
pLayerCfg.BlendingFactor2 = LTDC_BLENDING_FACTOR2_CA;
|
||||||
|
pLayerCfg.FBStartAdress = 0;
|
||||||
|
pLayerCfg.ImageWidth = 0;
|
||||||
|
pLayerCfg.ImageHeight = 0;
|
||||||
|
pLayerCfg.Backcolor.Blue = 0;
|
||||||
|
pLayerCfg.Backcolor.Green = 0;
|
||||||
|
pLayerCfg.Backcolor.Red = 0;
|
||||||
|
if (HAL_LTDC_ConfigLayer(&hltdc, &pLayerCfg, 0) != HAL_OK)
|
||||||
|
{
|
||||||
|
Error_Handler();
|
||||||
|
}
|
||||||
|
pLayerCfg1.WindowX0 = 0;
|
||||||
|
pLayerCfg1.WindowX1 = 0;
|
||||||
|
pLayerCfg1.WindowY0 = 0;
|
||||||
|
pLayerCfg1.WindowY1 = 0;
|
||||||
|
pLayerCfg1.PixelFormat = LTDC_PIXEL_FORMAT_ARGB8888;
|
||||||
|
pLayerCfg1.Alpha = 0;
|
||||||
|
pLayerCfg1.Alpha0 = 0;
|
||||||
|
pLayerCfg1.BlendingFactor1 = LTDC_BLENDING_FACTOR1_CA;
|
||||||
|
pLayerCfg1.BlendingFactor2 = LTDC_BLENDING_FACTOR2_CA;
|
||||||
|
pLayerCfg1.FBStartAdress = 0;
|
||||||
|
pLayerCfg1.ImageWidth = 0;
|
||||||
|
pLayerCfg1.ImageHeight = 0;
|
||||||
|
pLayerCfg1.Backcolor.Blue = 0;
|
||||||
|
pLayerCfg1.Backcolor.Green = 0;
|
||||||
|
pLayerCfg1.Backcolor.Red = 0;
|
||||||
|
if (HAL_LTDC_ConfigLayer(&hltdc, &pLayerCfg1, 1) != HAL_OK)
|
||||||
|
{
|
||||||
|
Error_Handler();
|
||||||
|
}
|
||||||
|
/* USER CODE BEGIN LTDC_Init 2 */
|
||||||
|
|
||||||
|
/* USER CODE END LTDC_Init 2 */
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief GPIO Initialization Function
|
||||||
|
* @param None
|
||||||
|
* @retval None
|
||||||
|
*/
|
||||||
|
static void MX_GPIO_Init(void)
|
||||||
|
{
|
||||||
|
/* USER CODE BEGIN MX_GPIO_Init_1 */
|
||||||
|
|
||||||
|
/* USER CODE END MX_GPIO_Init_1 */
|
||||||
|
|
||||||
|
/* GPIO Ports Clock Enable */
|
||||||
|
__HAL_RCC_GPIOF_CLK_ENABLE();
|
||||||
|
__HAL_RCC_GPIOA_CLK_ENABLE();
|
||||||
|
__HAL_RCC_GPIOB_CLK_ENABLE();
|
||||||
|
__HAL_RCC_GPIOE_CLK_ENABLE();
|
||||||
|
__HAL_RCC_GPIOD_CLK_ENABLE();
|
||||||
|
__HAL_RCC_GPIOC_CLK_ENABLE();
|
||||||
|
|
||||||
|
/* USER CODE BEGIN MX_GPIO_Init_2 */
|
||||||
|
|
||||||
|
/* USER CODE END MX_GPIO_Init_2 */
|
||||||
|
}
|
||||||
|
|
||||||
/* USER CODE BEGIN 4 */
|
/* USER CODE BEGIN 4 */
|
||||||
|
|
||||||
/* USER CODE END 4 */
|
/* USER CODE END 4 */
|
||||||
|
|||||||
@@ -78,6 +78,181 @@ void HAL_MspInit(void)
|
|||||||
/* USER CODE END MspInit 1 */
|
/* USER CODE END MspInit 1 */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief LTDC MSP Initialization
|
||||||
|
* This function configures the hardware resources used in this example
|
||||||
|
* @param hltdc: LTDC handle pointer
|
||||||
|
* @retval None
|
||||||
|
*/
|
||||||
|
void HAL_LTDC_MspInit(LTDC_HandleTypeDef* hltdc)
|
||||||
|
{
|
||||||
|
GPIO_InitTypeDef GPIO_InitStruct = {0};
|
||||||
|
RCC_PeriphCLKInitTypeDef PeriphClkInitStruct = {0};
|
||||||
|
if(hltdc->Instance==LTDC)
|
||||||
|
{
|
||||||
|
/* USER CODE BEGIN LTDC_MspInit 0 */
|
||||||
|
|
||||||
|
/* USER CODE END LTDC_MspInit 0 */
|
||||||
|
|
||||||
|
/** Initializes the peripherals clock
|
||||||
|
*/
|
||||||
|
PeriphClkInitStruct.PeriphClockSelection = RCC_PERIPHCLK_LTDC;
|
||||||
|
PeriphClkInitStruct.PLLSAI.PLLSAIN = 50;
|
||||||
|
PeriphClkInitStruct.PLLSAI.PLLSAIR = 2;
|
||||||
|
PeriphClkInitStruct.PLLSAIDivR = RCC_PLLSAIDIVR_2;
|
||||||
|
if (HAL_RCCEx_PeriphCLKConfig(&PeriphClkInitStruct) != HAL_OK)
|
||||||
|
{
|
||||||
|
Error_Handler();
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Peripheral clock enable */
|
||||||
|
__HAL_RCC_LTDC_CLK_ENABLE();
|
||||||
|
|
||||||
|
__HAL_RCC_GPIOF_CLK_ENABLE();
|
||||||
|
__HAL_RCC_GPIOA_CLK_ENABLE();
|
||||||
|
__HAL_RCC_GPIOB_CLK_ENABLE();
|
||||||
|
__HAL_RCC_GPIOE_CLK_ENABLE();
|
||||||
|
__HAL_RCC_GPIOD_CLK_ENABLE();
|
||||||
|
__HAL_RCC_GPIOC_CLK_ENABLE();
|
||||||
|
/**LTDC GPIO Configuration
|
||||||
|
PF10 ------> LTDC_DE
|
||||||
|
PA3 ------> LTDC_B5
|
||||||
|
PA4 ------> LTDC_VSYNC
|
||||||
|
PA6 ------> LTDC_G2
|
||||||
|
PB0 ------> LTDC_R3
|
||||||
|
PB1 ------> LTDC_R6
|
||||||
|
PE11 ------> LTDC_G3
|
||||||
|
PE12 ------> LTDC_B4
|
||||||
|
PE14 ------> LTDC_CLK
|
||||||
|
PE15 ------> LTDC_R7
|
||||||
|
PB10 ------> LTDC_G4
|
||||||
|
PB11 ------> LTDC_G5
|
||||||
|
PD10 ------> LTDC_B3
|
||||||
|
PC6 ------> LTDC_HSYNC
|
||||||
|
PC7 ------> LTDC_G6
|
||||||
|
PA11 ------> LTDC_R4
|
||||||
|
PA12 ------> LTDC_R5
|
||||||
|
PD3 ------> LTDC_G7
|
||||||
|
PB8 ------> LTDC_B6
|
||||||
|
PB9 ------> LTDC_B7
|
||||||
|
*/
|
||||||
|
GPIO_InitStruct.Pin = GPIO_PIN_10;
|
||||||
|
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
|
||||||
|
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
||||||
|
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
|
||||||
|
GPIO_InitStruct.Alternate = GPIO_AF14_LTDC;
|
||||||
|
HAL_GPIO_Init(GPIOF, &GPIO_InitStruct);
|
||||||
|
|
||||||
|
GPIO_InitStruct.Pin = GPIO_PIN_3|GPIO_PIN_4|GPIO_PIN_6|GPIO_PIN_11
|
||||||
|
|GPIO_PIN_12;
|
||||||
|
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
|
||||||
|
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
||||||
|
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
|
||||||
|
GPIO_InitStruct.Alternate = GPIO_AF14_LTDC;
|
||||||
|
HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
|
||||||
|
|
||||||
|
GPIO_InitStruct.Pin = GPIO_PIN_0|GPIO_PIN_1;
|
||||||
|
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
|
||||||
|
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
||||||
|
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
|
||||||
|
GPIO_InitStruct.Alternate = GPIO_AF9_LTDC;
|
||||||
|
HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
|
||||||
|
|
||||||
|
GPIO_InitStruct.Pin = GPIO_PIN_11|GPIO_PIN_12|GPIO_PIN_14|GPIO_PIN_15;
|
||||||
|
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
|
||||||
|
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
||||||
|
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
|
||||||
|
GPIO_InitStruct.Alternate = GPIO_AF14_LTDC;
|
||||||
|
HAL_GPIO_Init(GPIOE, &GPIO_InitStruct);
|
||||||
|
|
||||||
|
GPIO_InitStruct.Pin = GPIO_PIN_10|GPIO_PIN_11|GPIO_PIN_8|GPIO_PIN_9;
|
||||||
|
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
|
||||||
|
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
||||||
|
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
|
||||||
|
GPIO_InitStruct.Alternate = GPIO_AF14_LTDC;
|
||||||
|
HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
|
||||||
|
|
||||||
|
GPIO_InitStruct.Pin = GPIO_PIN_10|GPIO_PIN_3;
|
||||||
|
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
|
||||||
|
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
||||||
|
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
|
||||||
|
GPIO_InitStruct.Alternate = GPIO_AF14_LTDC;
|
||||||
|
HAL_GPIO_Init(GPIOD, &GPIO_InitStruct);
|
||||||
|
|
||||||
|
GPIO_InitStruct.Pin = GPIO_PIN_6|GPIO_PIN_7;
|
||||||
|
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
|
||||||
|
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
||||||
|
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
|
||||||
|
GPIO_InitStruct.Alternate = GPIO_AF14_LTDC;
|
||||||
|
HAL_GPIO_Init(GPIOC, &GPIO_InitStruct);
|
||||||
|
|
||||||
|
/* USER CODE BEGIN LTDC_MspInit 1 */
|
||||||
|
|
||||||
|
/* USER CODE END LTDC_MspInit 1 */
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief LTDC MSP De-Initialization
|
||||||
|
* This function freeze the hardware resources used in this example
|
||||||
|
* @param hltdc: LTDC handle pointer
|
||||||
|
* @retval None
|
||||||
|
*/
|
||||||
|
void HAL_LTDC_MspDeInit(LTDC_HandleTypeDef* hltdc)
|
||||||
|
{
|
||||||
|
if(hltdc->Instance==LTDC)
|
||||||
|
{
|
||||||
|
/* USER CODE BEGIN LTDC_MspDeInit 0 */
|
||||||
|
|
||||||
|
/* USER CODE END LTDC_MspDeInit 0 */
|
||||||
|
/* Peripheral clock disable */
|
||||||
|
__HAL_RCC_LTDC_CLK_DISABLE();
|
||||||
|
|
||||||
|
/**LTDC GPIO Configuration
|
||||||
|
PF10 ------> LTDC_DE
|
||||||
|
PA3 ------> LTDC_B5
|
||||||
|
PA4 ------> LTDC_VSYNC
|
||||||
|
PA6 ------> LTDC_G2
|
||||||
|
PB0 ------> LTDC_R3
|
||||||
|
PB1 ------> LTDC_R6
|
||||||
|
PE11 ------> LTDC_G3
|
||||||
|
PE12 ------> LTDC_B4
|
||||||
|
PE14 ------> LTDC_CLK
|
||||||
|
PE15 ------> LTDC_R7
|
||||||
|
PB10 ------> LTDC_G4
|
||||||
|
PB11 ------> LTDC_G5
|
||||||
|
PD10 ------> LTDC_B3
|
||||||
|
PC6 ------> LTDC_HSYNC
|
||||||
|
PC7 ------> LTDC_G6
|
||||||
|
PA11 ------> LTDC_R4
|
||||||
|
PA12 ------> LTDC_R5
|
||||||
|
PD3 ------> LTDC_G7
|
||||||
|
PB8 ------> LTDC_B6
|
||||||
|
PB9 ------> LTDC_B7
|
||||||
|
*/
|
||||||
|
HAL_GPIO_DeInit(GPIOF, GPIO_PIN_10);
|
||||||
|
|
||||||
|
HAL_GPIO_DeInit(GPIOA, GPIO_PIN_3|GPIO_PIN_4|GPIO_PIN_6|GPIO_PIN_11
|
||||||
|
|GPIO_PIN_12);
|
||||||
|
|
||||||
|
HAL_GPIO_DeInit(GPIOB, GPIO_PIN_0|GPIO_PIN_1|GPIO_PIN_10|GPIO_PIN_11
|
||||||
|
|GPIO_PIN_8|GPIO_PIN_9);
|
||||||
|
|
||||||
|
HAL_GPIO_DeInit(GPIOE, GPIO_PIN_11|GPIO_PIN_12|GPIO_PIN_14|GPIO_PIN_15);
|
||||||
|
|
||||||
|
HAL_GPIO_DeInit(GPIOD, GPIO_PIN_10|GPIO_PIN_3);
|
||||||
|
|
||||||
|
HAL_GPIO_DeInit(GPIOC, GPIO_PIN_6|GPIO_PIN_7);
|
||||||
|
|
||||||
|
/* USER CODE BEGIN LTDC_MspDeInit 1 */
|
||||||
|
|
||||||
|
/* USER CODE END LTDC_MspDeInit 1 */
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
/* USER CODE BEGIN 1 */
|
/* USER CODE BEGIN 1 */
|
||||||
|
|
||||||
/* USER CODE END 1 */
|
/* USER CODE END 1 */
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
---
|
||||||
|
name: 'Issue report'
|
||||||
|
about: 'Create a report to help us improve the quality of our software'
|
||||||
|
title: ''
|
||||||
|
labels: ''
|
||||||
|
assignees: ''
|
||||||
|
---
|
||||||
|
|
||||||
|
**Caution**
|
||||||
|
|
||||||
|
The Issues are strictly limited for the reporting of problem encountered with the software provided in this project.
|
||||||
|
For any other problem related to the STM32 product, the performance, the hardware characteristics and boards, the tools the environment in general, please post your report to the **ST Community** in the STM32 MCUs dedicated [page](https://community.st.com/s/group/0F90X000000AXsASAW/stm32-mcus).
|
||||||
|
|
||||||
|
**Describe the set-up**
|
||||||
|
|
||||||
|
* The board (either ST RPN reference or your custom board)
|
||||||
|
* IDE or at least the compiler and its version
|
||||||
|
|
||||||
|
**Describe the bug (skip if none)**
|
||||||
|
|
||||||
|
A clear and concise description of what the bug is.
|
||||||
|
|
||||||
|
**How to reproduce the bug (skip if none)**
|
||||||
|
|
||||||
|
1. Indicate the global behavior of your application project
|
||||||
|
2. List the modules that you suspect to be the cause of the problem (Drivers, BSP, MW...)
|
||||||
|
3. Describe the use case that generates the problem
|
||||||
|
4. How we can reproduce the problem
|
||||||
|
|
||||||
|
|
||||||
|
**Additional context**
|
||||||
|
|
||||||
|
If you have a first analysis, an enhancement, a fix or a patch, thank you to share your proposal.
|
||||||
|
|
||||||
|
**Screenshots**
|
||||||
|
|
||||||
|
If applicable, add screenshots to help explain your problem.
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
## IMPORTANT INFORMATION
|
||||||
|
|
||||||
|
### Contributor License Agreement (CLA)
|
||||||
|
* The Pull Request feature will be considered by STMicroelectronics after the signature of a **Contributor License Agreement (CLA)** by the submitter.
|
||||||
|
* If you did not sign such agreement, please follow the steps mentioned in the [CONTRIBUTING.md](https://github.com/STMicroelectronics/stm32f429i-discovery/blob/main/CONTRIBUTING.md) file.
|
||||||
@@ -0,0 +1,73 @@
|
|||||||
|
# Contributor Covenant Code of Conduct
|
||||||
|
|
||||||
|
## Our Pledge
|
||||||
|
|
||||||
|
In the interest of fostering an open and welcoming environment, we as
|
||||||
|
contributors and maintainers pledge to making participation in our project and
|
||||||
|
our community a harassment-free experience for everyone, regardless of age, body
|
||||||
|
size, disability, ethnicity, sex characteristics, gender identity and expression,
|
||||||
|
level of experience, education, socio-economic status, nationality, personal
|
||||||
|
appearance, race, religion, or sexual identity and orientation.
|
||||||
|
|
||||||
|
## Our Standards
|
||||||
|
|
||||||
|
Examples of behavior that contributes to creating a positive environment
|
||||||
|
include:
|
||||||
|
|
||||||
|
* Using welcoming and inclusive language
|
||||||
|
* Being respectful of differing viewpoints and experiences
|
||||||
|
* Gracefully accepting constructive criticism
|
||||||
|
* Focusing on what is best for the community
|
||||||
|
* Showing empathy towards other community members
|
||||||
|
|
||||||
|
Examples of unacceptable behavior by participants include:
|
||||||
|
|
||||||
|
* The use of sexualized language or imagery and unwelcome sexual attention or
|
||||||
|
advances
|
||||||
|
* Trolling, insulting/derogatory comments, and personal or political attacks
|
||||||
|
* Public or private harassment
|
||||||
|
* Publishing others' private information, such as a physical or electronic
|
||||||
|
address, without explicit permission
|
||||||
|
* Other conduct which could reasonably be considered inappropriate in a
|
||||||
|
professional setting
|
||||||
|
|
||||||
|
## Our Responsibilities
|
||||||
|
|
||||||
|
Project maintainers are responsible for clarifying the standards of acceptable
|
||||||
|
behavior and are expected to take appropriate and fair corrective action in
|
||||||
|
response to any instances of unacceptable behavior.
|
||||||
|
|
||||||
|
Project maintainers have the right and responsibility to remove, edit, or
|
||||||
|
reject comments, commits, code, wiki edits, issues, and other contributions
|
||||||
|
that are not aligned to this Code of Conduct, or to ban temporarily or
|
||||||
|
permanently any contributor for other behaviors that they deem inappropriate,
|
||||||
|
threatening, offensive, or harmful.
|
||||||
|
|
||||||
|
## Scope
|
||||||
|
|
||||||
|
This Code of Conduct applies both within project spaces and in public spaces
|
||||||
|
when an individual is representing the project or its community. Examples of
|
||||||
|
representing a project or community include using an official project e-mail
|
||||||
|
address, posting via an official social media account, or acting as an appointed
|
||||||
|
representative at an online or offline event. Representation of a project may be
|
||||||
|
further defined and clarified by project maintainers.
|
||||||
|
|
||||||
|
## Enforcement
|
||||||
|
|
||||||
|
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
||||||
|
reported by contacting the project team via this [link](https://www.st.com/content/st_com/en/contact-us.html).
|
||||||
|
All complaints will be reviewed and investigated and will result in a response that
|
||||||
|
is deemed necessary and appropriate to the circumstances. The project team is
|
||||||
|
obligated to maintain confidentiality with regard to the reporter of an incident.
|
||||||
|
Further details of specific enforcement policies may be posted separately.
|
||||||
|
|
||||||
|
Project maintainers who do not follow or enforce the Code of Conduct in good
|
||||||
|
faith may face temporary or permanent repercussions as determined by other
|
||||||
|
members of the project's leadership.
|
||||||
|
|
||||||
|
## Attribution
|
||||||
|
|
||||||
|
This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org), version 1.4,
|
||||||
|
available [here](https://www.contributor-covenant.org/version/1/4/code-of-conduct.html).
|
||||||
|
|
||||||
|
For answers to common questions about this code of conduct, see the [FAQ section](https://www.contributor-covenant.org/faq).
|
||||||
@@ -0,0 +1,38 @@
|
|||||||
|
## Contributing guide
|
||||||
|
|
||||||
|
This document serves as a checklist before contributing to this repository.
|
||||||
|
It includes links to read up on if topics are unclear to you.
|
||||||
|
|
||||||
|
This guide mainly focuses on steps to be followed to submit an issue or a pull-request.
|
||||||
|
|
||||||
|
### 1. Before opening an issue
|
||||||
|
|
||||||
|
To report a bug or a request please file an issue in the right repository
|
||||||
|
(example for [stm32f429i-discovery](https://github.com/STMicroelectronics/stm32f429i-discovery/issues/new/choose)).
|
||||||
|
|
||||||
|
Please check the following boxes before posting an issue:
|
||||||
|
- [ ] `Make sure you are using the latest commit (major releases are tagged, but corrections are available as new commits).`
|
||||||
|
- [ ] `Make sure your issue is a question/feedback/suggestions RELATED TO the software provided in this repository.` Otherwise, it should be submitted to the **ST Community** on the appropriate topic [page](https://community.st.com/s/topiccatalog).
|
||||||
|
- [ ] `Make sure your issue is not already reported/fixed on GitHub or discussed on a previous issue.` Please refer to this [dashboard](https://github.com/orgs/STMicroelectronics/projects/2) for the list of issues and pull-requests. Do not forget to browse into the **closed** issues.
|
||||||
|
|
||||||
|
### 2. Posting the issue
|
||||||
|
|
||||||
|
When you have checked the previous boxes, create a new report from the **Issues** tab of the repository. A template is available to help you report the issue you are facing or the enhancement you would like to propose.
|
||||||
|
|
||||||
|
### 3. Pull Requests
|
||||||
|
|
||||||
|
STMicrolectronics is happy to receive contributions from the community, based on an initial Contributor License Agreement (CLA) procedure.
|
||||||
|
|
||||||
|
* If you are an individual writing original source code and you are sure **you own the intellectual property**, then you need to sign an Individual [CLA](https://cla.st.com).
|
||||||
|
* If you work for a company that wants also to allow you to contribute with your work, your company needs to provide a Corporate [CLA](https://cla.st.com) mentioning your GitHub account name.
|
||||||
|
* If you are not sure that a CLA (Individual or Corporate) has been signed for your GitHub account you can check the [CLA](https://cla.st.com) dedicated page.
|
||||||
|
|
||||||
|
Please note that:
|
||||||
|
* The Corporate CLA will always take precedence over the Individual CLA.
|
||||||
|
* One CLA submission is sufficient, for any project proposed by STMicroelectronics.
|
||||||
|
|
||||||
|
### 4. How to proceed
|
||||||
|
|
||||||
|
* We recommend to engage first a communication thru an issue, in order to present your proposal, just to confirm that it corresponds to STMicroelectronics' domain or scope.
|
||||||
|
* Then fork the project to your GitHub account to further develop your contribution. Please use the latest commit version.
|
||||||
|
* Please, submit one pull-request per new feature or proposal. This will ease the analysis and the final merge if accepted.
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
Copyright 2017 STMicroelectronics.
|
||||||
|
All rights reserved.
|
||||||
|
|
||||||
|
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 the copyright holder 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.
|
||||||
@@ -0,0 +1,39 @@
|
|||||||
|
# BSP STM32F429I-DISCOVERY Component
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
## Overview
|
||||||
|
|
||||||
|
**STM32Cube** is an STMicroelectronics original initiative to ease developers' life by reducing efforts, time and cost.
|
||||||
|
|
||||||
|
**STM32Cube** covers the overall STM32 products portfolio. It includes a comprehensive embedded software platform delivered for each STM32 series.
|
||||||
|
* The CMSIS modules (core and device) corresponding to the ARM(tm) core implemented in this STM32 product.
|
||||||
|
* The STM32 HAL-LL drivers, an abstraction layer offering a set of APIs ensuring maximized portability across the STM32 portfolio.
|
||||||
|
* The BSP drivers of each evaluation, demonstration or nucleo board provided for this STM32 series.
|
||||||
|
* A consistent set of middleware libraries such as RTOS, USB, FatFS, graphics, touch sensing library...
|
||||||
|
* A full set of software projects (basic examples, applications, and demonstrations) for each board provided for this STM32 series.
|
||||||
|
|
||||||
|
Two models of publication are proposed for the STM32Cube embedded software:
|
||||||
|
* The monolithic **MCU Package**: all STM32Cube software modules of one STM32 series are present (Drivers, Middleware, Projects, Utilities) in the repository (usual name **STM32Cubexx**, xx corresponding to the STM32 series).
|
||||||
|
* The **MCU component**: each STM32Cube software module being part of the STM32Cube MCU Package, is delivered as an individual repository, allowing the user to select and get only the required software functions.
|
||||||
|
|
||||||
|
## Description
|
||||||
|
|
||||||
|
This **stm32f429i-discovery** MCU component repository is one element of the **STM32CubeF4** MCU embedded software package, providing the **STM32F429I-DISCOVERY** BSP BOARD component part.
|
||||||
|
|
||||||
|
## Release note
|
||||||
|
|
||||||
|
Details about the content of this release are available in the release note [here](https://htmlpreview.github.io/?https://github.com/STMicroelectronics/stm32f429i-discovery/blob/main/Release_Notes.html).
|
||||||
|
|
||||||
|
## Compatibility information
|
||||||
|
|
||||||
|
Below is the list of the BSP *component* drivers to be used with this BSP *board* driver. It is **crucial** that you use a consistent set of CMSIS - HAL - BSP versions, as mentioned in [this](https://htmlpreview.github.io/?https://github.com/STMicroelectronics/STM32CubeF4/blob/master/Release_Notes.html) release note.
|
||||||
|
|
||||||
|
* [stm32-bsp-common](https://github.com/STMicroelectronics/stm32-bsp-common)
|
||||||
|
* [stm32-ili9341](https://github.com/STMicroelectronics/stm32-ili9341)
|
||||||
|
* [stm32-l3gd20](https://github.com/STMicroelectronics/stm32-l3gd20)
|
||||||
|
* [stm32-stmpe811](https://github.com/STMicroelectronics/stm32-stmpe811)
|
||||||
|
|
||||||
|
## Troubleshooting
|
||||||
|
|
||||||
|
Please refer to the [CONTRIBUTING.md](CONTRIBUTING.md) guide.
|
||||||
@@ -0,0 +1,250 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8" />
|
||||||
|
<meta name="generator" content="pandoc" />
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
|
||||||
|
<title>Release Notes for STM32F429 Discovery Board Drivers</title>
|
||||||
|
<style type="text/css">
|
||||||
|
code{white-space: pre-wrap;}
|
||||||
|
span.smallcaps{font-variant: small-caps;}
|
||||||
|
span.underline{text-decoration: underline;}
|
||||||
|
div.column{display: inline-block; vertical-align: top; width: 50%;}
|
||||||
|
</style>
|
||||||
|
<link rel="stylesheet" href="_htmresc/mini-st_2020.css" />
|
||||||
|
<!--[if lt IE 9]>
|
||||||
|
<script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
|
||||||
|
<![endif]-->
|
||||||
|
<link rel="icon" type="image/x-icon" href="_htmresc/favicon.png" />
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12 col-lg-4">
|
||||||
|
<center>
|
||||||
|
<h1 id="release-notes-for">Release Notes for</h1>
|
||||||
|
<h1 id="stm32f429-discovery-board-drivers"><mark>STM32F429 Discovery Board Drivers</mark></h1>
|
||||||
|
<p>Copyright © 2017 STMicroelectronics<br />
|
||||||
|
</p>
|
||||||
|
<a href="https://www.st.com" class="logo"><img src="_htmresc/st_logo_2020.png" alt="ST logo" /></a>
|
||||||
|
</center>
|
||||||
|
<h1 id="purpose">Purpose</h1>
|
||||||
|
<p>This directory contains the board drivers to demonstrate the capabilities of the STM32F429 Discovery Board Drivers.</p>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-lg-8">
|
||||||
|
<h1 id="update-history">Update History</h1>
|
||||||
|
<div class="collapse">
|
||||||
|
<input type="checkbox" id="collapse-section14" checked aria-hidden="true"> <label for="collapse-section14" aria-hidden="true">V2.1.8 / 22-September-2023</label>
|
||||||
|
<div>
|
||||||
|
<h2 id="main-changes">Main Changes</h2>
|
||||||
|
<ul>
|
||||||
|
<li>Update Release_Notes.html to support new format</li>
|
||||||
|
<li>Update touch calibration to fix inverted touch panel on STM32F429I-DISCOVERY</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="collapse">
|
||||||
|
<input type="checkbox" id="collapse-section13" aria-hidden="true"> <label for="collapse-section13" aria-hidden="true">V2.1.7 / 11-Fabruary-2022</label>
|
||||||
|
<div>
|
||||||
|
<h2 id="main-changes-1">Main Changes</h2>
|
||||||
|
<ul>
|
||||||
|
<li>Update to support the I3G4250D gyroscope component</li>
|
||||||
|
<li>All source files: update disclaimer to add reference to the new license agreement</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="collapse">
|
||||||
|
<input type="checkbox" id="collapse-section12" aria-hidden="true"> <label for="collapse-section12" aria-hidden="true">V2.1.6 / 06-October-2017</label>
|
||||||
|
<div>
|
||||||
|
<h2 id="main-changes-2">Main Changes</h2>
|
||||||
|
<ul>
|
||||||
|
<li>Remove Date & Version</li>
|
||||||
|
<li>stm32f429i_discovery_lcd.c/.h
|
||||||
|
<ul>
|
||||||
|
<li>Update BSP_LCD_DrawBitmap() API to fix functional misbehaviour with SW4STM32 Toolchain</li>
|
||||||
|
</ul></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="collapse">
|
||||||
|
<input type="checkbox" id="collapse-section11" aria-hidden="true"> <label for="collapse-section11" aria-hidden="true">V2.1.5 / 27-January-2017</label>
|
||||||
|
<div>
|
||||||
|
<h2 id="main-changes-3">Main Changes</h2>
|
||||||
|
<ul>
|
||||||
|
<li>Replace __PPP_CLK_ENABLE/DISABLE with __HAL_RCC_PPP_ENABLE/DISABLE</li>
|
||||||
|
<li>Set NVIC priority to 0x0F</li>
|
||||||
|
<li>stm32f429i_discovery_lcd.c/.h
|
||||||
|
<ul>
|
||||||
|
<li>Update BSP_LCD_ReadPixel implementation for ARGB8888 and RGB888 formats</li>
|
||||||
|
</ul></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="collapse">
|
||||||
|
<input type="checkbox" id="collapse-section10" aria-hidden="true"> <label for="collapse-section10" aria-hidden="true">V2.1.4 / 06-May-2016</label>
|
||||||
|
<div>
|
||||||
|
<h2 id="main-changes-4">Main Changes</h2>
|
||||||
|
<ul>
|
||||||
|
<li>stm32f429i_discovery_lcd.c/.h
|
||||||
|
<ul>
|
||||||
|
<li>Provide BSP full coverage for the LTDC reload HW capabilities (Immediate reload , Vertical Blanking Reload , No reload)
|
||||||
|
<ul>
|
||||||
|
<li>BSP_LCD_Relaod() to disable the color keying without reloading</li>
|
||||||
|
<li>BSP_LCD_SetLayerVisible_NoReload() to set an LCD Layer visible without reloading</li>
|
||||||
|
<li>BSP_LCD_SetTransparency_NoReload() to configure the transparency without reloading</li>
|
||||||
|
<li>BSP_LCD_SetLayerAddress_NoReload() to set an LCD layer frame buffer address without reloading</li>
|
||||||
|
<li>BSP_LCD_SetLayerWindow_NoReload() to set display window without reloading</li>
|
||||||
|
<li>BSP_LCD_SetColorKeying_NoReload() to configure and sets the color keying without reloading</li>
|
||||||
|
<li>BSP_LCD_ResetColorKeying_NoReload() to disables the color keying without reloading</li>
|
||||||
|
</ul></li>
|
||||||
|
</ul></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="collapse">
|
||||||
|
<input type="checkbox" id="collapse-section9" aria-hidden="true"> <label for="collapse-section9" aria-hidden="true">V2.1.3 / 13-January-2016</label>
|
||||||
|
<div>
|
||||||
|
<h2 id="main-changes-5">Main Changes</h2>
|
||||||
|
<ul>
|
||||||
|
<li>General updates to fix doxygen errors</li>
|
||||||
|
<li>Add STM32429I_EVAL_BSP_User_Manual.chm file</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="collapse">
|
||||||
|
<input type="checkbox" id="collapse-section8" aria-hidden="true"> <label for="collapse-section8" aria-hidden="true">V2.1.2 / 02-March-2015</label>
|
||||||
|
<div>
|
||||||
|
<h2 id="main-changes-6">Main Changes</h2>
|
||||||
|
<ul>
|
||||||
|
<li>stm32f429i_discovery.c/.h
|
||||||
|
<ul>
|
||||||
|
<li>Align to STM32F4xx HAL Driver V1.3.0 for __HAL_RCC_PPP_CLK_ENABLE() .</li>
|
||||||
|
</ul></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="collapse">
|
||||||
|
<input type="checkbox" id="collapse-section7" aria-hidden="true"> <label for="collapse-section7" aria-hidden="true">V2.1.1 / 10-December-2014</label>
|
||||||
|
<div>
|
||||||
|
<h2 id="main-changes-7">Main Changes</h2>
|
||||||
|
<ul>
|
||||||
|
<li>stm32f429i_discovery.c/.h
|
||||||
|
<ul>
|
||||||
|
<li>Change I2C_SPEED used define by BSP_I2C_SPEED</li>
|
||||||
|
</ul></li>
|
||||||
|
<li>stm32f429i_discovery_sdram.c
|
||||||
|
<ul>
|
||||||
|
<li>BSP_SDRAM_Initialization_sequence(): Fix wrong configuration of the burst length</li>
|
||||||
|
</ul></li>
|
||||||
|
<li>stm32f429i_discovery_gyroscope.h, stm32f429i_discovery_io.h,stm32f429i_discovery_lcd.c/.h and stm32f429i_discovery_ts.h:
|
||||||
|
<ul>
|
||||||
|
<li>Change “" by”/" in the include path to fix compilation issue under Linux</li>
|
||||||
|
</ul></li>
|
||||||
|
<li>Miscellaneous comments update</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="collapse">
|
||||||
|
<input type="checkbox" id="collapse-section6" aria-hidden="true"> <label for="collapse-section6" aria-hidden="true">V2.1.0 / 19-June-2014</label>
|
||||||
|
<div>
|
||||||
|
<h2 id="main-changes-8">Main Changes</h2>
|
||||||
|
<ul>
|
||||||
|
<li>stm32f429i_discovery.c/.h
|
||||||
|
<ul>
|
||||||
|
<li>Add protection for double initialization of IO_Init within LCD_IO_Init()</li>
|
||||||
|
<li>Enhance BSP_PB_Init() function by removing the call of __SYSCFG_CLK_ENABLE() already enabled in the HAL_GPIO_Init()</li>
|
||||||
|
</ul></li>
|
||||||
|
<li>stm32f429i_discovery_gyroscope.c/.h
|
||||||
|
<ul>
|
||||||
|
<li>Update BSP_GYRO_Init() to support new L3GD20 device ID (I_AM_L3GD20_TR)</li>
|
||||||
|
</ul></li>
|
||||||
|
<li>stm32f429i_discovery_ts.c/.h
|
||||||
|
<ul>
|
||||||
|
<li>Correct wrong TS configuration BSP_TS_ITConfig() and TS IT implementation, BSP_TS_ITClear() related to the use of IO expander STMPE1600 device not available on stm32f429i discovery board</li>
|
||||||
|
<li>Comments clean up and typo corrections</li>
|
||||||
|
</ul></li>
|
||||||
|
<li>stm32f429i_discovery_eeprom.c/.h
|
||||||
|
<ul>
|
||||||
|
<li>Update usage of BSP_EEPROM_TIMEOUT_UserCallback() function</li>
|
||||||
|
</ul></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="collapse">
|
||||||
|
<input type="checkbox" id="collapse-section5" aria-hidden="true"> <label for="collapse-section5" aria-hidden="true">V2.0.1 / 26-Fabruary-2014</label>
|
||||||
|
<div>
|
||||||
|
<h2 id="main-changes-9">Main Changes</h2>
|
||||||
|
<ul>
|
||||||
|
<li>stm32f429i_discovery_eeprom.c/.h
|
||||||
|
<ul>
|
||||||
|
<li>Update usage of BSP_EEPROM_TIMEOUT_UserCallback() function</li>
|
||||||
|
</ul></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="collapse">
|
||||||
|
<input type="checkbox" id="collapse-section4" aria-hidden="true"> <label for="collapse-section4" aria-hidden="true">V2.0.0 / 18-Fabruary-2014</label>
|
||||||
|
<div>
|
||||||
|
<h2 id="main-changes-10">Main Changes</h2>
|
||||||
|
<ul>
|
||||||
|
<li>Major update based on STM32Cube specification: drivers architecture and APIs modified vs. V1.0.2, and thus the 2 versions are not compatible.</li>
|
||||||
|
<li>This version has to be used only with STM32CubeF4 based development</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="collapse">
|
||||||
|
<input type="checkbox" id="collapse-section3" aria-hidden="true"> <label for="collapse-section3" aria-hidden="true">V1.0.2 / 06-December-2013</label>
|
||||||
|
<div>
|
||||||
|
<h2 id="main-changes-11">Main Changes</h2>
|
||||||
|
<ul>
|
||||||
|
<li>Update IO expander interrupt line on stm32f429i_discovery_ioe.h file.</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="collapse">
|
||||||
|
<input type="checkbox" id="collapse-section2" aria-hidden="true"> <label for="collapse-section2" aria-hidden="true">V1.0.1 / 28-October-2013</label>
|
||||||
|
<div>
|
||||||
|
<h2 id="main-changes-12">Main Changes</h2>
|
||||||
|
<ul>
|
||||||
|
<li>stm32f429i_discovery_l3gd20.c, stm32f429i_discovery_lcd.c
|
||||||
|
<ul>
|
||||||
|
<li>Set SPI baudrate to 5.625 MHz to fit LCD and Gyroscope timing characteristics
|
||||||
|
<ul>
|
||||||
|
<li>ILI9341 LCD SPI interface max baud rate is 10MHz for write and 6.66MHz for read</li>
|
||||||
|
<li>Gyroscope l3gd20 SPI interface max baud rate is 10MHz for write/read</li>
|
||||||
|
</ul></li>
|
||||||
|
</ul></li>
|
||||||
|
<li>stm32f429i_discovery_lcd.c
|
||||||
|
<ul>
|
||||||
|
<li>Improve SPI low level write routines (add check on BSY flag before to deselect the LCD)</li>
|
||||||
|
<li>Remove the __IO attribute from these function’s parameters: LCD_SetLayer(), LCD_SetColors(), LCD_GetColors(), LCD_SetTextColor() and LCD_SetBackColor()</li>
|
||||||
|
</ul></li>
|
||||||
|
<li>stm32f429i_discovery_i2c_ee.c, stm32f429i_discovery_i2c_ ioe.c
|
||||||
|
<ul>
|
||||||
|
<li>Add a test in Init() function; if the I2C is already configured, then there is no need to reconfigure it again</li>
|
||||||
|
<li>I2C_SPEED define moved to stm32f429i_discovery.h file</li>
|
||||||
|
</ul></li>
|
||||||
|
<li>stm32f429i_discovery_sdram.c
|
||||||
|
<ul>
|
||||||
|
<li>Update device refresh counter value to fit with SDRAM timing characteristics</li>
|
||||||
|
</ul></li>
|
||||||
|
<li>Miscellaneous robustness improvement</li>
|
||||||
|
<li>Miscellaneous comments update</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="collapse">
|
||||||
|
<input type="checkbox" id="collapse-section1" aria-hidden="true"> <label for="collapse-section1" aria-hidden="true">V1.0.0 / 20-September-2013</label>
|
||||||
|
<div>
|
||||||
|
<h2 id="main-changes-13">Main Changes</h2>
|
||||||
|
<ul>
|
||||||
|
<li>First official version of the STM32F429 Discovery Board Drivers</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<footer class="sticky">
|
||||||
|
For complete documentation on <mark>STM32 Microcontrollers</mark> , visit: <a href="http://www.st.com/STM32">http://www.st.com/STM32</a>
|
||||||
|
</footer>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
# Report potential product security vulnerabilities
|
||||||
|
|
||||||
|
ST places a high priority on security, and our Product Security Incident
|
||||||
|
Response Team (PSIRT) is committed to rapidly addressing potential security
|
||||||
|
vulnerabilities affecting our products. PSIRT's long history and vast experience
|
||||||
|
in security allows ST to perform clear analyses and provide appropriate guidance
|
||||||
|
on mitigations and solutions when applicable.
|
||||||
|
|
||||||
|
If you wish to report potential security vulnerabilities regarding our products,
|
||||||
|
**please do not report them through public GitHub issues.** Instead, we
|
||||||
|
encourage you to report them to our ST PSIRT following the process described at:
|
||||||
|
**https://www.st.com/content/st_com/en/security/report-vulnerabilities.html**
|
||||||
|
|
||||||
|
### IMPORTANT - READ CAREFULLY:
|
||||||
|
|
||||||
|
STMicroelectronics International N.V., on behalf of itself, its affiliates and
|
||||||
|
subsidiaries, (collectively “ST”) takes all potential security vulnerability
|
||||||
|
reports or other related communications (“Report(s)”) seriously. In order to
|
||||||
|
review Your Report (the terms “You” and “Yours” include your employer, and all
|
||||||
|
affiliates, subsidiaries and related persons or entities) and take actions as
|
||||||
|
deemed appropriate, ST requires that we have the rights and Your permission to
|
||||||
|
do so.
|
||||||
|
|
||||||
|
As such, by submitting Your Report to ST, You agree that You have the right to
|
||||||
|
do so, and You grant to ST the rights to use the Report for purposes related to
|
||||||
|
security vulnerability analysis, testing, correction, patching, reporting and
|
||||||
|
any other related purpose or function.
|
||||||
|
|
||||||
|
By submitting Your Report, You agree that ST’s
|
||||||
|
[Privacy Policy](https://www.st.com/content/st_com/en/common/privacy-portal.html)
|
||||||
|
applies to all related communications.
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 4.0 KiB |
File diff suppressed because it is too large.
Load diff
Binary file not shown.
|
After Width: | Height: | Size: 7.3 KiB |
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,333 @@
|
|||||||
|
/**
|
||||||
|
******************************************************************************
|
||||||
|
* @file stm32f429i_discovery.h
|
||||||
|
* @author MCD Application Team
|
||||||
|
* @brief This file contains definitions for STM32F429I-Discovery Kit LEDs,
|
||||||
|
* push-buttons hardware resources.
|
||||||
|
******************************************************************************
|
||||||
|
* @attention
|
||||||
|
*
|
||||||
|
* Copyright (c) 2017 STMicroelectronics.
|
||||||
|
* All rights reserved.
|
||||||
|
*
|
||||||
|
* This software is licensed under terms that can be found in the LICENSE file
|
||||||
|
* in the root directory of this software component.
|
||||||
|
* If no LICENSE file comes with this software, it is provided AS-IS.
|
||||||
|
*
|
||||||
|
******************************************************************************
|
||||||
|
*/
|
||||||
|
/* IMPORTANT: One of the following flags must be defined in the preprocessor */
|
||||||
|
/* options in order to select the target board revision: !!!!!!!!!! */
|
||||||
|
/* USE_STM32F429I_DISCO */ /* Applicable for all boards except STM32F429I DISCOVERY REVD and above */
|
||||||
|
/* USE_STM32F429I_DISCOVERY_REVD */ /* Applicable only for STM32F429I DISCOVERY REVD and above */
|
||||||
|
|
||||||
|
/* Define to prevent recursive inclusion -------------------------------------*/
|
||||||
|
#ifndef __STM32F429I_DISCOVERY_H
|
||||||
|
#define __STM32F429I_DISCOVERY_H
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Includes ------------------------------------------------------------------*/
|
||||||
|
#include "stm32f4xx_hal.h"
|
||||||
|
|
||||||
|
/** @addtogroup BSP
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @addtogroup STM32F429I_DISCOVERY
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @addtogroup STM32F429I_DISCOVERY_LOW_LEVEL
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @addtogroup STM32F429I_DISCOVERY_LOW_LEVEL_Exported_Types STM32F429I DISCOVERY LOW LEVEL Exported Types
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
typedef enum
|
||||||
|
{
|
||||||
|
LED3 = 0,
|
||||||
|
LED4 = 1
|
||||||
|
} Led_TypeDef;
|
||||||
|
|
||||||
|
typedef enum
|
||||||
|
{
|
||||||
|
BUTTON_KEY = 0,
|
||||||
|
} Button_TypeDef;
|
||||||
|
|
||||||
|
typedef enum
|
||||||
|
{
|
||||||
|
BUTTON_MODE_GPIO = 0,
|
||||||
|
BUTTON_MODE_EXTI = 1
|
||||||
|
} ButtonMode_TypeDef;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @defgroup STM32F429I_DISCOVERY_LOW_LEVEL_Exported_Constants STM32F429I DISCOVERY LOW LEVEL Exported Constants
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Define for STM32F429I_DISCO board
|
||||||
|
*/
|
||||||
|
#if !defined(USE_STM32F429I_DISCOVERY_REVD) && \
|
||||||
|
!defined(USE_STM32F429I_DISCO)
|
||||||
|
#define USE_STM32F429I_DISCO
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/** @defgroup STM32F429I_DISCOVERY_LOW_LEVEL_LED STM32F429I DISCOVERY LOW LEVEL LED
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
#define LEDn 2
|
||||||
|
|
||||||
|
#define LED3_PIN GPIO_PIN_13
|
||||||
|
#define LED3_GPIO_PORT GPIOG
|
||||||
|
#define LED3_GPIO_CLK_ENABLE() __HAL_RCC_GPIOG_CLK_ENABLE()
|
||||||
|
#define LED3_GPIO_CLK_DISABLE() __HAL_RCC_GPIOG_CLK_DISABLE()
|
||||||
|
|
||||||
|
#define LED4_PIN GPIO_PIN_14
|
||||||
|
#define LED4_GPIO_PORT GPIOG
|
||||||
|
#define LED4_GPIO_CLK_ENABLE() __HAL_RCC_GPIOG_CLK_ENABLE()
|
||||||
|
#define LED4_GPIO_CLK_DISABLE() __HAL_RCC_GPIOG_CLK_DISABLE()
|
||||||
|
|
||||||
|
#define LEDx_GPIO_CLK_ENABLE(__INDEX__) do{if((__INDEX__) == 0) LED3_GPIO_CLK_ENABLE(); else \
|
||||||
|
if((__INDEX__) == 1) LED4_GPIO_CLK_ENABLE(); \
|
||||||
|
}while(0)
|
||||||
|
#define LEDx_GPIO_CLK_DISABLE(__INDEX__) do{if((__INDEX__) == 0) LED3_GPIO_CLK_DISABLE(); else \
|
||||||
|
if((__INDEX__) == 1) LED4_GPIO_CLK_DISABLE(); \
|
||||||
|
}while(0)
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @defgroup STM32F429I_DISCOVERY_LOW_LEVEL_BUTTON STM32F429I DISCOVERY LOW LEVEL BUTTON
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
#define BUTTONn 1
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Wakeup push-button
|
||||||
|
*/
|
||||||
|
#define KEY_BUTTON_PIN GPIO_PIN_0
|
||||||
|
#define KEY_BUTTON_GPIO_PORT GPIOA
|
||||||
|
#define KEY_BUTTON_GPIO_CLK_ENABLE() __HAL_RCC_GPIOA_CLK_ENABLE()
|
||||||
|
#define KEY_BUTTON_GPIO_CLK_DISABLE() __HAL_RCC_GPIOA_CLK_DISABLE()
|
||||||
|
#define KEY_BUTTON_EXTI_IRQn EXTI0_IRQn
|
||||||
|
|
||||||
|
#define BUTTONx_GPIO_CLK_ENABLE(__INDEX__) do{if((__INDEX__) == 0) KEY_BUTTON_GPIO_CLK_ENABLE(); \
|
||||||
|
}while(0)
|
||||||
|
#define BUTTONx_GPIO_CLK_DISABLE(__INDEX__) do{if((__INDEX__) == 0) KEY_BUTTON_GPIO_CLK_DISABLE(); \
|
||||||
|
}while(0)
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @defgroup STM32F429I_DISCOVERY_LOW_LEVEL_BUS STM32F429I DISCOVERY LOW LEVEL BUS
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
/* Exported constanIO --------------------------------------------------------*/
|
||||||
|
#define IO_I2C_ADDRESS 0x82
|
||||||
|
#define TS_I2C_ADDRESS 0x82
|
||||||
|
|
||||||
|
#ifdef EE_M24LR64
|
||||||
|
#define EEPROM_I2C_ADDRESS_A01 0xA0
|
||||||
|
#define EEPROM_I2C_ADDRESS_A02 0xA6
|
||||||
|
#endif /* EE_M24LR64 */
|
||||||
|
|
||||||
|
/*############################### I2Cx #######################################*/
|
||||||
|
/* User can use this section to tailor I2Cx instance used and associated
|
||||||
|
resources */
|
||||||
|
#define DISCOVERY_I2Cx I2C3
|
||||||
|
#define DISCOVERY_I2Cx_CLOCK_ENABLE() __HAL_RCC_I2C3_CLK_ENABLE()
|
||||||
|
#define DISCOVERY_I2Cx_FORCE_RESET() __HAL_RCC_I2C3_FORCE_RESET()
|
||||||
|
#define DISCOVERY_I2Cx_RELEASE_RESET() __HAL_RCC_I2C3_RELEASE_RESET()
|
||||||
|
#define DISCOVERY_I2Cx_SDA_GPIO_CLK_ENABLE() __HAL_RCC_GPIOC_CLK_ENABLE()
|
||||||
|
#define DISCOVERY_I2Cx_SCL_GPIO_CLK_ENABLE() __HAL_RCC_GPIOA_CLK_ENABLE()
|
||||||
|
#define DISCOVERY_I2Cx_SDA_GPIO_CLK_DISABLE() __HAL_RCC_GPIOC_CLK_DISABLE()
|
||||||
|
|
||||||
|
/* Definition for DISCO I2Cx Pins */
|
||||||
|
#define DISCOVERY_I2Cx_SCL_PIN GPIO_PIN_8
|
||||||
|
#define DISCOVERY_I2Cx_SCL_GPIO_PORT GPIOA
|
||||||
|
#define DISCOVERY_I2Cx_SCL_SDA_AF GPIO_AF4_I2C3
|
||||||
|
#define DISCOVERY_I2Cx_SDA_PIN GPIO_PIN_9
|
||||||
|
#define DISCOVERY_I2Cx_SDA_GPIO_PORT GPIOC
|
||||||
|
|
||||||
|
/* Definition for IOE I2Cx's NVIC */
|
||||||
|
#define DISCOVERY_I2Cx_EV_IRQn I2C3_EV_IRQn
|
||||||
|
#define DISCOVERY_I2Cx_ER_IRQn I2C3_ER_IRQn
|
||||||
|
|
||||||
|
/* I2C clock speed configuration (in Hz)
|
||||||
|
WARNING:
|
||||||
|
Make sure that this define is not already declared in other files.
|
||||||
|
It can be used in parallel by other modules. */
|
||||||
|
#ifndef BSP_I2C_SPEED
|
||||||
|
#define BSP_I2C_SPEED 100000
|
||||||
|
#endif /* BSP_I2C_SPEED */
|
||||||
|
|
||||||
|
#define I2Cx_TIMEOUT_MAX 0x3000 /*<! The value of the maximal timeout for I2C waiting loops */
|
||||||
|
|
||||||
|
/*############################### SPIx #######################################*/
|
||||||
|
#define DISCOVERY_SPIx SPI5
|
||||||
|
#define DISCOVERY_SPIx_CLK_ENABLE() __HAL_RCC_SPI5_CLK_ENABLE()
|
||||||
|
#define DISCOVERY_SPIx_GPIO_PORT GPIOF /* GPIOF */
|
||||||
|
#define DISCOVERY_SPIx_AF GPIO_AF5_SPI5
|
||||||
|
#define DISCOVERY_SPIx_GPIO_CLK_ENABLE() __HAL_RCC_GPIOF_CLK_ENABLE()
|
||||||
|
#define DISCOVERY_SPIx_GPIO_CLK_DISABLE() __HAL_RCC_GPIOF_CLK_DISABLE()
|
||||||
|
#define DISCOVERY_SPIx_SCK_PIN GPIO_PIN_7 /* PF.07 */
|
||||||
|
#define DISCOVERY_SPIx_MISO_PIN GPIO_PIN_8 /* PF.08 */
|
||||||
|
#define DISCOVERY_SPIx_MOSI_PIN GPIO_PIN_9 /* PF.09 */
|
||||||
|
/* Maximum Timeout values for flags waiting loops. These timeouts are not based
|
||||||
|
on accurate values, they just guarantee that the application will not remain
|
||||||
|
stuck if the SPI communication is corrupted.
|
||||||
|
You may modify these timeout values depending on CPU frequency and application
|
||||||
|
conditions (interrupts routines ...). */
|
||||||
|
#define SPIx_TIMEOUT_MAX ((uint32_t)0x1000)
|
||||||
|
|
||||||
|
|
||||||
|
/*################################ IOE #######################################*/
|
||||||
|
/**
|
||||||
|
* @brief IOE Control pin
|
||||||
|
*/
|
||||||
|
/* Definition for external IT for STMPE811 */
|
||||||
|
#define STMPE811_INT_PIN GPIO_PIN_15
|
||||||
|
#define STMPE811_INT_GPIO_PORT GPIOA
|
||||||
|
#define STMPE811_INT_CLK_ENABLE() __HAL_RCC_GPIOA_CLK_ENABLE()
|
||||||
|
#define STMPE811_INT_CLK_DISABLE() __HAL_RCC_GPIOA_CLK_DISABLE()
|
||||||
|
#define STMPE811_INT_EXTI EXTI15_10_IRQn
|
||||||
|
#define STMPE811_INT_EXTIHandler EXTI15_10_IRQHandler
|
||||||
|
|
||||||
|
/*################################ LCD #######################################*/
|
||||||
|
/* Chip Select macro definition */
|
||||||
|
#define LCD_CS_LOW() HAL_GPIO_WritePin(LCD_NCS_GPIO_PORT, LCD_NCS_PIN, GPIO_PIN_RESET)
|
||||||
|
#define LCD_CS_HIGH() HAL_GPIO_WritePin(LCD_NCS_GPIO_PORT, LCD_NCS_PIN, GPIO_PIN_SET)
|
||||||
|
|
||||||
|
/* Set WRX High to send data */
|
||||||
|
#define LCD_WRX_LOW() HAL_GPIO_WritePin(LCD_WRX_GPIO_PORT, LCD_WRX_PIN, GPIO_PIN_RESET)
|
||||||
|
#define LCD_WRX_HIGH() HAL_GPIO_WritePin(LCD_WRX_GPIO_PORT, LCD_WRX_PIN, GPIO_PIN_SET)
|
||||||
|
|
||||||
|
/* Set WRX High to send data */
|
||||||
|
#define LCD_RDX_LOW() HAL_GPIO_WritePin(LCD_RDX_GPIO_PORT, LCD_RDX_PIN, GPIO_PIN_RESET)
|
||||||
|
#define LCD_RDX_HIGH() HAL_GPIO_WritePin(LCD_RDX_GPIO_PORT, LCD_RDX_PIN, GPIO_PIN_SET)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief LCD Control pin
|
||||||
|
*/
|
||||||
|
#define LCD_NCS_PIN GPIO_PIN_2
|
||||||
|
#define LCD_NCS_GPIO_PORT GPIOC
|
||||||
|
#define LCD_NCS_GPIO_CLK_ENABLE() __HAL_RCC_GPIOC_CLK_ENABLE()
|
||||||
|
#define LCD_NCS_GPIO_CLK_DISABLE() __HAL_RCC_GPIOC_CLK_DISABLE()
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
* @brief LCD Command/data pin
|
||||||
|
*/
|
||||||
|
#define LCD_WRX_PIN GPIO_PIN_13
|
||||||
|
#define LCD_WRX_GPIO_PORT GPIOD
|
||||||
|
#define LCD_WRX_GPIO_CLK_ENABLE() __HAL_RCC_GPIOD_CLK_ENABLE()
|
||||||
|
#define LCD_WRX_GPIO_CLK_DISABLE() __HAL_RCC_GPIOD_CLK_DISABLE()
|
||||||
|
|
||||||
|
#define LCD_RDX_PIN GPIO_PIN_12
|
||||||
|
#define LCD_RDX_GPIO_PORT GPIOD
|
||||||
|
#define LCD_RDX_GPIO_CLK_ENABLE() __HAL_RCC_GPIOD_CLK_ENABLE()
|
||||||
|
#define LCD_RDX_GPIO_CLK_DISABLE() __HAL_RCC_GPIOD_CLK_DISABLE()
|
||||||
|
|
||||||
|
/*################################ GYROSCOPE #################################*/
|
||||||
|
/* Read/Write command */
|
||||||
|
#define READWRITE_CMD ((uint8_t)0x80)
|
||||||
|
/* Multiple byte read/write command */
|
||||||
|
#define MULTIPLEBYTE_CMD ((uint8_t)0x40)
|
||||||
|
/* Dummy Byte Send by the SPI Master device in order to generate the Clock to the Slave device */
|
||||||
|
#define DUMMY_BYTE ((uint8_t)0x00)
|
||||||
|
|
||||||
|
/* Chip Select macro definition */
|
||||||
|
#define GYRO_CS_LOW() HAL_GPIO_WritePin(GYRO_CS_GPIO_PORT, GYRO_CS_PIN, GPIO_PIN_RESET)
|
||||||
|
#define GYRO_CS_HIGH() HAL_GPIO_WritePin(GYRO_CS_GPIO_PORT, GYRO_CS_PIN, GPIO_PIN_SET)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief GYROSCOPE SPI Interface pins
|
||||||
|
*/
|
||||||
|
#define GYRO_CS_PIN GPIO_PIN_1 /* PC.01 */
|
||||||
|
#define GYRO_CS_GPIO_PORT GPIOC /* GPIOC */
|
||||||
|
#define GYRO_CS_GPIO_CLK_ENABLE() __HAL_RCC_GPIOC_CLK_ENABLE()
|
||||||
|
#define GYRO_CS_GPIO_CLK_DISABLE() __HAL_RCC_GPIOC_CLK_DISABLE()
|
||||||
|
|
||||||
|
#define GYRO_INT_GPIO_CLK_ENABLE() __HAL_RCC_GPIOA_CLK_ENABLE()
|
||||||
|
#define GYRO_INT_GPIO_CLK_DISABLE() __HAL_RCC_GPIOA_CLK_DISABLE()
|
||||||
|
#define GYRO_INT_GPIO_PORT GPIOA /* GPIOA */
|
||||||
|
#define GYRO_INT1_PIN GPIO_PIN_1 /* PA.01 */
|
||||||
|
#define GYRO_INT1_EXTI_IRQn EXTI1_IRQn
|
||||||
|
#define GYRO_INT2_PIN GPIO_PIN_2 /* PA.02 */
|
||||||
|
#define GYRO_INT2_EXTI_IRQn EXTI2_IRQn
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef EE_M24LR64
|
||||||
|
/** @defgroup STM32F429I_DISCOVERY_LOW_LEVEL_I2C_EEPROM STM32F429I DISCOVERY LOW LEVEL I2C EEPROM
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
* @brief I2C EEPROM Interface pins
|
||||||
|
*/
|
||||||
|
#define EEPROM_I2C_DMA DMA1
|
||||||
|
#define EEPROM_I2C_DMA_CHANNEL DMA_CHANNEL_3
|
||||||
|
#define EEPROM_I2C_DMA_STREAM_TX DMA1_Stream4
|
||||||
|
#define EEPROM_I2C_DMA_STREAM_RX DMA1_Stream2
|
||||||
|
#define EEPROM_I2C_DMA_CLK_ENABLE() __HAL_RCC_DMA1_CLK_ENABLE()
|
||||||
|
|
||||||
|
#define EEPROM_I2C_DMA_TX_IRQn DMA1_Stream4_IRQn
|
||||||
|
#define EEPROM_I2C_DMA_RX_IRQn DMA1_Stream2_IRQn
|
||||||
|
#define EEPROM_I2C_DMA_TX_IRQHandler DMA1_Stream4_IRQHandler
|
||||||
|
#define EEPROM_I2C_DMA_RX_IRQHandler DMA1_Stream2_IRQHandler
|
||||||
|
#define EEPROM_I2C_DMA_PREPRIO 0x0F
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
#endif /* EE_M24LR64 */
|
||||||
|
|
||||||
|
/** @defgroup STM32F429I_DISCOVERY_LOW_LEVEL_Exported_Macros STM32F429I DISCOVERY LOW LEVEL Exported Macros
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @defgroup STM32F429I_DISCOVERY_LOW_LEVEL_Exported_Functions STM32F429I DISCOVERY LOW LEVEL Exported Functions
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
uint32_t BSP_GetVersion(void);
|
||||||
|
void BSP_LED_Init(Led_TypeDef Led);
|
||||||
|
void BSP_LED_On(Led_TypeDef Led);
|
||||||
|
void BSP_LED_Off(Led_TypeDef Led);
|
||||||
|
void BSP_LED_Toggle(Led_TypeDef Led);
|
||||||
|
void BSP_PB_Init(Button_TypeDef Button, ButtonMode_TypeDef ButtonMode);
|
||||||
|
uint32_t BSP_PB_GetState(Button_TypeDef Button);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* __STM32F429I_DISCOVERY_H */
|
||||||
@@ -0,0 +1,484 @@
|
|||||||
|
/**
|
||||||
|
******************************************************************************
|
||||||
|
* @file stm32f429i_discovery_eeprom.c
|
||||||
|
* @author MCD Application Team
|
||||||
|
* @brief This file provides a set of functions needed to manage an I2C M24LR64
|
||||||
|
* EEPROM memory.
|
||||||
|
* To be able to use this driver, the switch EE_M24LR64 must be defined
|
||||||
|
* in your toolchain compiler preprocessor
|
||||||
|
*
|
||||||
|
* ===================================================================
|
||||||
|
* Notes:
|
||||||
|
* - This driver is intended for STM32F4xx families devices only.
|
||||||
|
* - The I2C EEPROM memory (M24LR64) is available on separate daughter
|
||||||
|
* board ANT7-M24LR-A, which is not provided with the STM32F429I
|
||||||
|
* DISCOVERY board.
|
||||||
|
* To use this driver you have to connect the ANT7-M24LR-A to CN3
|
||||||
|
* connector of STM32F429I DISCOVERY board.
|
||||||
|
* ===================================================================
|
||||||
|
*
|
||||||
|
* It implements a high level communication layer for read and write
|
||||||
|
* from/to this memory. The needed STM32F4xx hardware resources (I2C and
|
||||||
|
* GPIO) are defined in stm32f429i_discovery.h file, and the initialization is
|
||||||
|
* performed in EEPROM_IO_Init() function declared in stm32f429i_discovery.c
|
||||||
|
* file.
|
||||||
|
* You can easily tailor this driver to any other development board,
|
||||||
|
* by just adapting the defines for hardware resources and
|
||||||
|
* EEPROM_IO_Init() function.
|
||||||
|
*
|
||||||
|
* @note In this driver, basic read and write functions (BSP_EEPROM_ReadBuffer()
|
||||||
|
* and BSP_EEPROM_WritePage()) use DMA mode to perform the data
|
||||||
|
* transfer to/from EEPROM memory.
|
||||||
|
*
|
||||||
|
* @note Regarding BSP_EEPROM_WritePage(), it is a optimized function to perform
|
||||||
|
* small write (less than 1 page) BUT The number of bytes (combined to write start address) must not
|
||||||
|
* cross the EEPROM page boundary. This function can only write into
|
||||||
|
* the boundaries of an EEPROM page.
|
||||||
|
* This function doesn't check on boundaries condition (in this driver
|
||||||
|
* the function BSP_EEPROM_WriteBuffer() which calls BSP_EEPROM_WritePage() is
|
||||||
|
* responsible of checking on Page boundaries).
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* +-----------------------------------------------------------------+
|
||||||
|
* | Pin assignment for M24LR64 EEPROM |
|
||||||
|
* +---------------------------------------+-----------+-------------+
|
||||||
|
* | STM32F4xx I2C Pins | EEPROM | Pin |
|
||||||
|
* +---------------------------------------+-----------+-------------+
|
||||||
|
* | . | E0(GND) | 1 (0V) |
|
||||||
|
* | . | AC0 | 2 |
|
||||||
|
* | . | AC1 | 3 |
|
||||||
|
* | . | VSS | 4 (0V) |
|
||||||
|
* | SDA | SDA | 5 |
|
||||||
|
* | SCL | SCL | 6 |
|
||||||
|
* | . | E1(GND) | 7 (0V) |
|
||||||
|
* | . | VDD | 8 (3.3V) |
|
||||||
|
* +---------------------------------------+-----------+-------------+
|
||||||
|
*
|
||||||
|
******************************************************************************
|
||||||
|
* @attention
|
||||||
|
*
|
||||||
|
* Copyright (c) 2017 STMicroelectronics.
|
||||||
|
* All rights reserved.
|
||||||
|
*
|
||||||
|
* This software is licensed under terms that can be found in the LICENSE file
|
||||||
|
* in the root directory of this software component.
|
||||||
|
* If no LICENSE file comes with this software, it is provided AS-IS.
|
||||||
|
*
|
||||||
|
******************************************************************************
|
||||||
|
*/
|
||||||
|
/* Includes ------------------------------------------------------------------*/
|
||||||
|
#include "stm32f429i_discovery_eeprom.h"
|
||||||
|
|
||||||
|
#ifdef EE_M24LR64
|
||||||
|
|
||||||
|
/** @addtogroup BSP
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @addtogroup STM32F429I_DISCOVERY
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @defgroup STM32F429I_DISCOVERY_EEPROM STM32F429I DISCOVERY EEPROM
|
||||||
|
* @brief This file includes the I2C EEPROM driver of STM32F429I Discovery Kit.
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @defgroup STM32F429I_DISCOVERY_EEPROM_Private_Types STM32F429I DISCOVERY EEPROM Private Types
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @defgroup STM32F429I_DISCOVERY_EEPROM_Private_Defines STM32F429I DISCOVERY EEPROM Private Defines
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @defgroup STM32F429I_DISCOVERY_EEPROM_Private_Macros STM32F429I DISCOVERY EEPROM Private Macros
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @defgroup STM32F429I_DISCOVERY_EEPROM_Private_Variables STM32F429I DISCOVERY EEPROM Private Variables
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
__IO uint16_t EEPROMAddress = 0;
|
||||||
|
__IO uint32_t EEPROMTimeout = EEPROM_READ_TIMEOUT;
|
||||||
|
__IO uint16_t EEPROMDataRead;
|
||||||
|
__IO uint8_t EEPROMDataWrite;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @defgroup STM32F429I_DISCOVERY_EEPROM_Private_Function_Prototypes STM32F429I DISCOVERY EEPROM Private Function Prototypes
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @defgroup STM32F429I_DISCOVERY_EEPROM_Private_Functions STM32F429I DISCOVERY EEPROM Private Functions
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Initializes peripherals used by the I2C EEPROM driver.
|
||||||
|
* @note There are 2 different versions of M24LR64 (A01 & A02).
|
||||||
|
* Then try to connect on 1st one (EEPROM_I2C_ADDRESS_A01)
|
||||||
|
* and if problem, check the 2nd one (EEPROM_I2C_ADDRESS_A02)
|
||||||
|
* @retval EEPROM_OK (0) if operation is correctly performed, else return value
|
||||||
|
* different from EEPROM_OK (0)
|
||||||
|
*/
|
||||||
|
uint32_t BSP_EEPROM_Init(void)
|
||||||
|
{
|
||||||
|
/* I2C Initialization */
|
||||||
|
EEPROM_IO_Init();
|
||||||
|
|
||||||
|
/*Select the EEPROM address for A01 and check if OK*/
|
||||||
|
EEPROMAddress = EEPROM_I2C_ADDRESS_A01;
|
||||||
|
if (EEPROM_IO_IsDeviceReady(EEPROMAddress, EEPROM_MAX_TRIALS) != HAL_OK)
|
||||||
|
{
|
||||||
|
/*Select the EEPROM address for A02 and check if OK*/
|
||||||
|
EEPROMAddress = EEPROM_I2C_ADDRESS_A02;
|
||||||
|
if (EEPROM_IO_IsDeviceReady(EEPROMAddress, EEPROM_MAX_TRIALS) != HAL_OK)
|
||||||
|
{
|
||||||
|
return EEPROM_FAIL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return EEPROM_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Reads a block of data from the EEPROM.
|
||||||
|
* @param pBuffer : pointer to the buffer that receives the data read from
|
||||||
|
* the EEPROM.
|
||||||
|
* @param ReadAddr : EEPROM's internal address to start reading from.
|
||||||
|
* @param NumByteToRead : pointer to the variable holding number of bytes to
|
||||||
|
* be read from the EEPROM.
|
||||||
|
*
|
||||||
|
* @note The variable pointed by NumByteToRead is reset to 0 when all the
|
||||||
|
* data are read from the EEPROM. Application should monitor this
|
||||||
|
* variable in order know when the transfer is complete.
|
||||||
|
*
|
||||||
|
* @retval EEPROM_OK (0) if operation is correctly performed, else return value
|
||||||
|
* different from EEPROM_OK (0) or the timeout user callback.
|
||||||
|
*/
|
||||||
|
uint32_t BSP_EEPROM_ReadBuffer(uint8_t *pBuffer, uint16_t ReadAddr, uint16_t *NumByteToRead)
|
||||||
|
{
|
||||||
|
uint32_t buffersize = *NumByteToRead;
|
||||||
|
|
||||||
|
/* Set the pointer to the Number of data to be read. This pointer will be used
|
||||||
|
by the DMA Transfer Completer interrupt Handler in order to reset the
|
||||||
|
variable to 0. User should check on this variable in order to know if the
|
||||||
|
DMA transfer has been complete or not. */
|
||||||
|
EEPROMDataRead = *NumByteToRead;
|
||||||
|
|
||||||
|
if (EEPROM_IO_ReadData(EEPROMAddress, ReadAddr, pBuffer, buffersize) != HAL_OK)
|
||||||
|
{
|
||||||
|
return EEPROM_FAIL;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Wait transfer through DMA to be complete */
|
||||||
|
EEPROMTimeout = HAL_GetTick() + EEPROM_READ_TIMEOUT;
|
||||||
|
while (EEPROMDataRead > 0)
|
||||||
|
{
|
||||||
|
if (HAL_GetTick() > EEPROMTimeout)
|
||||||
|
{
|
||||||
|
BSP_EEPROM_TIMEOUT_UserCallback();
|
||||||
|
return EEPROM_TIMEOUT;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* If all operations OK, return EEPROM_OK (0) */
|
||||||
|
return EEPROM_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Writes more than one byte to the EEPROM with a single WRITE cycle.
|
||||||
|
*
|
||||||
|
* @note The number of bytes (combined to write start address) must not
|
||||||
|
* cross the EEPROM page boundary. This function can only write into
|
||||||
|
* the boundaries of an EEPROM page.
|
||||||
|
* This function doesn't check on boundaries condition (in this driver
|
||||||
|
* the function BSP_EEPROM_WriteBuffer() which calls BSP_EEPROM_WritePage() is
|
||||||
|
* responsible of checking on Page boundaries).
|
||||||
|
*
|
||||||
|
* @param pBuffer : pointer to the buffer containing the data to be written to
|
||||||
|
* the EEPROM.
|
||||||
|
* @param WriteAddr : EEPROM's internal address to write to.
|
||||||
|
* @param NumByteToWrite : pointer to the variable holding number of bytes to
|
||||||
|
* be written into the EEPROM.
|
||||||
|
*
|
||||||
|
* @note The variable pointed by NumByteToWrite is reset to 0 when all the
|
||||||
|
* data are written to the EEPROM. Application should monitor this
|
||||||
|
* variable in order know when the transfer is complete.
|
||||||
|
*
|
||||||
|
* @note This function just configure the communication and enable the DMA
|
||||||
|
* channel to transfer data. Meanwhile, the user application may perform
|
||||||
|
* other tasks in parallel.
|
||||||
|
*
|
||||||
|
* @retval EEPROM_OK (0) if operation is correctly performed, else return value
|
||||||
|
* different from EEPROM_OK (0) or the timeout user callback.
|
||||||
|
*/
|
||||||
|
uint32_t BSP_EEPROM_WritePage(uint8_t *pBuffer, uint16_t WriteAddr, uint8_t *NumByteToWrite)
|
||||||
|
{
|
||||||
|
uint32_t buffersize = *NumByteToWrite;
|
||||||
|
uint32_t status = EEPROM_OK;
|
||||||
|
/* Set the pointer to the Number of data to be written. This pointer will be used
|
||||||
|
by the DMA Transfer Completer interrupt Handler in order to reset the
|
||||||
|
variable to 0. User should check on this variable in order to know if the
|
||||||
|
DMA transfer has been complete or not. */
|
||||||
|
EEPROMDataWrite = *NumByteToWrite;
|
||||||
|
|
||||||
|
if (EEPROM_IO_WriteData(EEPROMAddress, WriteAddr, pBuffer, buffersize) != HAL_OK)
|
||||||
|
{
|
||||||
|
status = EEPROM_FAIL;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Wait transfer through DMA to be complete */
|
||||||
|
EEPROMTimeout = HAL_GetTick() + EEPROM_WRITE_TIMEOUT;
|
||||||
|
while (EEPROMDataWrite > 0)
|
||||||
|
{
|
||||||
|
if (HAL_GetTick() > EEPROMTimeout)
|
||||||
|
{
|
||||||
|
BSP_EEPROM_TIMEOUT_UserCallback();
|
||||||
|
return EEPROM_TIMEOUT;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (BSP_EEPROM_WaitEepromStandbyState() != EEPROM_OK)
|
||||||
|
{
|
||||||
|
return EEPROM_FAIL;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* If all operations OK, return EEPROM_OK (0) */
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Writes buffer of data to the I2C EEPROM.
|
||||||
|
* @param pBuffer : pointer to the buffer containing the data to be written
|
||||||
|
* to the EEPROM.
|
||||||
|
* @param WriteAddr : EEPROM's internal address to write to.
|
||||||
|
* @param NumByteToWrite : number of bytes to write to the EEPROM.
|
||||||
|
* @retval EEPROM_OK (0) if operation is correctly performed, else return value
|
||||||
|
* different from EEPROM_OK (0) or the timeout user callback.
|
||||||
|
*/
|
||||||
|
uint32_t BSP_EEPROM_WriteBuffer(uint8_t *pBuffer, uint16_t WriteAddr, uint16_t NumByteToWrite)
|
||||||
|
{
|
||||||
|
uint16_t numofpage = 0, numofsingle = 0, count = 0;
|
||||||
|
uint16_t addr = 0;
|
||||||
|
uint8_t dataindex = 0;
|
||||||
|
uint32_t status = EEPROM_OK;
|
||||||
|
|
||||||
|
addr = WriteAddr % EEPROM_PAGESIZE;
|
||||||
|
count = EEPROM_PAGESIZE - addr;
|
||||||
|
numofpage = NumByteToWrite / EEPROM_PAGESIZE;
|
||||||
|
numofsingle = NumByteToWrite % EEPROM_PAGESIZE;
|
||||||
|
|
||||||
|
/* If WriteAddr is EEPROM_PAGESIZE aligned */
|
||||||
|
if (addr == 0)
|
||||||
|
{
|
||||||
|
/* If NumByteToWrite < EEPROM_PAGESIZE */
|
||||||
|
if (numofpage == 0)
|
||||||
|
{
|
||||||
|
/* Store the number of data to be written */
|
||||||
|
dataindex = numofsingle;
|
||||||
|
/* Start writing data */
|
||||||
|
status = BSP_EEPROM_WritePage(pBuffer, WriteAddr, (uint8_t *)(&dataindex));
|
||||||
|
if (status != EEPROM_OK)
|
||||||
|
{
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/* If NumByteToWrite > EEPROM_PAGESIZE */
|
||||||
|
else
|
||||||
|
{
|
||||||
|
while (numofpage--)
|
||||||
|
{
|
||||||
|
/* Store the number of data to be written */
|
||||||
|
dataindex = EEPROM_PAGESIZE;
|
||||||
|
status = BSP_EEPROM_WritePage(pBuffer, WriteAddr, (uint8_t *)(&dataindex));
|
||||||
|
if (status != EEPROM_OK)
|
||||||
|
{
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
|
||||||
|
WriteAddr += EEPROM_PAGESIZE;
|
||||||
|
pBuffer += EEPROM_PAGESIZE;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (numofsingle != 0)
|
||||||
|
{
|
||||||
|
/* Store the number of data to be written */
|
||||||
|
dataindex = numofsingle;
|
||||||
|
status = BSP_EEPROM_WritePage(pBuffer, WriteAddr, (uint8_t *)(&dataindex));
|
||||||
|
if (status != EEPROM_OK)
|
||||||
|
{
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/* If WriteAddr is not EEPROM_PAGESIZE aligned */
|
||||||
|
else
|
||||||
|
{
|
||||||
|
/* If NumByteToWrite < EEPROM_PAGESIZE */
|
||||||
|
if (numofpage == 0)
|
||||||
|
{
|
||||||
|
/* If the number of data to be written is more than the remaining space
|
||||||
|
in the current page: */
|
||||||
|
if (NumByteToWrite > count)
|
||||||
|
{
|
||||||
|
/* Store the number of data to be written */
|
||||||
|
dataindex = count;
|
||||||
|
/* Write the data contained in same page */
|
||||||
|
status = BSP_EEPROM_WritePage(pBuffer, WriteAddr, (uint8_t *)(&dataindex));
|
||||||
|
if (status != EEPROM_OK)
|
||||||
|
{
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Store the number of data to be written */
|
||||||
|
dataindex = (NumByteToWrite - count);
|
||||||
|
/* Write the remaining data in the following page */
|
||||||
|
status = BSP_EEPROM_WritePage((uint8_t *)(pBuffer + count), (WriteAddr + count), (uint8_t *)(&dataindex));
|
||||||
|
if (status != EEPROM_OK)
|
||||||
|
{
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
/* Store the number of data to be written */
|
||||||
|
dataindex = numofsingle;
|
||||||
|
status = BSP_EEPROM_WritePage(pBuffer, WriteAddr, (uint8_t *)(&dataindex));
|
||||||
|
if (status != EEPROM_OK)
|
||||||
|
{
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/* If NumByteToWrite > EEPROM_PAGESIZE */
|
||||||
|
else
|
||||||
|
{
|
||||||
|
NumByteToWrite -= count;
|
||||||
|
numofpage = NumByteToWrite / EEPROM_PAGESIZE;
|
||||||
|
numofsingle = NumByteToWrite % EEPROM_PAGESIZE;
|
||||||
|
|
||||||
|
if (count != 0)
|
||||||
|
{
|
||||||
|
/* Store the number of data to be written */
|
||||||
|
dataindex = count;
|
||||||
|
status = BSP_EEPROM_WritePage(pBuffer, WriteAddr, (uint8_t *)(&dataindex));
|
||||||
|
if (status != EEPROM_OK)
|
||||||
|
{
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
WriteAddr += count;
|
||||||
|
pBuffer += count;
|
||||||
|
}
|
||||||
|
|
||||||
|
while (numofpage--)
|
||||||
|
{
|
||||||
|
/* Store the number of data to be written */
|
||||||
|
dataindex = EEPROM_PAGESIZE;
|
||||||
|
status = BSP_EEPROM_WritePage(pBuffer, WriteAddr, (uint8_t *)(&dataindex));
|
||||||
|
if (status != EEPROM_OK)
|
||||||
|
{
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
WriteAddr += EEPROM_PAGESIZE;
|
||||||
|
pBuffer += EEPROM_PAGESIZE;
|
||||||
|
}
|
||||||
|
if (numofsingle != 0)
|
||||||
|
{
|
||||||
|
/* Store the number of data to be written */
|
||||||
|
dataindex = numofsingle;
|
||||||
|
status = BSP_EEPROM_WritePage(pBuffer, WriteAddr, (uint8_t *)(&dataindex));
|
||||||
|
if (status != EEPROM_OK)
|
||||||
|
{
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* If all operations OK, return EEPROM_OK (0) */
|
||||||
|
return EEPROM_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Wait for EEPROM Standby state.
|
||||||
|
*
|
||||||
|
* @note This function allows to wait and check that EEPROM has finished the
|
||||||
|
* last operation. It is mostly used after Write operation: after receiving
|
||||||
|
* the buffer to be written, the EEPROM may need additional time to actually
|
||||||
|
* perform the write operation. During this time, it doesn't answer to
|
||||||
|
* I2C packets addressed to it. Once the write operation is complete
|
||||||
|
* the EEPROM responds to its address.
|
||||||
|
*
|
||||||
|
* @retval EEPROM_OK (0) if operation is correctly performed, else return value
|
||||||
|
* different from EEPROM_OK (0) or the timeout user callback.
|
||||||
|
*/
|
||||||
|
uint32_t BSP_EEPROM_WaitEepromStandbyState(void)
|
||||||
|
{
|
||||||
|
/* Check if the maximum allowed number of trials has bee reached */
|
||||||
|
if (EEPROM_IO_IsDeviceReady(EEPROMAddress, EEPROM_MAX_TRIALS) != HAL_OK)
|
||||||
|
{
|
||||||
|
/* If the maximum number of trials has been reached, exit the function */
|
||||||
|
BSP_EEPROM_TIMEOUT_UserCallback();
|
||||||
|
return EEPROM_TIMEOUT;
|
||||||
|
}
|
||||||
|
return EEPROM_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Memory Tx Transfer completed callbacks.
|
||||||
|
* @param hi2c: I2C handle
|
||||||
|
*/
|
||||||
|
void HAL_I2C_MemTxCpltCallback(I2C_HandleTypeDef *hi2c)
|
||||||
|
{
|
||||||
|
EEPROMDataWrite = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Memory Rx Transfer completed callbacks.
|
||||||
|
* @param hi2c: I2C handle
|
||||||
|
*/
|
||||||
|
void HAL_I2C_MemRxCpltCallback(I2C_HandleTypeDef *hi2c)
|
||||||
|
{
|
||||||
|
EEPROMDataRead = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Basic management of the timeout situation.
|
||||||
|
*/
|
||||||
|
__weak void BSP_EEPROM_TIMEOUT_UserCallback(void)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif /* EE_M24LR64 */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
@@ -0,0 +1,124 @@
|
|||||||
|
/**
|
||||||
|
******************************************************************************
|
||||||
|
* @file stm32f429i_discovery_eeprom.h
|
||||||
|
* @author MCD Application Team
|
||||||
|
* @brief This file contains all the functions prototypes for
|
||||||
|
* the stm32f429i_discovery_eeprom.c firmware driver.
|
||||||
|
******************************************************************************
|
||||||
|
* @attention
|
||||||
|
*
|
||||||
|
* Copyright (c) 2017 STMicroelectronics.
|
||||||
|
* All rights reserved.
|
||||||
|
*
|
||||||
|
* This software is licensed under terms that can be found in the LICENSE file
|
||||||
|
* in the root directory of this software component.
|
||||||
|
* If no LICENSE file comes with this software, it is provided AS-IS.
|
||||||
|
*
|
||||||
|
******************************************************************************
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Define to prevent recursive inclusion -------------------------------------*/
|
||||||
|
#ifndef __STM32F429I_DISCOVERY_EEPROM_H
|
||||||
|
#define __STM32F429I_DISCOVERY_EEPROM_H
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Includes ------------------------------------------------------------------*/
|
||||||
|
#include "stm32f429i_discovery.h"
|
||||||
|
|
||||||
|
/** @addtogroup BSP
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @addtogroup STM32F429I_DISCOVERY
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @addtogroup STM32F429I_DISCOVERY_EEPROM STM32F429I DISCOVERY EEPROM
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @defgroup STM32F429I_DISCOVERY_EEPROM_Exported_Types STM32F429I DISCOVERY EEPROM Exported Types
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @defgroup STM32F429I_DISCOVERY_EEPROM_Exported_Constants STM32F429I DISCOVERY EEPROM Exported Constants
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
/* EEPROM hardware address and page size */
|
||||||
|
#define EEPROM_PAGESIZE 4
|
||||||
|
#define EEPROM_MAX_SIZE 0x2000 /* 64Kbit*/
|
||||||
|
|
||||||
|
/* Maximum Timeout values for flags and events waiting loops.
|
||||||
|
This timeout is based on systick set to 1ms*/
|
||||||
|
/* Timeout for read based if read all the EEPROM : EEPROM_MAX_SIZE * BSP_I2C_SPEED (640ms)*/
|
||||||
|
#define EEPROM_READ_TIMEOUT ((uint32_t)(1000))
|
||||||
|
/* Timeout for write based on max write which is EEPROM_PAGESIZE bytes: EEPROM_PAGESIZE * BSP_I2C_SPEED (320us)*/
|
||||||
|
#define EEPROM_WRITE_TIMEOUT ((uint32_t)(1))
|
||||||
|
|
||||||
|
/* Maximum number of trials for EEPROM_WaitEepromStandbyState() function */
|
||||||
|
#define EEPROM_MAX_TRIALS 300
|
||||||
|
|
||||||
|
#define EEPROM_OK 0
|
||||||
|
#define EEPROM_FAIL 1
|
||||||
|
#define EEPROM_TIMEOUT 2
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @defgroup STM32F429I_DISCOVERY_EEPROM_Exported_Macros STM32F429I DISCOVERY EEPROM Exported Macros
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @defgroup STM32F429I_DISCOVERY_EEPROM_Exported_Functions STM32F429I DISCOVERY EEPROM Exported Functions
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
uint32_t BSP_EEPROM_Init(void);
|
||||||
|
uint32_t BSP_EEPROM_ReadBuffer(uint8_t *pBuffer, uint16_t ReadAddr, uint16_t *NumByteToRead);
|
||||||
|
uint32_t BSP_EEPROM_WritePage(uint8_t *pBuffer, uint16_t WriteAddr, uint8_t *NumByteToWrite);
|
||||||
|
uint32_t BSP_EEPROM_WriteBuffer(uint8_t *pBuffer, uint16_t WriteAddr, uint16_t NumByteToWrite);
|
||||||
|
uint32_t BSP_EEPROM_WaitEepromStandbyState(void);
|
||||||
|
|
||||||
|
/* USER Callbacks: This function is declared as __weak in EEPROM driver and
|
||||||
|
should be implemented into user application.
|
||||||
|
BSP_EEPROM_TIMEOUT_UserCallback() function is called whenever a timeout condition
|
||||||
|
occurs during communication (waiting on an event that doesn't occur, bus
|
||||||
|
errors, busy devices ...). */
|
||||||
|
void BSP_EEPROM_TIMEOUT_UserCallback(void);
|
||||||
|
|
||||||
|
|
||||||
|
/* Link function for I2C EEPROM peripheral */
|
||||||
|
void EEPROM_IO_Init(void);
|
||||||
|
HAL_StatusTypeDef EEPROM_IO_WriteData(uint16_t DevAddress, uint16_t MemAddress, uint8_t *pBuffer, uint32_t BufferSize);
|
||||||
|
HAL_StatusTypeDef EEPROM_IO_ReadData(uint16_t DevAddress, uint16_t MemAddress, uint8_t *pBuffer, uint32_t BufferSize);
|
||||||
|
HAL_StatusTypeDef EEPROM_IO_IsDeviceReady(uint16_t DevAddress, uint32_t Trials);
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* __STM32F429I_DISCOVERY_EEPROM_H */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
@@ -0,0 +1,273 @@
|
|||||||
|
/**
|
||||||
|
******************************************************************************
|
||||||
|
* @file stm32f429i_discovery_gyroscope.c
|
||||||
|
* @author MCD Application Team
|
||||||
|
* @brief This file provides a set of functions needed to manage the
|
||||||
|
* MEMS gyroscope available on STM32F429I-Discovery Kit.
|
||||||
|
******************************************************************************
|
||||||
|
* @attention
|
||||||
|
*
|
||||||
|
* Copyright (c) 2017 STMicroelectronics.
|
||||||
|
* All rights reserved.
|
||||||
|
*
|
||||||
|
* This software is licensed under terms that can be found in the LICENSE file
|
||||||
|
* in the root directory of this software component.
|
||||||
|
* If no LICENSE file comes with this software, it is provided AS-IS.
|
||||||
|
*
|
||||||
|
******************************************************************************
|
||||||
|
*/
|
||||||
|
/* Includes ------------------------------------------------------------------*/
|
||||||
|
#include "stm32f429i_discovery_gyroscope.h"
|
||||||
|
|
||||||
|
/** @addtogroup BSP
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @addtogroup STM32F429I_DISCOVERY
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @defgroup STM32F429I_DISCOVERY_GYROSCOPE STM32F429I DISCOVERY GYROSCOPE
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @defgroup STM32F429I_DISCOVERY_GYROSCOPE_Private_TypesDefinitions STM32F429I DISCOVERY GYROSCOPE Private TypesDefinitions
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @defgroup STM32F429I_DISCOVERY_GYROSCOPE_Private_Defines STM32F429I DISCOVERY GYROSCOPE Private Defines
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @defgroup STM32F429I_DISCOVERY_GYROSCOPE_Private_Macros STM32F429I DISCOVERY GYROSCOPE Private Macros
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @defgroup STM32F429I_DISCOVERY_GYROSCOPE_Private_Variables STM32F429I DISCOVERY GYROSCOPE Private Variables
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
static GYRO_DrvTypeDef *GyroscopeDrv;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @defgroup STM32F429I_DISCOVERY_GYROSCOPE_Private_FunctionPrototypes STM32F429I DISCOVERY GYROSCOPE Private FunctionPrototypes
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @defgroup STM32F429I_DISCOVERY_GYROSCOPE_Private_Functions STM32F429I DISCOVERY GYROSCOPE Private Functions
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Set gyroscope Initialization.
|
||||||
|
* @retval GYRO_OK if no problem during initialization
|
||||||
|
*/
|
||||||
|
uint8_t BSP_GYRO_Init(void)
|
||||||
|
{
|
||||||
|
uint8_t ret = GYRO_ERROR;
|
||||||
|
uint16_t ctrl = 0x0000;
|
||||||
|
GYRO_InitTypeDef Gyro_InitStructure;
|
||||||
|
GYRO_FilterConfigTypeDef Gyro_FilterStructure = {0, 0};
|
||||||
|
|
||||||
|
if ((L3gd20Drv.ReadID() == I_AM_L3GD20) || (L3gd20Drv.ReadID() == I_AM_L3GD20_TR))
|
||||||
|
{
|
||||||
|
/* Initialize the gyroscope driver structure */
|
||||||
|
GyroscopeDrv = &L3gd20Drv;
|
||||||
|
|
||||||
|
/* MEMS configuration ----------------------------------------------------*/
|
||||||
|
/* Fill the gyroscope structure */
|
||||||
|
Gyro_InitStructure.Power_Mode = L3GD20_MODE_ACTIVE;
|
||||||
|
Gyro_InitStructure.Output_DataRate = L3GD20_OUTPUT_DATARATE_1;
|
||||||
|
Gyro_InitStructure.Axes_Enable = L3GD20_AXES_ENABLE;
|
||||||
|
Gyro_InitStructure.Band_Width = L3GD20_BANDWIDTH_4;
|
||||||
|
Gyro_InitStructure.BlockData_Update = L3GD20_BlockDataUpdate_Continous;
|
||||||
|
Gyro_InitStructure.Endianness = L3GD20_BLE_LSB;
|
||||||
|
Gyro_InitStructure.Full_Scale = L3GD20_FULLSCALE_500;
|
||||||
|
|
||||||
|
/* Configure MEMS: data rate, power mode, full scale and axes */
|
||||||
|
ctrl = (uint16_t)(Gyro_InitStructure.Power_Mode | Gyro_InitStructure.Output_DataRate | \
|
||||||
|
Gyro_InitStructure.Axes_Enable | Gyro_InitStructure.Band_Width);
|
||||||
|
|
||||||
|
ctrl |= (uint16_t)((Gyro_InitStructure.BlockData_Update | Gyro_InitStructure.Endianness | \
|
||||||
|
Gyro_InitStructure.Full_Scale) << 8);
|
||||||
|
|
||||||
|
/* Initialize the gyroscope */
|
||||||
|
GyroscopeDrv->Init(ctrl);
|
||||||
|
|
||||||
|
Gyro_FilterStructure.HighPassFilter_Mode_Selection = L3GD20_HPM_NORMAL_MODE_RES;
|
||||||
|
Gyro_FilterStructure.HighPassFilter_CutOff_Frequency = L3GD20_HPFCF_0;
|
||||||
|
|
||||||
|
ctrl = (uint8_t)((Gyro_FilterStructure.HighPassFilter_Mode_Selection | \
|
||||||
|
Gyro_FilterStructure.HighPassFilter_CutOff_Frequency));
|
||||||
|
|
||||||
|
/* Configure the gyroscope main parameters */
|
||||||
|
GyroscopeDrv->FilterConfig(ctrl) ;
|
||||||
|
|
||||||
|
GyroscopeDrv->FilterCmd(L3GD20_HIGHPASSFILTER_ENABLE);
|
||||||
|
|
||||||
|
ret = GYRO_OK;
|
||||||
|
}
|
||||||
|
#if defined(USE_STM32F429I_DISCOVERY_REVD)
|
||||||
|
else if (I3g4250Drv.ReadID() == I_AM_I3G4250D)
|
||||||
|
{
|
||||||
|
/* Initialize the gyroscope driver structure */
|
||||||
|
GyroscopeDrv = &I3g4250Drv;
|
||||||
|
|
||||||
|
/* Configure Mems : data rate, power mode, full scale and axes */
|
||||||
|
Gyro_InitStructure.Power_Mode = I3G4250D_MODE_ACTIVE;
|
||||||
|
Gyro_InitStructure.Output_DataRate = I3G4250D_OUTPUT_DATARATE_1;
|
||||||
|
Gyro_InitStructure.Axes_Enable = I3G4250D_AXES_ENABLE;
|
||||||
|
Gyro_InitStructure.Band_Width = I3G4250D_BANDWIDTH_4;
|
||||||
|
Gyro_InitStructure.BlockData_Update = I3G4250D_BlockDataUpdate_Continous;
|
||||||
|
Gyro_InitStructure.Endianness = I3G4250D_BLE_LSB;
|
||||||
|
Gyro_InitStructure.Full_Scale = I3G4250D_FULLSCALE_500;
|
||||||
|
|
||||||
|
/* Configure MEMS: data rate, power mode, full scale and axes */
|
||||||
|
ctrl = (uint16_t)(Gyro_InitStructure.Power_Mode | Gyro_InitStructure.Output_DataRate | \
|
||||||
|
Gyro_InitStructure.Axes_Enable | Gyro_InitStructure.Band_Width);
|
||||||
|
|
||||||
|
ctrl |= (uint16_t)((Gyro_InitStructure.BlockData_Update | Gyro_InitStructure.Endianness | \
|
||||||
|
Gyro_InitStructure.Full_Scale) << 8);
|
||||||
|
|
||||||
|
/* Initialize the gyroscope */
|
||||||
|
GyroscopeDrv->Init(ctrl);
|
||||||
|
|
||||||
|
Gyro_FilterStructure.HighPassFilter_Mode_Selection = I3G4250D_HPM_NORMAL_MODE_RES;
|
||||||
|
Gyro_FilterStructure.HighPassFilter_CutOff_Frequency = I3G4250D_HPFCF_0;
|
||||||
|
|
||||||
|
ctrl = (uint8_t)((Gyro_FilterStructure.HighPassFilter_Mode_Selection | \
|
||||||
|
Gyro_FilterStructure.HighPassFilter_CutOff_Frequency));
|
||||||
|
|
||||||
|
/* Configure the gyroscope main parameters */
|
||||||
|
GyroscopeDrv->FilterConfig(ctrl);
|
||||||
|
|
||||||
|
GyroscopeDrv->FilterCmd(I3G4250D_HIGHPASSFILTER_ENABLE);
|
||||||
|
|
||||||
|
ret = GYRO_OK;
|
||||||
|
}
|
||||||
|
#endif /* USE_STM32F429I_DISCOVERY_REVD */
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Read ID of gyroscope component.
|
||||||
|
* @retval ID
|
||||||
|
*/
|
||||||
|
uint8_t BSP_GYRO_ReadID(void)
|
||||||
|
{
|
||||||
|
uint8_t id = 0x00;
|
||||||
|
|
||||||
|
if (GyroscopeDrv->ReadID != NULL)
|
||||||
|
{
|
||||||
|
id = GyroscopeDrv->ReadID();
|
||||||
|
}
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Reboot memory content of Gyroscope.
|
||||||
|
*/
|
||||||
|
void BSP_GYRO_Reset(void)
|
||||||
|
{
|
||||||
|
if (GyroscopeDrv->Reset != NULL)
|
||||||
|
{
|
||||||
|
GyroscopeDrv->Reset();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Configures INT1 interrupt.
|
||||||
|
* @param pIntConfig: pointer to a L3GD20_InterruptConfig_TypeDef
|
||||||
|
* structure that contains the configuration setting for the L3GD20 Interrupt.
|
||||||
|
*/
|
||||||
|
void BSP_GYRO_ITConfig(GYRO_InterruptConfigTypeDef *pIntConfig)
|
||||||
|
{
|
||||||
|
uint16_t interruptconfig = 0x0000;
|
||||||
|
|
||||||
|
if (GyroscopeDrv->ConfigIT != NULL)
|
||||||
|
{
|
||||||
|
/* Configure latch Interrupt request and axe interrupts */
|
||||||
|
interruptconfig |= ((uint8_t)(pIntConfig->Latch_Request | \
|
||||||
|
pIntConfig->Interrupt_Axes) << 8);
|
||||||
|
|
||||||
|
interruptconfig |= (uint8_t)(pIntConfig->Interrupt_ActiveEdge);
|
||||||
|
|
||||||
|
GyroscopeDrv->ConfigIT(interruptconfig);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables INT1 or INT2 interrupt.
|
||||||
|
* @param IntPin: Interrupt pin
|
||||||
|
* This parameter can be:
|
||||||
|
* @arg L3GD20_INT1
|
||||||
|
* @arg L3GD20_INT2
|
||||||
|
* @arg I3G4250D_INT1
|
||||||
|
* @arg I3G4250D_INT2
|
||||||
|
*/
|
||||||
|
void BSP_GYRO_EnableIT(uint8_t IntPin)
|
||||||
|
{
|
||||||
|
if (GyroscopeDrv->EnableIT != NULL)
|
||||||
|
{
|
||||||
|
GyroscopeDrv->EnableIT(IntPin);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Disables INT1 or INT2 interrupt.
|
||||||
|
* @param IntPin: Interrupt pin
|
||||||
|
* This parameter can be:
|
||||||
|
* @arg L3GD20_INT1
|
||||||
|
* @arg L3GD20_INT2
|
||||||
|
* @arg I3G4250D_INT1
|
||||||
|
* @arg I3G4250D_INT2
|
||||||
|
*/
|
||||||
|
void BSP_GYRO_DisableIT(uint8_t IntPin)
|
||||||
|
{
|
||||||
|
if (GyroscopeDrv->DisableIT != NULL)
|
||||||
|
{
|
||||||
|
GyroscopeDrv->DisableIT(IntPin);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Get XYZ angular acceleration.
|
||||||
|
* @param pfData: pointer on floating array
|
||||||
|
*/
|
||||||
|
void BSP_GYRO_GetXYZ(float *pfData)
|
||||||
|
{
|
||||||
|
if (GyroscopeDrv->GetXYZ != NULL)
|
||||||
|
{
|
||||||
|
GyroscopeDrv->GetXYZ(pfData);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
@@ -0,0 +1,106 @@
|
|||||||
|
/**
|
||||||
|
******************************************************************************
|
||||||
|
* @file stm32f429i_discovery_gyroscope.h
|
||||||
|
* @author MCD Application Team
|
||||||
|
* @brief This file contains definitions for stm32f429i_discovery_gyroscope.c
|
||||||
|
* firmware driver.
|
||||||
|
******************************************************************************
|
||||||
|
* @attention
|
||||||
|
*
|
||||||
|
* Copyright (c) 2017 STMicroelectronics.
|
||||||
|
* All rights reserved.
|
||||||
|
*
|
||||||
|
* This software is licensed under terms that can be found in the LICENSE file
|
||||||
|
* in the root directory of this software component.
|
||||||
|
* If no LICENSE file comes with this software, it is provided AS-IS.
|
||||||
|
*
|
||||||
|
******************************************************************************
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Define to prevent recursive inclusion -------------------------------------*/
|
||||||
|
#ifndef __STM32F429I_DISCOVERY_GYROSCOPE_H
|
||||||
|
#define __STM32F429I_DISCOVERY_GYROSCOPE_H
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Includes ------------------------------------------------------------------*/
|
||||||
|
#include "stm32f429i_discovery.h"
|
||||||
|
/* Include Gyroscope component driver */
|
||||||
|
#include "../Components/l3gd20/l3gd20.h"
|
||||||
|
#if defined(USE_STM32F429I_DISCOVERY_REVD)
|
||||||
|
#include "../Components/i3g4250d/i3g4250d.h"
|
||||||
|
#endif /* USE_STM32F429I_DISCOVERY_REVD */
|
||||||
|
/** @addtogroup BSP
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @addtogroup STM32F429I_DISCOVERY
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @addtogroup STM32F429I_DISCOVERY_GYROSCOPE
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @defgroup STM32F429I_DISCOVERY_GYROSCOPE_Exported_Types STM32F429I DISCOVERY GYROSCOPE Exported Types
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
typedef enum
|
||||||
|
{
|
||||||
|
GYRO_OK = 0,
|
||||||
|
GYRO_ERROR = 1,
|
||||||
|
GYRO_TIMEOUT = 2
|
||||||
|
} GYRO_StatusTypeDef;
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @defgroup STM32F429I_DISCOVERY_GYROSCOPE_Exported_Constants STM32F429I DISCOVERY GYROSCOPE Exported Constants
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @defgroup STM32F429I_DISCOVERY_GYROSCOPE_Exported_Macros STM32F429I DISCOVERY GYROSCOPE Exported Macros
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @defgroup STM32F429I_DISCOVERY_GYROSCOPE_Exported_Functions STM32F429I DISCOVERY GYROSCOPE Exported Functions
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
/* Gyroscope Functions */
|
||||||
|
uint8_t BSP_GYRO_Init(void);
|
||||||
|
void BSP_GYRO_Reset(void);
|
||||||
|
uint8_t BSP_GYRO_ReadID(void);
|
||||||
|
void BSP_GYRO_ITConfig(GYRO_InterruptConfigTypeDef *pIntConfigStruct);
|
||||||
|
void BSP_GYRO_EnableIT(uint8_t IntPin);
|
||||||
|
void BSP_GYRO_DisableIT(uint8_t IntPin);
|
||||||
|
void BSP_GYRO_GetXYZ(float *pfData);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* __STM32F429I_DISCOVERY_GYROSCOPE_H */
|
||||||
@@ -0,0 +1,204 @@
|
|||||||
|
/**
|
||||||
|
******************************************************************************
|
||||||
|
* @file stm32f429i_discovery_io.c
|
||||||
|
* @author MCD Application Team
|
||||||
|
* @brief This file provides a set of functions needed to manage the STMPE811
|
||||||
|
* IO Expander device mounted on STM32F429I-Discovery Kit.
|
||||||
|
******************************************************************************
|
||||||
|
* @attention
|
||||||
|
*
|
||||||
|
* Copyright (c) 2017 STMicroelectronics.
|
||||||
|
* All rights reserved.
|
||||||
|
*
|
||||||
|
* This software is licensed under terms that can be found in the LICENSE file
|
||||||
|
* in the root directory of this software component.
|
||||||
|
* If no LICENSE file comes with this software, it is provided AS-IS.
|
||||||
|
*
|
||||||
|
******************************************************************************
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Includes ------------------------------------------------------------------*/
|
||||||
|
#include "stm32f429i_discovery_io.h"
|
||||||
|
|
||||||
|
/** @addtogroup BSP
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @addtogroup STM32F429I_DISCOVERY
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @defgroup STM32F429I_DISCOVERY_IO STM32F429I DISCOVERY IO
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @defgroup STM32F429I_DISCOVERY_IO_Private_Types_Definitions STM32F429I DISCOVERY IO Private Types Definitions
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @defgroup STM32F429I_DISCOVERY_IO_Private_Defines STM32F429I DISCOVERY IO Private Defines
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @defgroup STM32F429I_DISCOVERY_IO_Private_Macros STM32F429I DISCOVERY IO Private Macros
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
/** @defgroup STM32F429I_DISCOVERY_IO_Private_Variables STM32F429I DISCOVERY IO Private Variables
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
static IO_DrvTypeDef *IoDrv;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
/** @defgroup STM32F429I_DISCOVERY_IO_Private_Function_Prototypes STM32F429I DISCOVERY IO Private Function Prototypes
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @defgroup STM32F429I_DISCOVERY_IO_Private_Functions STM32F429I DISCOVERY IO Private Functions
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Initializes and configures the IO functionalities and configures all
|
||||||
|
* necessary hardware resources (GPIOs, clocks..).
|
||||||
|
* @note BSP_IO_Init() is using HAL_Delay() function to ensure that stmpe811
|
||||||
|
* IO Expander is correctly reset. HAL_Delay() function provides accurate
|
||||||
|
* delay (in milliseconds) based on variable incremented in SysTick ISR.
|
||||||
|
* This implies that if BSP_IO_Init() is called from a peripheral ISR process,
|
||||||
|
* then the SysTick interrupt must have higher priority (numerically lower)
|
||||||
|
* than the peripheral interrupt. Otherwise the caller ISR process will be blocked.
|
||||||
|
* @retval IO_OK if all initializations done correctly. Other value if error.
|
||||||
|
*/
|
||||||
|
uint8_t BSP_IO_Init(void)
|
||||||
|
{
|
||||||
|
uint8_t ret = IO_ERROR;
|
||||||
|
|
||||||
|
/* Read ID and verify the IO expander is ready */
|
||||||
|
if (stmpe811_io_drv.ReadID(IO_I2C_ADDRESS) == STMPE811_ID)
|
||||||
|
{
|
||||||
|
/* Initialize the IO driver structure */
|
||||||
|
IoDrv = &stmpe811_io_drv;
|
||||||
|
ret = IO_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ret == IO_OK)
|
||||||
|
{
|
||||||
|
IoDrv->Init(IO_I2C_ADDRESS);
|
||||||
|
IoDrv->Start(IO_I2C_ADDRESS, IO_PIN_ALL);
|
||||||
|
}
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Gets the selected pins IT status.
|
||||||
|
* @param IoPin: The selected pins to check the status.
|
||||||
|
* This parameter could be any combination of the IO pins.
|
||||||
|
* @retval Status of IO Pin checked.
|
||||||
|
*/
|
||||||
|
uint8_t BSP_IO_ITGetStatus(uint16_t IoPin)
|
||||||
|
{
|
||||||
|
/* Return the IO Pin IT status */
|
||||||
|
return (IoDrv->ITStatus(IO_I2C_ADDRESS, IoPin));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Clears all the IO IT pending bits
|
||||||
|
*/
|
||||||
|
void BSP_IO_ITClear(void)
|
||||||
|
{
|
||||||
|
/* Clear all IO IT pending bits */
|
||||||
|
IoDrv->ClearIT(IO_I2C_ADDRESS, IO_PIN_ALL);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Configures the IO pin(s) according to IO mode structure value.
|
||||||
|
* @param IoPin: IO pin(s) to be configured.
|
||||||
|
* This parameter could be any combination of the following values:
|
||||||
|
* @arg STMPE811_PIN_x: where x can be from 0 to 7.
|
||||||
|
* @param IoMode: The IO pin mode to configure, could be one of the following values:
|
||||||
|
* @arg IO_MODE_INPUT
|
||||||
|
* @arg IO_MODE_OUTPUT
|
||||||
|
* @arg IO_MODE_IT_RISING_EDGE
|
||||||
|
* @arg IO_MODE_IT_FALLING_EDGE
|
||||||
|
* @arg IO_MODE_IT_LOW_LEVEL
|
||||||
|
* @arg IO_MODE_IT_HIGH_LEVEL
|
||||||
|
*/
|
||||||
|
void BSP_IO_ConfigPin(uint16_t IoPin, IO_ModeTypedef IoMode)
|
||||||
|
{
|
||||||
|
/* Configure the selected IO pin(s) mode */
|
||||||
|
IoDrv->Config(IO_I2C_ADDRESS, IoPin, IoMode);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Sets the selected pins state.
|
||||||
|
* @param IoPin: The selected pins to write.
|
||||||
|
* This parameter could be any combination of the IO pins.
|
||||||
|
* @param PinState: the new pins state to write
|
||||||
|
*/
|
||||||
|
void BSP_IO_WritePin(uint16_t IoPin, uint8_t PinState)
|
||||||
|
{
|
||||||
|
/* Set the Pin state */
|
||||||
|
IoDrv->WritePin(IO_I2C_ADDRESS, IoPin, PinState);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Gets the selected pins current state.
|
||||||
|
* @param IoPin: The selected pins to read.
|
||||||
|
* This parameter could be any combination of the IO pins.
|
||||||
|
* @retval The current pins state
|
||||||
|
*/
|
||||||
|
uint16_t BSP_IO_ReadPin(uint16_t IoPin)
|
||||||
|
{
|
||||||
|
return (IoDrv->ReadPin(IO_I2C_ADDRESS, IoPin));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Toggles the selected pins state.
|
||||||
|
* @param IoPin: The selected pins to toggle.
|
||||||
|
* This parameter could be any combination of the IO pins.
|
||||||
|
*/
|
||||||
|
void BSP_IO_TogglePin(uint16_t IoPin)
|
||||||
|
{
|
||||||
|
/* Toggle the current pin state */
|
||||||
|
if (IoDrv->ReadPin(IO_I2C_ADDRESS, IoPin) == 1 /* Set */)
|
||||||
|
{
|
||||||
|
IoDrv->WritePin(IO_I2C_ADDRESS, IoPin, 0 /* Reset */);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
IoDrv->WritePin(IO_I2C_ADDRESS, IoPin, 1 /* Set */);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
@@ -0,0 +1,112 @@
|
|||||||
|
/**
|
||||||
|
******************************************************************************
|
||||||
|
* @file stm32f429i_discovery_io.h
|
||||||
|
* @author MCD Application Team
|
||||||
|
* @brief This file contains all the functions prototypes for the
|
||||||
|
* stm32f429i_discovery_io.c driver.
|
||||||
|
******************************************************************************
|
||||||
|
* @attention
|
||||||
|
*
|
||||||
|
* Copyright (c) 2017 STMicroelectronics.
|
||||||
|
* All rights reserved.
|
||||||
|
*
|
||||||
|
* This software is licensed under terms that can be found in the LICENSE file
|
||||||
|
* in the root directory of this software component.
|
||||||
|
* If no LICENSE file comes with this software, it is provided AS-IS.
|
||||||
|
*
|
||||||
|
******************************************************************************
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Define to prevent recursive inclusion -------------------------------------*/
|
||||||
|
#ifndef __STM32F429I_DISCOVERY_IO_H
|
||||||
|
#define __STM32F429I_DISCOVERY_IO_H
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Includes ------------------------------------------------------------------*/
|
||||||
|
#include "stm32f429i_discovery.h"
|
||||||
|
/* Include IO component driver */
|
||||||
|
#include "../Components/stmpe811/stmpe811.h"
|
||||||
|
|
||||||
|
/** @addtogroup BSP
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @addtogroup STM32F429I_DISCOVERY
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @addtogroup STM32F429I_DISCOVERY_IO
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @defgroup STM32F429I_DISCOVERY_IO_Exported_Types STM32F429I DISCOVERY IO Exported Types
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
typedef enum
|
||||||
|
{
|
||||||
|
IO_OK = 0,
|
||||||
|
IO_ERROR = 1,
|
||||||
|
IO_TIMEOUT = 2
|
||||||
|
} IO_StatusTypeDef;
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @defgroup STM32F429I_DISCOVERY_IO_Exported_Constants STM32F429I DISCOVERY IO Exported Constants
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
#define IO_PIN_0 0x01
|
||||||
|
#define IO_PIN_1 0x02
|
||||||
|
#define IO_PIN_2 0x04
|
||||||
|
#define IO_PIN_3 0x08
|
||||||
|
#define IO_PIN_4 0x10
|
||||||
|
#define IO_PIN_5 0x20
|
||||||
|
#define IO_PIN_6 0x40
|
||||||
|
#define IO_PIN_7 0x80
|
||||||
|
#define IO_PIN_ALL 0xFF
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @defgroup STM32F429I_DISCOVERY_IO_Exported_Macros STM32F429I DISCOVERY IO Exported Macros
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @defgroup STM32F429I_DISCOVERY_IO_Exported_Functions STM32F429I DISCOVERY IO Exported Functions
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
uint8_t BSP_IO_Init(void);
|
||||||
|
uint8_t BSP_IO_ITGetStatus(uint16_t IoPin);
|
||||||
|
void BSP_IO_ITClear(void);
|
||||||
|
void BSP_IO_ConfigPin(uint16_t IoPin, IO_ModeTypedef IoMode);
|
||||||
|
void BSP_IO_WritePin(uint16_t IoPin, uint8_t PinState);
|
||||||
|
uint16_t BSP_IO_ReadPin(uint16_t IoPin);
|
||||||
|
void BSP_IO_TogglePin(uint16_t IoPin);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* __STM32F429I_DISCOVERY_IO_H */
|
||||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,246 @@
|
|||||||
|
/**
|
||||||
|
******************************************************************************
|
||||||
|
* @file stm32f429i_discovery_lcd.h
|
||||||
|
* @author MCD Application Team
|
||||||
|
* @brief This file contains all the functions prototypes for the
|
||||||
|
* stm32f429i_discovery_lcd.c driver.
|
||||||
|
******************************************************************************
|
||||||
|
* @attention
|
||||||
|
*
|
||||||
|
* Copyright (c) 2017 STMicroelectronics.
|
||||||
|
* All rights reserved.
|
||||||
|
*
|
||||||
|
* This software is licensed under terms that can be found in the LICENSE file
|
||||||
|
* in the root directory of this software component.
|
||||||
|
* If no LICENSE file comes with this software, it is provided AS-IS.
|
||||||
|
*
|
||||||
|
******************************************************************************
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Define to prevent recursive inclusion -------------------------------------*/
|
||||||
|
#ifndef __STM32F429I_DISCOVERY_LCD_H
|
||||||
|
#define __STM32F429I_DISCOVERY_LCD_H
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Includes ------------------------------------------------------------------*/
|
||||||
|
#include "stm32f429i_discovery.h"
|
||||||
|
/* Include SDRAM Driver */
|
||||||
|
#include "stm32f429i_discovery_sdram.h"
|
||||||
|
#include "../../../Utilities/Fonts/fonts.h"
|
||||||
|
/* Include LCD component driver */
|
||||||
|
#include "../Components/ili9341/ili9341.h"
|
||||||
|
|
||||||
|
/** @addtogroup BSP
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @addtogroup STM32F429I_DISCOVERY
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @addtogroup STM32F429I_DISCOVERY_LCD
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @defgroup STM32F429I_DISCOVERY_LCD_Exported_Types STM32F429I DISCOVERY LCD Exported Types
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
typedef enum
|
||||||
|
{
|
||||||
|
LCD_OK = 0,
|
||||||
|
LCD_ERROR = 1,
|
||||||
|
LCD_TIMEOUT = 2
|
||||||
|
} LCD_StatusTypeDef;
|
||||||
|
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
uint32_t TextColor;
|
||||||
|
uint32_t BackColor;
|
||||||
|
sFONT *pFont;
|
||||||
|
} LCD_DrawPropTypeDef;
|
||||||
|
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
int16_t X;
|
||||||
|
int16_t Y;
|
||||||
|
} Point, * pPoint;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Line mode structures definition
|
||||||
|
*/
|
||||||
|
typedef enum
|
||||||
|
{
|
||||||
|
CENTER_MODE = 0x01, /* center mode */
|
||||||
|
RIGHT_MODE = 0x02, /* right mode */
|
||||||
|
LEFT_MODE = 0x03, /* left mode */
|
||||||
|
} Text_AlignModeTypdef;
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @defgroup STM32F429I_DISCOVERY_LCD_Exported_Constants STM32F429I DISCOVERY LCD Exported Constants
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
#define LCD_LayerCfgTypeDef LTDC_LayerCfgTypeDef
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief LCD status structure definition
|
||||||
|
*/
|
||||||
|
#define MAX_LAYER_NUMBER 2
|
||||||
|
#define LCD_FRAME_BUFFER ((uint32_t)0xD0000000)
|
||||||
|
#define BUFFER_OFFSET ((uint32_t)0x50000)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief LCD color
|
||||||
|
*/
|
||||||
|
#define LCD_COLOR_BLUE 0xFF0000FF
|
||||||
|
#define LCD_COLOR_GREEN 0xFF00FF00
|
||||||
|
#define LCD_COLOR_RED 0xFFFF0000
|
||||||
|
#define LCD_COLOR_CYAN 0xFF00FFFF
|
||||||
|
#define LCD_COLOR_MAGENTA 0xFFFF00FF
|
||||||
|
#define LCD_COLOR_YELLOW 0xFFFFFF00
|
||||||
|
#define LCD_COLOR_LIGHTBLUE 0xFF8080FF
|
||||||
|
#define LCD_COLOR_LIGHTGREEN 0xFF80FF80
|
||||||
|
#define LCD_COLOR_LIGHTRED 0xFFFF8080
|
||||||
|
#define LCD_COLOR_LIGHTCYAN 0xFF80FFFF
|
||||||
|
#define LCD_COLOR_LIGHTMAGENTA 0xFFFF80FF
|
||||||
|
#define LCD_COLOR_LIGHTYELLOW 0xFFFFFF80
|
||||||
|
#define LCD_COLOR_DARKBLUE 0xFF000080
|
||||||
|
#define LCD_COLOR_DARKGREEN 0xFF008000
|
||||||
|
#define LCD_COLOR_DARKRED 0xFF800000
|
||||||
|
#define LCD_COLOR_DARKCYAN 0xFF008080
|
||||||
|
#define LCD_COLOR_DARKMAGENTA 0xFF800080
|
||||||
|
#define LCD_COLOR_DARKYELLOW 0xFF808000
|
||||||
|
#define LCD_COLOR_WHITE 0xFFFFFFFF
|
||||||
|
#define LCD_COLOR_LIGHTGRAY 0xFFD3D3D3
|
||||||
|
#define LCD_COLOR_GRAY 0xFF808080
|
||||||
|
#define LCD_COLOR_DARKGRAY 0xFF404040
|
||||||
|
#define LCD_COLOR_BLACK 0xFF000000
|
||||||
|
#define LCD_COLOR_BROWN 0xFFA52A2A
|
||||||
|
#define LCD_COLOR_ORANGE 0xFFFFA500
|
||||||
|
#define LCD_COLOR_TRANSPARENT 0xFF000000
|
||||||
|
/**
|
||||||
|
* @brief LCD default font
|
||||||
|
*/
|
||||||
|
#define LCD_DEFAULT_FONT Font24
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief LCD Reload Types
|
||||||
|
*/
|
||||||
|
#define LCD_RELOAD_IMMEDIATE ((uint32_t)LTDC_SRCR_IMR)
|
||||||
|
#define LCD_RELOAD_VERTICAL_BLANKING ((uint32_t)LTDC_SRCR_VBR)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief LCD Layer
|
||||||
|
*/
|
||||||
|
#define LCD_BACKGROUND_LAYER 0x0000
|
||||||
|
#define LCD_FOREGROUND_LAYER 0x0001
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @defgroup STM32F429I_DISCOVERY_LCD_Exported_Macros STM32F429I DISCOVERY LCD Exported Macros
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
* @brief LCD Pixel format
|
||||||
|
*/
|
||||||
|
#define LCD_PIXEL_FORMAT_ARGB8888 LTDC_PIXEL_FORMAT_ARGB8888
|
||||||
|
#define LCD_PIXEL_FORMAT_RGB888 LTDC_PIXEL_FORMAT_RGB888
|
||||||
|
#define LCD_PIXEL_FORMAT_RGB565 LTDC_PIXEL_FORMAT_RGB565
|
||||||
|
#define LCD_PIXEL_FORMAT_ARGB1555 LTDC_PIXEL_FORMAT_ARGB1555
|
||||||
|
#define LCD_PIXEL_FORMAT_ARGB4444 LTDC_PIXEL_FORMAT_ARGB4444
|
||||||
|
#define LCD_PIXEL_FORMAT_L8 LTDC_PIXEL_FORMAT_L8
|
||||||
|
#define LCD_PIXEL_FORMAT_AL44 LTDC_PIXEL_FORMAT_AL44
|
||||||
|
#define LCD_PIXEL_FORMAT_AL88 LTDC_PIXEL_FORMAT_AL88
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @defgroup STM32F429I_DISCOVERY_LCD_Exported_Functions STM32F429I DISCOVERY LCD Exported Functions
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
uint8_t BSP_LCD_Init(void);
|
||||||
|
uint32_t BSP_LCD_GetXSize(void);
|
||||||
|
uint32_t BSP_LCD_GetYSize(void);
|
||||||
|
|
||||||
|
/* functions using the LTDC controller */
|
||||||
|
void BSP_LCD_LayerDefaultInit(uint16_t LayerIndex, uint32_t FrameBuffer);
|
||||||
|
void BSP_LCD_SetTransparency(uint32_t LayerIndex, uint8_t Transparency);
|
||||||
|
void BSP_LCD_SetTransparency_NoReload(uint32_t LayerIndex, uint8_t Transparency);
|
||||||
|
void BSP_LCD_SetLayerAddress(uint32_t LayerIndex, uint32_t Address);
|
||||||
|
void BSP_LCD_SetLayerAddress_NoReload(uint32_t LayerIndex, uint32_t Address);
|
||||||
|
void BSP_LCD_SetColorKeying(uint32_t LayerIndex, uint32_t RGBValue);
|
||||||
|
void BSP_LCD_SetColorKeying_NoReload(uint32_t LayerIndex, uint32_t RGBValue);
|
||||||
|
void BSP_LCD_ResetColorKeying(uint32_t LayerIndex);
|
||||||
|
void BSP_LCD_ResetColorKeying_NoReload(uint32_t LayerIndex);
|
||||||
|
void BSP_LCD_SetLayerWindow(uint16_t LayerIndex, uint16_t Xpos, uint16_t Ypos, uint16_t Width, uint16_t Height);
|
||||||
|
void BSP_LCD_SetLayerWindow_NoReload(uint16_t LayerIndex, uint16_t Xpos, uint16_t Ypos, uint16_t Width,
|
||||||
|
uint16_t Height);
|
||||||
|
void BSP_LCD_SelectLayer(uint32_t LayerIndex);
|
||||||
|
void BSP_LCD_SetLayerVisible(uint32_t LayerIndex, FunctionalState state);
|
||||||
|
void BSP_LCD_SetLayerVisible_NoReload(uint32_t LayerIndex, FunctionalState State);
|
||||||
|
void BSP_LCD_Relaod(uint32_t ReloadType);
|
||||||
|
|
||||||
|
void BSP_LCD_SetTextColor(uint32_t Color);
|
||||||
|
void BSP_LCD_SetBackColor(uint32_t Color);
|
||||||
|
uint32_t BSP_LCD_GetTextColor(void);
|
||||||
|
uint32_t BSP_LCD_GetBackColor(void);
|
||||||
|
void BSP_LCD_SetFont(sFONT *pFonts);
|
||||||
|
sFONT *BSP_LCD_GetFont(void);
|
||||||
|
|
||||||
|
uint32_t BSP_LCD_ReadPixel(uint16_t Xpos, uint16_t Ypos);
|
||||||
|
void BSP_LCD_DrawPixel(uint16_t Xpos, uint16_t Ypos, uint32_t pixel);
|
||||||
|
void BSP_LCD_Clear(uint32_t Color);
|
||||||
|
void BSP_LCD_ClearStringLine(uint32_t Line);
|
||||||
|
void BSP_LCD_DisplayStringAtLine(uint16_t Line, uint8_t *ptr);
|
||||||
|
void BSP_LCD_DisplayStringAt(uint16_t X, uint16_t Y, uint8_t *pText, Text_AlignModeTypdef mode);
|
||||||
|
void BSP_LCD_DisplayChar(uint16_t Xpos, uint16_t Ypos, uint8_t Ascii);
|
||||||
|
|
||||||
|
void BSP_LCD_DrawHLine(uint16_t Xpos, uint16_t Ypos, uint16_t Length);
|
||||||
|
void BSP_LCD_DrawVLine(uint16_t Xpos, uint16_t Ypos, uint16_t Length);
|
||||||
|
void BSP_LCD_DrawLine(uint16_t X1, uint16_t Y1, uint16_t X2, uint16_t Y2);
|
||||||
|
void BSP_LCD_DrawRect(uint16_t Xpos, uint16_t Ypos, uint16_t Width, uint16_t Height);
|
||||||
|
void BSP_LCD_DrawCircle(uint16_t Xpos, uint16_t Ypos, uint16_t Radius);
|
||||||
|
void BSP_LCD_DrawPolygon(pPoint Points, uint16_t PointCount);
|
||||||
|
void BSP_LCD_DrawEllipse(int Xpos, int Ypos, int XRadius, int YRadius);
|
||||||
|
void BSP_LCD_DrawBitmap(uint32_t X, uint32_t Y, uint8_t *pBmp);
|
||||||
|
|
||||||
|
void BSP_LCD_FillRect(uint16_t Xpos, uint16_t Ypos, uint16_t Width, uint16_t Height);
|
||||||
|
void BSP_LCD_FillCircle(uint16_t Xpos, uint16_t Ypos, uint16_t Radius);
|
||||||
|
void BSP_LCD_FillTriangle(uint16_t X1, uint16_t X2, uint16_t X3, uint16_t Y1, uint16_t Y2, uint16_t Y3);
|
||||||
|
void BSP_LCD_FillPolygon(pPoint Points, uint16_t PointCount);
|
||||||
|
void BSP_LCD_FillEllipse(int Xpos, int Ypos, int XRadius, int YRadius);
|
||||||
|
|
||||||
|
void BSP_LCD_DisplayOff(void);
|
||||||
|
void BSP_LCD_DisplayOn(void);
|
||||||
|
|
||||||
|
/* This function can be modified in case the current settings need to be changed
|
||||||
|
for specific application needs */
|
||||||
|
void BSP_LCD_MspInit(void);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* __STM32F429I_DISCOVERY_LCD_H */
|
||||||
@@ -0,0 +1,460 @@
|
|||||||
|
/**
|
||||||
|
******************************************************************************
|
||||||
|
* @file stm32f429i_discovery_sdram.c
|
||||||
|
* @author MCD Application Team
|
||||||
|
* @brief This file provides a set of functions needed to drive the
|
||||||
|
* IS42S16400J SDRAM memory mounted on STM32F429I-Discovery Kit.
|
||||||
|
******************************************************************************
|
||||||
|
* @attention
|
||||||
|
*
|
||||||
|
* Copyright (c) 2017 STMicroelectronics.
|
||||||
|
* All rights reserved.
|
||||||
|
*
|
||||||
|
* This software is licensed under terms that can be found in the LICENSE file
|
||||||
|
* in the root directory of this software component.
|
||||||
|
* If no LICENSE file comes with this software, it is provided AS-IS.
|
||||||
|
*
|
||||||
|
******************************************************************************
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Includes ------------------------------------------------------------------*/
|
||||||
|
#include "stm32f429i_discovery_sdram.h"
|
||||||
|
|
||||||
|
/** @addtogroup BSP
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @addtogroup STM32F429I_DISCOVERY
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @defgroup STM32F429I_DISCOVERY_SDRAM STM32F429I DISCOVERY SDRAM
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @defgroup STM32F429I_DISCOVERY_SDRAM_Private_Types_Definitions STM32F429I DISCOVERY SDRAM Private Types Definitions
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @defgroup STM32F429I_DISCOVERY_SDRAM_Private_Defines STM32F429I DISCOVERY SDRAM Private Defines
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @defgroup STM32F429I_DISCOVERY_SDRAM_Private_Macros STM32F429I DISCOVERY SDRAM Private Macros
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @defgroup STM32F429I_DISCOVERY_SDRAM_Private_Variables STM32F429I DISCOVERY SDRAM Private Variables
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
static SDRAM_HandleTypeDef SdramHandle;
|
||||||
|
static FMC_SDRAM_TimingTypeDef Timing;
|
||||||
|
static FMC_SDRAM_CommandTypeDef Command;
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @defgroup STM32F429I_DISCOVERY_SDRAM_Private_Function_Prototypes STM32F429I DISCOVERY SDRAM Private Function Prototypes
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @defgroup STM32F429I_DISCOVERY_SDRAM_Private_Functions STM32F429I DISCOVERY SDRAM Private Functions
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Initializes the SDRAM device.
|
||||||
|
*/
|
||||||
|
uint8_t BSP_SDRAM_Init(void)
|
||||||
|
{
|
||||||
|
static uint8_t sdramstatus = SDRAM_ERROR;
|
||||||
|
|
||||||
|
/* SDRAM device configuration */
|
||||||
|
SdramHandle.Instance = FMC_SDRAM_DEVICE;
|
||||||
|
|
||||||
|
/* FMC Configuration -------------------------------------------------------*/
|
||||||
|
/* FMC SDRAM Bank configuration */
|
||||||
|
/* Timing configuration for 90 Mhz of SD clock frequency (180Mhz/2) */
|
||||||
|
/* TMRD: 2 Clock cycles */
|
||||||
|
Timing.LoadToActiveDelay = 2;
|
||||||
|
/* TXSR: min=70ns (7x11.11ns) */
|
||||||
|
Timing.ExitSelfRefreshDelay = 7;
|
||||||
|
/* TRAS: min=42ns (4x11.11ns) max=120k (ns) */
|
||||||
|
Timing.SelfRefreshTime = 4;
|
||||||
|
/* TRC: min=70 (7x11.11ns) */
|
||||||
|
Timing.RowCycleDelay = 7;
|
||||||
|
/* TWR: min=1+ 7ns (1+1x11.11ns) */
|
||||||
|
Timing.WriteRecoveryTime = 2;
|
||||||
|
/* TRP: 20ns => 2x11.11ns*/
|
||||||
|
Timing.RPDelay = 2;
|
||||||
|
/* TRCD: 20ns => 2x11.11ns */
|
||||||
|
Timing.RCDDelay = 2;
|
||||||
|
|
||||||
|
/* FMC SDRAM control configuration */
|
||||||
|
SdramHandle.Init.SDBank = FMC_SDRAM_BANK2;
|
||||||
|
/* Row addressing: [7:0] */
|
||||||
|
SdramHandle.Init.ColumnBitsNumber = FMC_SDRAM_COLUMN_BITS_NUM_8;
|
||||||
|
/* Column addressing: [11:0] */
|
||||||
|
SdramHandle.Init.RowBitsNumber = FMC_SDRAM_ROW_BITS_NUM_12;
|
||||||
|
SdramHandle.Init.MemoryDataWidth = SDRAM_MEMORY_WIDTH;
|
||||||
|
SdramHandle.Init.InternalBankNumber = FMC_SDRAM_INTERN_BANKS_NUM_4;
|
||||||
|
SdramHandle.Init.CASLatency = SDRAM_CAS_LATENCY;
|
||||||
|
SdramHandle.Init.WriteProtection = FMC_SDRAM_WRITE_PROTECTION_DISABLE;
|
||||||
|
SdramHandle.Init.SDClockPeriod = SDCLOCK_PERIOD;
|
||||||
|
SdramHandle.Init.ReadBurst = SDRAM_READBURST;
|
||||||
|
SdramHandle.Init.ReadPipeDelay = FMC_SDRAM_RPIPE_DELAY_1;
|
||||||
|
|
||||||
|
/* SDRAM controller initialization */
|
||||||
|
/* __weak function can be surcharged by the application code */
|
||||||
|
BSP_SDRAM_MspInit(&SdramHandle, (void *)NULL);
|
||||||
|
if (HAL_SDRAM_Init(&SdramHandle, &Timing) != HAL_OK)
|
||||||
|
{
|
||||||
|
sdramstatus = SDRAM_ERROR;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
sdramstatus = SDRAM_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* SDRAM initialization sequence */
|
||||||
|
BSP_SDRAM_Initialization_sequence(REFRESH_COUNT);
|
||||||
|
|
||||||
|
return sdramstatus;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Programs the SDRAM device.
|
||||||
|
* @param RefreshCount: SDRAM refresh counter value
|
||||||
|
*/
|
||||||
|
void BSP_SDRAM_Initialization_sequence(uint32_t RefreshCount)
|
||||||
|
{
|
||||||
|
__IO uint32_t tmpmrd = 0;
|
||||||
|
|
||||||
|
/* Step 1: Configure a clock configuration enable command */
|
||||||
|
Command.CommandMode = FMC_SDRAM_CMD_CLK_ENABLE;
|
||||||
|
Command.CommandTarget = FMC_SDRAM_CMD_TARGET_BANK2;
|
||||||
|
Command.AutoRefreshNumber = 1;
|
||||||
|
Command.ModeRegisterDefinition = 0;
|
||||||
|
|
||||||
|
/* Send the command */
|
||||||
|
HAL_SDRAM_SendCommand(&SdramHandle, &Command, SDRAM_TIMEOUT);
|
||||||
|
|
||||||
|
/* Step 2: Insert 100 us minimum delay */
|
||||||
|
/* Inserted delay is equal to 1 ms due to systick time base unit (ms) */
|
||||||
|
HAL_Delay(1);
|
||||||
|
|
||||||
|
/* Step 3: Configure a PALL (precharge all) command */
|
||||||
|
Command.CommandMode = FMC_SDRAM_CMD_PALL;
|
||||||
|
Command.CommandTarget = FMC_SDRAM_CMD_TARGET_BANK2;
|
||||||
|
Command.AutoRefreshNumber = 1;
|
||||||
|
Command.ModeRegisterDefinition = 0;
|
||||||
|
|
||||||
|
/* Send the command */
|
||||||
|
HAL_SDRAM_SendCommand(&SdramHandle, &Command, SDRAM_TIMEOUT);
|
||||||
|
|
||||||
|
/* Step 4: Configure an Auto Refresh command */
|
||||||
|
Command.CommandMode = FMC_SDRAM_CMD_AUTOREFRESH_MODE;
|
||||||
|
Command.CommandTarget = FMC_SDRAM_CMD_TARGET_BANK2;
|
||||||
|
Command.AutoRefreshNumber = 4;
|
||||||
|
Command.ModeRegisterDefinition = 0;
|
||||||
|
|
||||||
|
/* Send the command */
|
||||||
|
HAL_SDRAM_SendCommand(&SdramHandle, &Command, SDRAM_TIMEOUT);
|
||||||
|
|
||||||
|
/* Step 5: Program the external memory mode register */
|
||||||
|
tmpmrd = (uint32_t)SDRAM_MODEREG_BURST_LENGTH_1 |
|
||||||
|
SDRAM_MODEREG_BURST_TYPE_SEQUENTIAL |
|
||||||
|
SDRAM_MODEREG_CAS_LATENCY_3 |
|
||||||
|
SDRAM_MODEREG_OPERATING_MODE_STANDARD |
|
||||||
|
SDRAM_MODEREG_WRITEBURST_MODE_SINGLE;
|
||||||
|
|
||||||
|
Command.CommandMode = FMC_SDRAM_CMD_LOAD_MODE;
|
||||||
|
Command.CommandTarget = FMC_SDRAM_CMD_TARGET_BANK2;
|
||||||
|
Command.AutoRefreshNumber = 1;
|
||||||
|
Command.ModeRegisterDefinition = tmpmrd;
|
||||||
|
|
||||||
|
/* Send the command */
|
||||||
|
HAL_SDRAM_SendCommand(&SdramHandle, &Command, SDRAM_TIMEOUT);
|
||||||
|
|
||||||
|
/* Step 6: Set the refresh rate counter */
|
||||||
|
/* Set the device refresh rate */
|
||||||
|
HAL_SDRAM_ProgramRefreshRate(&SdramHandle, RefreshCount);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Reads an mount of data from the SDRAM memory in polling mode.
|
||||||
|
* @param uwStartAddress : Read start address
|
||||||
|
* @param pData : Pointer to data to be read
|
||||||
|
* @param uwDataSize: Size of read data from the memory
|
||||||
|
*/
|
||||||
|
uint8_t BSP_SDRAM_ReadData(uint32_t uwStartAddress, uint32_t *pData, uint32_t uwDataSize)
|
||||||
|
{
|
||||||
|
if (HAL_SDRAM_Read_32b(&SdramHandle, (uint32_t *)uwStartAddress, pData, uwDataSize) != HAL_OK)
|
||||||
|
{
|
||||||
|
return SDRAM_ERROR;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return SDRAM_OK;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Reads an mount of data from the SDRAM memory in DMA mode.
|
||||||
|
* @param uwStartAddress : Read start address
|
||||||
|
* @param pData : Pointer to data to be read
|
||||||
|
* @param uwDataSize: Size of read data from the memory
|
||||||
|
*/
|
||||||
|
uint8_t BSP_SDRAM_ReadData_DMA(uint32_t uwStartAddress, uint32_t *pData, uint32_t uwDataSize)
|
||||||
|
{
|
||||||
|
if (HAL_SDRAM_Read_DMA(&SdramHandle, (uint32_t *)uwStartAddress, pData, uwDataSize) != HAL_OK)
|
||||||
|
{
|
||||||
|
return SDRAM_ERROR;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return SDRAM_OK;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Writes an mount of data to the SDRAM memory in polling mode.
|
||||||
|
* @param uwStartAddress : Write start address
|
||||||
|
* @param pData : Pointer to data to be written
|
||||||
|
* @param uwDataSize: Size of written data from the memory
|
||||||
|
*/
|
||||||
|
uint8_t BSP_SDRAM_WriteData(uint32_t uwStartAddress, uint32_t *pData, uint32_t uwDataSize)
|
||||||
|
{
|
||||||
|
/* Disable write protection */
|
||||||
|
HAL_SDRAM_WriteProtection_Disable(&SdramHandle);
|
||||||
|
|
||||||
|
/*Write 32-bit data buffer to SDRAM memory*/
|
||||||
|
if (HAL_SDRAM_Write_32b(&SdramHandle, (uint32_t *)uwStartAddress, pData, uwDataSize) != HAL_OK)
|
||||||
|
{
|
||||||
|
return SDRAM_ERROR;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return SDRAM_OK;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Writes an mount of data to the SDRAM memory in DMA mode.
|
||||||
|
* @param uwStartAddress : Write start address
|
||||||
|
* @param pData : Pointer to data to be written
|
||||||
|
* @param uwDataSize: Size of written data from the memory
|
||||||
|
*/
|
||||||
|
uint8_t BSP_SDRAM_WriteData_DMA(uint32_t uwStartAddress, uint32_t *pData, uint32_t uwDataSize)
|
||||||
|
{
|
||||||
|
if (HAL_SDRAM_Write_DMA(&SdramHandle, (uint32_t *)uwStartAddress, pData, uwDataSize) != HAL_OK)
|
||||||
|
{
|
||||||
|
return SDRAM_ERROR;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return SDRAM_OK;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Sends command to the SDRAM bank.
|
||||||
|
* @param SdramCmd: Pointer to SDRAM command structure
|
||||||
|
* @retval HAL status
|
||||||
|
*/
|
||||||
|
uint8_t BSP_SDRAM_Sendcmd(FMC_SDRAM_CommandTypeDef *SdramCmd)
|
||||||
|
{
|
||||||
|
if (HAL_SDRAM_SendCommand(&SdramHandle, SdramCmd, SDRAM_TIMEOUT) != HAL_OK)
|
||||||
|
{
|
||||||
|
return SDRAM_ERROR;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return SDRAM_OK;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Handles SDRAM DMA transfer interrupt request.
|
||||||
|
*/
|
||||||
|
void BSP_SDRAM_DMA_IRQHandler(void)
|
||||||
|
{
|
||||||
|
HAL_DMA_IRQHandler(SdramHandle.hdma);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Initializes SDRAM MSP.
|
||||||
|
* @note This function can be surcharged by application code.
|
||||||
|
* @param hsdram: pointer on SDRAM handle
|
||||||
|
* @param Params: pointer on additional configuration parameters, can be NULL.
|
||||||
|
*/
|
||||||
|
__weak void BSP_SDRAM_MspInit(SDRAM_HandleTypeDef *hsdram, void *Params)
|
||||||
|
{
|
||||||
|
static DMA_HandleTypeDef dmaHandle;
|
||||||
|
GPIO_InitTypeDef GPIO_InitStructure;
|
||||||
|
|
||||||
|
if (hsdram != (SDRAM_HandleTypeDef *)NULL)
|
||||||
|
{
|
||||||
|
/* Enable FMC clock */
|
||||||
|
__HAL_RCC_FMC_CLK_ENABLE();
|
||||||
|
|
||||||
|
/* Enable chosen DMAx clock */
|
||||||
|
__DMAx_CLK_ENABLE();
|
||||||
|
|
||||||
|
/* Enable GPIOs clock */
|
||||||
|
__HAL_RCC_GPIOB_CLK_ENABLE();
|
||||||
|
__HAL_RCC_GPIOC_CLK_ENABLE();
|
||||||
|
__HAL_RCC_GPIOD_CLK_ENABLE();
|
||||||
|
__HAL_RCC_GPIOE_CLK_ENABLE();
|
||||||
|
__HAL_RCC_GPIOF_CLK_ENABLE();
|
||||||
|
__HAL_RCC_GPIOG_CLK_ENABLE();
|
||||||
|
|
||||||
|
/*-- GPIOs Configuration -----------------------------------------------------*/
|
||||||
|
/*
|
||||||
|
+-------------------+--------------------+--------------------+--------------------+
|
||||||
|
+ SDRAM pins assignment +
|
||||||
|
+-------------------+--------------------+--------------------+--------------------+
|
||||||
|
| PD0 <-> FMC_D2 | PE0 <-> FMC_NBL0 | PF0 <-> FMC_A0 | PG0 <-> FMC_A10 |
|
||||||
|
| PD1 <-> FMC_D3 | PE1 <-> FMC_NBL1 | PF1 <-> FMC_A1 | PG1 <-> FMC_A11 |
|
||||||
|
| PD8 <-> FMC_D13 | PE7 <-> FMC_D4 | PF2 <-> FMC_A2 | PG8 <-> FMC_SDCLK |
|
||||||
|
| PD9 <-> FMC_D14 | PE8 <-> FMC_D5 | PF3 <-> FMC_A3 | PG15 <-> FMC_NCAS |
|
||||||
|
| PD10 <-> FMC_D15 | PE9 <-> FMC_D6 | PF4 <-> FMC_A4 |--------------------+
|
||||||
|
| PD14 <-> FMC_D0 | PE10 <-> FMC_D7 | PF5 <-> FMC_A5 |
|
||||||
|
| PD15 <-> FMC_D1 | PE11 <-> FMC_D8 | PF11 <-> FMC_NRAS |
|
||||||
|
+-------------------| PE12 <-> FMC_D9 | PF12 <-> FMC_A6 |
|
||||||
|
| PE13 <-> FMC_D10 | PF13 <-> FMC_A7 |
|
||||||
|
| PE14 <-> FMC_D11 | PF14 <-> FMC_A8 |
|
||||||
|
| PE15 <-> FMC_D12 | PF15 <-> FMC_A9 |
|
||||||
|
+-------------------+--------------------+--------------------+
|
||||||
|
| PB5 <-> FMC_SDCKE1|
|
||||||
|
| PB6 <-> FMC_SDNE1 |
|
||||||
|
| PC0 <-> FMC_SDNWE |
|
||||||
|
+-------------------+
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Common GPIO configuration */
|
||||||
|
GPIO_InitStructure.Mode = GPIO_MODE_AF_PP;
|
||||||
|
GPIO_InitStructure.Speed = GPIO_SPEED_FAST;
|
||||||
|
GPIO_InitStructure.Pull = GPIO_NOPULL;
|
||||||
|
GPIO_InitStructure.Alternate = GPIO_AF12_FMC;
|
||||||
|
|
||||||
|
/* GPIOB configuration */
|
||||||
|
GPIO_InitStructure.Pin = GPIO_PIN_5 | GPIO_PIN_6;
|
||||||
|
HAL_GPIO_Init(GPIOB, &GPIO_InitStructure);
|
||||||
|
|
||||||
|
/* GPIOC configuration */
|
||||||
|
GPIO_InitStructure.Pin = GPIO_PIN_0;
|
||||||
|
HAL_GPIO_Init(GPIOC, &GPIO_InitStructure);
|
||||||
|
|
||||||
|
/* GPIOD configuration */
|
||||||
|
GPIO_InitStructure.Pin = GPIO_PIN_0 | GPIO_PIN_1 | GPIO_PIN_8 |
|
||||||
|
GPIO_PIN_9 | GPIO_PIN_10 | GPIO_PIN_14 |
|
||||||
|
GPIO_PIN_15;
|
||||||
|
HAL_GPIO_Init(GPIOD, &GPIO_InitStructure);
|
||||||
|
|
||||||
|
/* GPIOE configuration */
|
||||||
|
GPIO_InitStructure.Pin = GPIO_PIN_0 | GPIO_PIN_1 | GPIO_PIN_7 |
|
||||||
|
GPIO_PIN_8 | GPIO_PIN_9 | GPIO_PIN_10 |
|
||||||
|
GPIO_PIN_11 | GPIO_PIN_12 | GPIO_PIN_13 |
|
||||||
|
GPIO_PIN_14 | GPIO_PIN_15;
|
||||||
|
HAL_GPIO_Init(GPIOE, &GPIO_InitStructure);
|
||||||
|
|
||||||
|
/* GPIOF configuration */
|
||||||
|
GPIO_InitStructure.Pin = GPIO_PIN_0 | GPIO_PIN_1 | GPIO_PIN_2 |
|
||||||
|
GPIO_PIN_3 | GPIO_PIN_4 | GPIO_PIN_5 |
|
||||||
|
GPIO_PIN_11 | GPIO_PIN_12 | GPIO_PIN_13 |
|
||||||
|
GPIO_PIN_14 | GPIO_PIN_15;
|
||||||
|
HAL_GPIO_Init(GPIOF, &GPIO_InitStructure);
|
||||||
|
|
||||||
|
/* GPIOG configuration */
|
||||||
|
GPIO_InitStructure.Pin = GPIO_PIN_0 | GPIO_PIN_1 | GPIO_PIN_4 |
|
||||||
|
GPIO_PIN_5 | GPIO_PIN_8 | GPIO_PIN_15;
|
||||||
|
HAL_GPIO_Init(GPIOG, &GPIO_InitStructure);
|
||||||
|
|
||||||
|
/* Configure common DMA parameters */
|
||||||
|
dmaHandle.Init.Channel = SDRAM_DMAx_CHANNEL;
|
||||||
|
dmaHandle.Init.Direction = DMA_MEMORY_TO_MEMORY;
|
||||||
|
dmaHandle.Init.PeriphInc = DMA_PINC_ENABLE;
|
||||||
|
dmaHandle.Init.MemInc = DMA_MINC_ENABLE;
|
||||||
|
dmaHandle.Init.PeriphDataAlignment = DMA_PDATAALIGN_WORD;
|
||||||
|
dmaHandle.Init.MemDataAlignment = DMA_MDATAALIGN_WORD;
|
||||||
|
dmaHandle.Init.Mode = DMA_NORMAL;
|
||||||
|
dmaHandle.Init.Priority = DMA_PRIORITY_HIGH;
|
||||||
|
dmaHandle.Init.FIFOMode = DMA_FIFOMODE_DISABLE;
|
||||||
|
dmaHandle.Init.FIFOThreshold = DMA_FIFO_THRESHOLD_FULL;
|
||||||
|
dmaHandle.Init.MemBurst = DMA_MBURST_SINGLE;
|
||||||
|
dmaHandle.Init.PeriphBurst = DMA_PBURST_SINGLE;
|
||||||
|
|
||||||
|
dmaHandle.Instance = SDRAM_DMAx_STREAM;
|
||||||
|
|
||||||
|
/* Associate the DMA handle */
|
||||||
|
__HAL_LINKDMA(hsdram, hdma, dmaHandle);
|
||||||
|
|
||||||
|
/* Deinitialize the stream for new transfer */
|
||||||
|
HAL_DMA_DeInit(&dmaHandle);
|
||||||
|
|
||||||
|
/* Configure the DMA stream */
|
||||||
|
HAL_DMA_Init(&dmaHandle);
|
||||||
|
|
||||||
|
/* NVIC configuration for DMA transfer complete interrupt */
|
||||||
|
HAL_NVIC_SetPriority(SDRAM_DMAx_IRQn, 0x0F, 0);
|
||||||
|
HAL_NVIC_EnableIRQ(SDRAM_DMAx_IRQn);
|
||||||
|
} /* of if(hsdram != (SDRAM_HandleTypeDef *)NULL) */
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief DeInitializes SDRAM MSP.
|
||||||
|
* @note This function can be surcharged by application code.
|
||||||
|
* @param hsdram: pointer on SDRAM handle
|
||||||
|
* @param Params: pointer on additional configuration parameters, can be NULL.
|
||||||
|
*/
|
||||||
|
__weak void BSP_SDRAM_MspDeInit(SDRAM_HandleTypeDef *hsdram, void *Params)
|
||||||
|
{
|
||||||
|
static DMA_HandleTypeDef dma_handle;
|
||||||
|
|
||||||
|
if (hsdram != (SDRAM_HandleTypeDef *)NULL)
|
||||||
|
{
|
||||||
|
/* Disable NVIC configuration for DMA interrupt */
|
||||||
|
HAL_NVIC_DisableIRQ(SDRAM_DMAx_IRQn);
|
||||||
|
|
||||||
|
/* Deinitialize the stream for new transfer */
|
||||||
|
dma_handle.Instance = SDRAM_DMAx_STREAM;
|
||||||
|
HAL_DMA_DeInit(&dma_handle);
|
||||||
|
|
||||||
|
/* DeInit GPIO pins can be done in the application
|
||||||
|
(by surcharging this __weak function) */
|
||||||
|
|
||||||
|
/* GPIO pins clock, FMC clock and DMA clock can be shut down in the application
|
||||||
|
by surcharging this __weak function */
|
||||||
|
|
||||||
|
} /* of if(hsdram != (SDRAM_HandleTypeDef *)NULL) */
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
@@ -0,0 +1,169 @@
|
|||||||
|
/**
|
||||||
|
******************************************************************************
|
||||||
|
* @file stm32f429i_discovery_sdram.h
|
||||||
|
* @author MCD Application Team
|
||||||
|
* @brief This file contains all the functions prototypes for the
|
||||||
|
* stm32f429i_discovery_sdram.c driver.
|
||||||
|
******************************************************************************
|
||||||
|
* @attention
|
||||||
|
*
|
||||||
|
* Copyright (c) 2017 STMicroelectronics.
|
||||||
|
* All rights reserved.
|
||||||
|
*
|
||||||
|
* This software is licensed under terms that can be found in the LICENSE file
|
||||||
|
* in the root directory of this software component.
|
||||||
|
* If no LICENSE file comes with this software, it is provided AS-IS.
|
||||||
|
*
|
||||||
|
******************************************************************************
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Define to prevent recursive inclusion -------------------------------------*/
|
||||||
|
#ifndef __STM32F429I_DISCOVERY_SDRAM_H
|
||||||
|
#define __STM32F429I_DISCOVERY_SDRAM_H
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Includes ------------------------------------------------------------------*/
|
||||||
|
#include "stm32f429i_discovery.h"
|
||||||
|
|
||||||
|
/** @addtogroup BSP
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @addtogroup STM32F429I_DISCOVERY
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @addtogroup STM32F429I_DISCOVERY_SDRAM
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @defgroup STM32F429I_DISCOVERY_SDRAM_Exported_Types STM32F429I DISCOVERY SDRAM Exported Types
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @defgroup STM32F429I_DISCOVERY_SDRAM_Exported_Constants STM32F429I DISCOVERY SDRAM Exported Constants
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief SDRAM status structure definition
|
||||||
|
*/
|
||||||
|
#define SDRAM_OK ((uint8_t)0x00)
|
||||||
|
#define SDRAM_ERROR ((uint8_t)0x01)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief FMC SDRAM Bank address
|
||||||
|
*/
|
||||||
|
#define SDRAM_DEVICE_ADDR ((uint32_t)0xD0000000)
|
||||||
|
#define SDRAM_DEVICE_SIZE ((uint32_t)0x800000) /* SDRAM device size in Bytes */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief FMC SDRAM Memory Width
|
||||||
|
*/
|
||||||
|
/* #define SDRAM_MEMORY_WIDTH FMC_SDRAM_MEM_BUS_WIDTH_8 */
|
||||||
|
#define SDRAM_MEMORY_WIDTH FMC_SDRAM_MEM_BUS_WIDTH_16
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief FMC SDRAM CAS Latency
|
||||||
|
*/
|
||||||
|
/* #define SDRAM_CAS_LATENCY FMC_SDRAM_CAS_LATENCY_2 */
|
||||||
|
#define SDRAM_CAS_LATENCY FMC_SDRAM_CAS_LATENCY_3
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief FMC SDRAM Memory clock period
|
||||||
|
*/
|
||||||
|
#define SDCLOCK_PERIOD FMC_SDRAM_CLOCK_PERIOD_2 /* Default configuration used with LCD */
|
||||||
|
/* #define SDCLOCK_PERIOD FMC_SDRAM_CLOCK_PERIOD_3 */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief FMC SDRAM Memory Read Burst feature
|
||||||
|
*/
|
||||||
|
#define SDRAM_READBURST FMC_SDRAM_RBURST_DISABLE /* Default configuration used with LCD */
|
||||||
|
/* #define SDRAM_READBURST FMC_SDRAM_RBURST_ENABLE */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief FMC SDRAM Bank Remap
|
||||||
|
*/
|
||||||
|
/* #define SDRAM_BANK_REMAP */
|
||||||
|
|
||||||
|
/* Set the refresh rate counter */
|
||||||
|
/* (15.62 us x Freq) - 20 */
|
||||||
|
#define REFRESH_COUNT ((uint32_t)1386) /* SDRAM refresh counter */
|
||||||
|
#define SDRAM_TIMEOUT ((uint32_t)0xFFFF)
|
||||||
|
|
||||||
|
/* DMA definitions for SDRAM DMA transfer */
|
||||||
|
#define __DMAx_CLK_ENABLE __HAL_RCC_DMA2_CLK_ENABLE
|
||||||
|
#define SDRAM_DMAx_CHANNEL DMA_CHANNEL_0
|
||||||
|
#define SDRAM_DMAx_STREAM DMA2_Stream0
|
||||||
|
#define SDRAM_DMAx_IRQn DMA2_Stream0_IRQn
|
||||||
|
#define SDRAM_DMAx_IRQHandler DMA2_Stream0_IRQHandler
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief FMC SDRAM Mode definition register defines
|
||||||
|
*/
|
||||||
|
#define SDRAM_MODEREG_BURST_LENGTH_1 ((uint16_t)0x0000)
|
||||||
|
#define SDRAM_MODEREG_BURST_LENGTH_2 ((uint16_t)0x0001)
|
||||||
|
#define SDRAM_MODEREG_BURST_LENGTH_4 ((uint16_t)0x0002)
|
||||||
|
#define SDRAM_MODEREG_BURST_LENGTH_8 ((uint16_t)0x0004)
|
||||||
|
#define SDRAM_MODEREG_BURST_TYPE_SEQUENTIAL ((uint16_t)0x0000)
|
||||||
|
#define SDRAM_MODEREG_BURST_TYPE_INTERLEAVED ((uint16_t)0x0008)
|
||||||
|
#define SDRAM_MODEREG_CAS_LATENCY_2 ((uint16_t)0x0020)
|
||||||
|
#define SDRAM_MODEREG_CAS_LATENCY_3 ((uint16_t)0x0030)
|
||||||
|
#define SDRAM_MODEREG_OPERATING_MODE_STANDARD ((uint16_t)0x0000)
|
||||||
|
#define SDRAM_MODEREG_WRITEBURST_MODE_PROGRAMMED ((uint16_t)0x0000)
|
||||||
|
#define SDRAM_MODEREG_WRITEBURST_MODE_SINGLE ((uint16_t)0x0200)
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @defgroup STM32F429I_DISCOVERY_SDRAM_Exported_Macro STM32F429I DISCOVERY SDRAM Exported Macro
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @defgroup STM32F429I_DISCOVERY_SDRAM_Exported_Functions STM32F429I DISCOVERY SDRAM Exported Functions
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
uint8_t BSP_SDRAM_Init(void);
|
||||||
|
void BSP_SDRAM_Initialization_sequence(uint32_t RefreshCount);
|
||||||
|
uint8_t BSP_SDRAM_ReadData(uint32_t uwStartAddress, uint32_t *pData, uint32_t uwDataSize);
|
||||||
|
uint8_t BSP_SDRAM_ReadData_DMA(uint32_t uwStartAddress, uint32_t *pData, uint32_t uwDataSize);
|
||||||
|
uint8_t BSP_SDRAM_WriteData(uint32_t uwStartAddress, uint32_t *pData, uint32_t uwDataSize);
|
||||||
|
uint8_t BSP_SDRAM_WriteData_DMA(uint32_t uwStartAddress, uint32_t *pData, uint32_t uwDataSize);
|
||||||
|
uint8_t BSP_SDRAM_Sendcmd(FMC_SDRAM_CommandTypeDef *SdramCmd);
|
||||||
|
void BSP_SDRAM_DMA_IRQHandler(void);
|
||||||
|
|
||||||
|
/* These function can be modified in case the current settings (e.g. DMA stream)
|
||||||
|
need to be changed for specific application needs */
|
||||||
|
void BSP_SDRAM_MspInit(SDRAM_HandleTypeDef *hsdram, void *Params);
|
||||||
|
void BSP_SDRAM_MspDeInit(SDRAM_HandleTypeDef *hsdram, void *Params);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* __STM32F429I_DISCOVERY_SDRAM_H */
|
||||||
@@ -0,0 +1,250 @@
|
|||||||
|
/**
|
||||||
|
******************************************************************************
|
||||||
|
* @file stm32f429i_discovery_ts.c
|
||||||
|
* @author MCD Application Team
|
||||||
|
* @brief This file provides a set of functions needed to manage Touch
|
||||||
|
* screen available with STMPE811 IO Expander device mounted on
|
||||||
|
* STM32F429I-Discovery Kit.
|
||||||
|
******************************************************************************
|
||||||
|
* @attention
|
||||||
|
*
|
||||||
|
* Copyright (c) 2017 STMicroelectronics.
|
||||||
|
* All rights reserved.
|
||||||
|
*
|
||||||
|
* This software is licensed under terms that can be found in the LICENSE file
|
||||||
|
* in the root directory of this software component.
|
||||||
|
* If no LICENSE file comes with this software, it is provided AS-IS.
|
||||||
|
*
|
||||||
|
******************************************************************************
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Includes ------------------------------------------------------------------*/
|
||||||
|
#include "stm32f429i_discovery_ts.h"
|
||||||
|
#include "stm32f429i_discovery_io.h"
|
||||||
|
|
||||||
|
/** @addtogroup BSP
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @addtogroup STM32F429I_DISCOVERY
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @defgroup STM32F429I_DISCOVERY_TS STM32F429I DISCOVERY TS
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @defgroup STM32F429I_DISCOVERY_TS_Private_Types_Definitions STM32F429I DISCOVERY TS Private Types Definitions
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @defgroup STM32F429I_DISCOVERY_TS_Private_Defines STM32F429I DISCOVERY TS Private Defines
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @defgroup STM32F429I_DISCOVERY_TS_Private_Macros STM32F429I DISCOVERY TS Private Macros
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @defgroup STM32F429I_DISCOVERY_TS_Private_Variables STM32F429I DISCOVERY TS Private Variables
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
static TS_DrvTypeDef *TsDrv;
|
||||||
|
static uint16_t TsXBoundary, TsYBoundary;
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @defgroup STM32F429I_DISCOVERY_TS_Private_Function_Prototypes STM32F429I DISCOVERY TS Private Function Prototypes
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @defgroup STM32F429I_DISCOVERY_TS_Private_Functions STM32F429I DISCOVERY TS Private Functions
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Initializes and configures the touch screen functionalities and
|
||||||
|
* configures all necessary hardware resources (GPIOs, clocks..).
|
||||||
|
* @param XSize: The maximum X size of the TS area on LCD
|
||||||
|
* @param YSize: The maximum Y size of the TS area on LCD
|
||||||
|
* @retval TS_OK: if all initializations are OK. Other value if error.
|
||||||
|
*/
|
||||||
|
uint8_t BSP_TS_Init(uint16_t XSize, uint16_t YSize)
|
||||||
|
{
|
||||||
|
uint8_t ret = TS_ERROR;
|
||||||
|
|
||||||
|
/* Initialize x and y positions boundaries */
|
||||||
|
TsXBoundary = XSize;
|
||||||
|
TsYBoundary = YSize;
|
||||||
|
|
||||||
|
/* Read ID and verify if the IO expander is ready */
|
||||||
|
if (stmpe811_ts_drv.ReadID(TS_I2C_ADDRESS) == STMPE811_ID)
|
||||||
|
{
|
||||||
|
/* Initialize the TS driver structure */
|
||||||
|
TsDrv = &stmpe811_ts_drv;
|
||||||
|
|
||||||
|
ret = TS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ret == TS_OK)
|
||||||
|
{
|
||||||
|
/* Initialize the LL TS Driver */
|
||||||
|
TsDrv->Init(TS_I2C_ADDRESS);
|
||||||
|
TsDrv->Start(TS_I2C_ADDRESS);
|
||||||
|
}
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Configures and enables the touch screen interrupts.
|
||||||
|
* @retval TS_OK: if ITconfig is OK. Other value if error.
|
||||||
|
*/
|
||||||
|
uint8_t BSP_TS_ITConfig(void)
|
||||||
|
{
|
||||||
|
/* Enable the TS ITs */
|
||||||
|
TsDrv->EnableIT(TS_I2C_ADDRESS);
|
||||||
|
|
||||||
|
return TS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Gets the TS IT status.
|
||||||
|
* @retval Interrupt status.
|
||||||
|
*/
|
||||||
|
uint8_t BSP_TS_ITGetStatus(void)
|
||||||
|
{
|
||||||
|
/* Return the TS IT status */
|
||||||
|
return (TsDrv->GetITStatus(TS_I2C_ADDRESS));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Returns status and positions of the touch screen.
|
||||||
|
* @param TsState: Pointer to touch screen current state structure
|
||||||
|
*/
|
||||||
|
void BSP_TS_GetState(TS_StateTypeDef *TsState)
|
||||||
|
{
|
||||||
|
static uint32_t _x = 0, _y = 0;
|
||||||
|
uint16_t xDiff, yDiff, x, y, xr, yr;
|
||||||
|
|
||||||
|
TsState->TouchDetected = TsDrv->DetectTouch(TS_I2C_ADDRESS);
|
||||||
|
|
||||||
|
if (TsState->TouchDetected)
|
||||||
|
{
|
||||||
|
TsDrv->GetXY(TS_I2C_ADDRESS, &x, &y);
|
||||||
|
|
||||||
|
#if defined (USE_STM32F429I_DISCOVERY_REVD)
|
||||||
|
if (y > 3700)
|
||||||
|
{
|
||||||
|
y = 3700;
|
||||||
|
}
|
||||||
|
else if (y < 180)
|
||||||
|
{
|
||||||
|
y = 180;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Y value first correction */
|
||||||
|
y = 3700 - y;
|
||||||
|
#else
|
||||||
|
|
||||||
|
/* Y value first correction */
|
||||||
|
y -= 360;
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Y value second correction */
|
||||||
|
yr = y / 11;
|
||||||
|
|
||||||
|
/* Return y position value */
|
||||||
|
if (yr <= 0)
|
||||||
|
{
|
||||||
|
yr = 0;
|
||||||
|
}
|
||||||
|
else if (yr > TsYBoundary)
|
||||||
|
{
|
||||||
|
yr = TsYBoundary - 1;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{}
|
||||||
|
y = yr;
|
||||||
|
|
||||||
|
/* X value first correction */
|
||||||
|
if (x <= 3000)
|
||||||
|
{
|
||||||
|
x = 3870 - x;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
x = 3800 - x;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* X value second correction */
|
||||||
|
xr = x / 15;
|
||||||
|
|
||||||
|
/* Return X position value */
|
||||||
|
if (xr <= 0)
|
||||||
|
{
|
||||||
|
xr = 0;
|
||||||
|
}
|
||||||
|
else if (xr > TsXBoundary)
|
||||||
|
{
|
||||||
|
xr = TsXBoundary - 1;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{}
|
||||||
|
|
||||||
|
x = xr;
|
||||||
|
xDiff = x > _x ? (x - _x): (_x - x);
|
||||||
|
yDiff = y > _y ? (y - _y) : (_y - y);
|
||||||
|
|
||||||
|
if (xDiff + yDiff > 5)
|
||||||
|
{
|
||||||
|
_x = x;
|
||||||
|
_y = y;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Update the X position */
|
||||||
|
TsState->X = _x;
|
||||||
|
|
||||||
|
/* Update the Y position */
|
||||||
|
TsState->Y = _y;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Clears all touch screen interrupts.
|
||||||
|
*/
|
||||||
|
void BSP_TS_ITClear(void)
|
||||||
|
{
|
||||||
|
/* Clear TS IT pending bits */
|
||||||
|
TsDrv->ClearIT(TS_I2C_ADDRESS);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
@@ -0,0 +1,113 @@
|
|||||||
|
/**
|
||||||
|
******************************************************************************
|
||||||
|
* @file stm32f429i_discovery_ts.h
|
||||||
|
* @author MCD Application Team
|
||||||
|
* @brief This file contains all the functions prototypes for the
|
||||||
|
* stm32f429i_discovery_ts.c driver.
|
||||||
|
******************************************************************************
|
||||||
|
* @attention
|
||||||
|
*
|
||||||
|
* Copyright (c) 2017 STMicroelectronics.
|
||||||
|
* All rights reserved.
|
||||||
|
*
|
||||||
|
* This software is licensed under terms that can be found in the LICENSE file
|
||||||
|
* in the root directory of this software component.
|
||||||
|
* If no LICENSE file comes with this software, it is provided AS-IS.
|
||||||
|
*
|
||||||
|
******************************************************************************
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Define to prevent recursive inclusion -------------------------------------*/
|
||||||
|
#ifndef __STM32F429I_DISCOVERY_TS_H
|
||||||
|
#define __STM32F429I_DISCOVERY_TS_H
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Includes ------------------------------------------------------------------*/
|
||||||
|
#include "stm32f429i_discovery.h"
|
||||||
|
/* Include TouchScreen component driver */
|
||||||
|
#include "../Components/stmpe811/stmpe811.h"
|
||||||
|
|
||||||
|
/** @addtogroup BSP
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @addtogroup STM32F429I_DISCOVERY
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @addtogroup STM32F429I_DISCOVERY_TS
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @defgroup STM32F429I_DISCOVERY_TS_Exported_Types STM32F429I DISCOVERY TS Exported Types
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
uint16_t TouchDetected;
|
||||||
|
uint16_t X;
|
||||||
|
uint16_t Y;
|
||||||
|
uint16_t Z;
|
||||||
|
} TS_StateTypeDef;
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @defgroup STM32F429I_DISCOVERY_TS_Exported_Constants STM32F429I DISCOVERY TS Exported Constants
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
#define TS_SWAP_NONE 0x00
|
||||||
|
#define TS_SWAP_X 0x01
|
||||||
|
#define TS_SWAP_Y 0x02
|
||||||
|
#define TS_SWAP_XY 0x04
|
||||||
|
|
||||||
|
typedef enum
|
||||||
|
{
|
||||||
|
TS_OK = 0x00,
|
||||||
|
TS_ERROR = 0x01,
|
||||||
|
TS_TIMEOUT = 0x02
|
||||||
|
} TS_StatusTypeDef;
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @defgroup STM32F429I_DISCOVERY_TS_Exported_Macros STM32F429I DISCOVERY TS Exported Macros
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @defgroup STM32F429I_DISCOVERY_TS_Exported_Functions STM32F429I DISCOVERY TS Exported Functions
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
uint8_t BSP_TS_Init(uint16_t XSize, uint16_t YSize);
|
||||||
|
void BSP_TS_GetState(TS_StateTypeDef *TsState);
|
||||||
|
uint8_t BSP_TS_ITConfig(void);
|
||||||
|
uint8_t BSP_TS_ITGetStatus(void);
|
||||||
|
void BSP_TS_ITClear(void);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* __STM32F429I_DISCOVERY_TS_H */
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
##########################################################################################################################
|
##########################################################################################################################
|
||||||
# File automatically-generated by tool: [projectgenerator] version: [4.10.0-B28] date: [Wed Sep 09 13:05:58 CDT 2026]
|
# File automatically-generated by tool: [projectgenerator] version: [4.10.0-B28] date: [Wed Sep 09 13:28:03 CDT 2026]
|
||||||
##########################################################################################################################
|
##########################################################################################################################
|
||||||
|
|
||||||
# ------------------------------------------------
|
# ------------------------------------------------
|
||||||
@@ -54,7 +54,10 @@ Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal.c \
|
|||||||
Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_exti.c \
|
Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_exti.c \
|
||||||
Core/Src/system_stm32f4xx.c \
|
Core/Src/system_stm32f4xx.c \
|
||||||
Core/Src/sysmem.c \
|
Core/Src/sysmem.c \
|
||||||
Core/Src/syscalls.c
|
Core/Src/syscalls.c \
|
||||||
|
Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_ltdc.c \
|
||||||
|
Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_ltdc_ex.c \
|
||||||
|
Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_dsi.c
|
||||||
|
|
||||||
# ASM sources
|
# ASM sources
|
||||||
ASM_SOURCES = \
|
ASM_SOURCES = \
|
||||||
|
|||||||
@@ -1,4 +1,9 @@
|
|||||||
* scrtest1
|
* scrtest1
|
||||||
|
** what is this
|
||||||
|
Testing the LCD screen on the [[https://www.st.com/en/evaluation-tools/32f429idiscovery.html][STM32f429i-DISC1]] discovery board.
|
||||||
|
** sources
|
||||||
|
*** Drivers/BSP/STM32F429I-Discovery
|
||||||
|
[[https://github.com/STMicroelectronics/32f429idiscovery-bsp/releases/tag/v2.1.8]]
|
||||||
** get working for development
|
** get working for development
|
||||||
#+begin_src bash
|
#+begin_src bash
|
||||||
git clone https://git.therats.win/jazz/scrtest1.git
|
git clone https://git.therats.win/jazz/scrtest1.git
|
||||||
|
|||||||
+77
-11
@@ -6,12 +6,35 @@ File.Version=6
|
|||||||
KeepUserPlacement=false
|
KeepUserPlacement=false
|
||||||
Mcu.CPN=STM32F429ZIT6
|
Mcu.CPN=STM32F429ZIT6
|
||||||
Mcu.Family=STM32F4
|
Mcu.Family=STM32F4
|
||||||
Mcu.IP0=NVIC
|
Mcu.IP0=LTDC
|
||||||
Mcu.IP1=RCC
|
Mcu.IP1=NVIC
|
||||||
Mcu.IPNb=2
|
Mcu.IP2=RCC
|
||||||
|
Mcu.IP3=SYS
|
||||||
|
Mcu.IPNb=4
|
||||||
Mcu.Name=STM32F429ZITx
|
Mcu.Name=STM32F429ZITx
|
||||||
Mcu.Package=LQFP144
|
Mcu.Package=LQFP144
|
||||||
Mcu.PinsNb=0
|
Mcu.Pin0=PF10
|
||||||
|
Mcu.Pin1=PA3
|
||||||
|
Mcu.Pin10=PB10
|
||||||
|
Mcu.Pin11=PB11
|
||||||
|
Mcu.Pin12=PD10
|
||||||
|
Mcu.Pin13=PC6
|
||||||
|
Mcu.Pin14=PC7
|
||||||
|
Mcu.Pin15=PA11
|
||||||
|
Mcu.Pin16=PA12
|
||||||
|
Mcu.Pin17=PD3
|
||||||
|
Mcu.Pin18=PB8
|
||||||
|
Mcu.Pin19=PB9
|
||||||
|
Mcu.Pin2=PA4
|
||||||
|
Mcu.Pin20=VP_SYS_VS_Systick
|
||||||
|
Mcu.Pin3=PA6
|
||||||
|
Mcu.Pin4=PB0
|
||||||
|
Mcu.Pin5=PB1
|
||||||
|
Mcu.Pin6=PE11
|
||||||
|
Mcu.Pin7=PE12
|
||||||
|
Mcu.Pin8=PE14
|
||||||
|
Mcu.Pin9=PE15
|
||||||
|
Mcu.PinsNb=21
|
||||||
Mcu.ThirdPartyNb=0
|
Mcu.ThirdPartyNb=0
|
||||||
Mcu.UserConstants=
|
Mcu.UserConstants=
|
||||||
Mcu.UserName=STM32F429ZITx
|
Mcu.UserName=STM32F429ZITx
|
||||||
@@ -28,6 +51,32 @@ NVIC.PriorityGroup=NVIC_PRIORITYGROUP_0
|
|||||||
NVIC.SVCall_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false
|
NVIC.SVCall_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false
|
||||||
NVIC.SysTick_IRQn=true\:0\:0\:false\:false\:true\:true\:true\:false
|
NVIC.SysTick_IRQn=true\:0\:0\:false\:false\:true\:true\:true\:false
|
||||||
NVIC.UsageFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false
|
NVIC.UsageFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false
|
||||||
|
PA11.Mode=RGB565
|
||||||
|
PA11.Signal=LTDC_R4
|
||||||
|
PA12.Mode=RGB565
|
||||||
|
PA12.Signal=LTDC_R5
|
||||||
|
PA3.Mode=RGB565
|
||||||
|
PA3.Signal=LTDC_B5
|
||||||
|
PA4.Mode=RGB565
|
||||||
|
PA4.Signal=LTDC_VSYNC
|
||||||
|
PA6.Mode=RGB565
|
||||||
|
PA6.Signal=LTDC_G2
|
||||||
|
PB0.Mode=RGB565
|
||||||
|
PB0.Signal=LTDC_R3
|
||||||
|
PB1.Mode=RGB565
|
||||||
|
PB1.Signal=LTDC_R6
|
||||||
|
PB10.Mode=RGB565
|
||||||
|
PB10.Signal=LTDC_G4
|
||||||
|
PB11.Mode=RGB565
|
||||||
|
PB11.Signal=LTDC_G5
|
||||||
|
PB8.Mode=RGB565
|
||||||
|
PB8.Signal=LTDC_B6
|
||||||
|
PB9.Mode=RGB565
|
||||||
|
PB9.Signal=LTDC_B7
|
||||||
|
PC6.Mode=RGB565
|
||||||
|
PC6.Signal=LTDC_HSYNC
|
||||||
|
PC7.Mode=RGB565
|
||||||
|
PC7.Signal=LTDC_G6
|
||||||
PCC.Bar.Display=Horizontal Bar
|
PCC.Bar.Display=Horizontal Bar
|
||||||
PCC.Checker=false
|
PCC.Checker=false
|
||||||
PCC.Display=Plot\: All Steps
|
PCC.Display=Plot\: All Steps
|
||||||
@@ -39,6 +88,20 @@ PCC.SequenceTime.Unit=ms
|
|||||||
PCC.Series=STM32F4
|
PCC.Series=STM32F4
|
||||||
PCC.Temperature=25
|
PCC.Temperature=25
|
||||||
PCC.Vdd=3.3
|
PCC.Vdd=3.3
|
||||||
|
PD10.Mode=RGB565
|
||||||
|
PD10.Signal=LTDC_B3
|
||||||
|
PD3.Mode=RGB565
|
||||||
|
PD3.Signal=LTDC_G7
|
||||||
|
PE11.Mode=RGB565
|
||||||
|
PE11.Signal=LTDC_G3
|
||||||
|
PE12.Mode=RGB565
|
||||||
|
PE12.Signal=LTDC_B4
|
||||||
|
PE14.Mode=RGB565
|
||||||
|
PE14.Signal=LTDC_CLK
|
||||||
|
PE15.Mode=RGB565
|
||||||
|
PE15.Signal=LTDC_R7
|
||||||
|
PF10.Mode=RGB565
|
||||||
|
PF10.Signal=LTDC_DE
|
||||||
PinOutPanel.RotationAngle=0
|
PinOutPanel.RotationAngle=0
|
||||||
ProjectManager.AskForMigrate=true
|
ProjectManager.AskForMigrate=true
|
||||||
ProjectManager.BackupPrevious=false
|
ProjectManager.BackupPrevious=false
|
||||||
@@ -89,8 +152,8 @@ RCC.HCLKFreq_Value=25000000
|
|||||||
RCC.HSE_VALUE=8000000
|
RCC.HSE_VALUE=8000000
|
||||||
RCC.HSI_VALUE=16000000
|
RCC.HSI_VALUE=16000000
|
||||||
RCC.I2SClocksFreq_Value=192000000
|
RCC.I2SClocksFreq_Value=192000000
|
||||||
RCC.IPParameters=48MHZClocksFreq_Value,AHBFreq_Value,APB1CLKDivider,APB1Freq_Value,APB1TimFreq_Value,APB2CLKDivider,APB2Freq_Value,APB2TimFreq_Value,CortexFreq_Value,EthernetFreq_Value,FCLKCortexFreq_Value,FamilyName,HCLKFreq_Value,HSE_VALUE,HSI_VALUE,I2SClocksFreq_Value,LCDTFTFreq_Value,LSE_VALUE,LSI_VALUE,MCO2PinFreq_Value,PLLCLKFreq_Value,PLLM,PLLN,PLLP,PLLQ,PLLQCLKFreq_Value,RTCFreq_Value,RTCHSEDivFreq_Value,SAI_AClocksFreq_Value,SAI_BClocksFreq_Value,SYSCLKFreq_VALUE,SYSCLKSource,VCOI2SOutputFreq_Value,VCOInputFreq_Value,VCOOutputFreq_Value,VCOSAIOutputFreq_Value,VCOSAIOutputFreq_ValueQ,VCOSAIOutputFreq_ValueR,VcooutputI2S,VcooutputI2SQ
|
RCC.IPParameters=48MHZClocksFreq_Value,AHBFreq_Value,APB1CLKDivider,APB1Freq_Value,APB1TimFreq_Value,APB2CLKDivider,APB2Freq_Value,APB2TimFreq_Value,CortexFreq_Value,EthernetFreq_Value,FCLKCortexFreq_Value,FamilyName,HCLKFreq_Value,HSE_VALUE,HSI_VALUE,I2SClocksFreq_Value,LCDTFTFreq_Value,LSE_VALUE,LSI_VALUE,MCO2PinFreq_Value,PLLCLKFreq_Value,PLLM,PLLN,PLLP,PLLQ,PLLQCLKFreq_Value,PLLSAIN,RTCFreq_Value,RTCHSEDivFreq_Value,SAI_AClocksFreq_Value,SAI_BClocksFreq_Value,SYSCLKFreq_VALUE,SYSCLKSource,VCOI2SOutputFreq_Value,VCOInputFreq_Value,VCOOutputFreq_Value,VCOSAIOutputFreq_Value,VCOSAIOutputFreq_ValueQ,VCOSAIOutputFreq_ValueR,VcooutputI2S,VcooutputI2SQ
|
||||||
RCC.LCDTFTFreq_Value=24500000
|
RCC.LCDTFTFreq_Value=25000000
|
||||||
RCC.LSE_VALUE=32768
|
RCC.LSE_VALUE=32768
|
||||||
RCC.LSI_VALUE=32000
|
RCC.LSI_VALUE=32000
|
||||||
RCC.MCO2PinFreq_Value=25000000
|
RCC.MCO2PinFreq_Value=25000000
|
||||||
@@ -100,19 +163,22 @@ RCC.PLLN=50
|
|||||||
RCC.PLLP=RCC_PLLP_DIV4
|
RCC.PLLP=RCC_PLLP_DIV4
|
||||||
RCC.PLLQ=7
|
RCC.PLLQ=7
|
||||||
RCC.PLLQCLKFreq_Value=14285714.285714285
|
RCC.PLLQCLKFreq_Value=14285714.285714285
|
||||||
|
RCC.PLLSAIN=50
|
||||||
RCC.RTCFreq_Value=32000
|
RCC.RTCFreq_Value=32000
|
||||||
RCC.RTCHSEDivFreq_Value=4000000
|
RCC.RTCHSEDivFreq_Value=4000000
|
||||||
RCC.SAI_AClocksFreq_Value=24500000
|
RCC.SAI_AClocksFreq_Value=25000000
|
||||||
RCC.SAI_BClocksFreq_Value=24500000
|
RCC.SAI_BClocksFreq_Value=25000000
|
||||||
RCC.SYSCLKFreq_VALUE=25000000
|
RCC.SYSCLKFreq_VALUE=25000000
|
||||||
RCC.SYSCLKSource=RCC_SYSCLKSOURCE_PLLCLK
|
RCC.SYSCLKSource=RCC_SYSCLKSOURCE_PLLCLK
|
||||||
RCC.VCOI2SOutputFreq_Value=384000000
|
RCC.VCOI2SOutputFreq_Value=384000000
|
||||||
RCC.VCOInputFreq_Value=2000000
|
RCC.VCOInputFreq_Value=2000000
|
||||||
RCC.VCOOutputFreq_Value=100000000
|
RCC.VCOOutputFreq_Value=100000000
|
||||||
RCC.VCOSAIOutputFreq_Value=98000000
|
RCC.VCOSAIOutputFreq_Value=100000000
|
||||||
RCC.VCOSAIOutputFreq_ValueQ=24500000
|
RCC.VCOSAIOutputFreq_ValueQ=25000000
|
||||||
RCC.VCOSAIOutputFreq_ValueR=49000000
|
RCC.VCOSAIOutputFreq_ValueR=50000000
|
||||||
RCC.VcooutputI2S=192000000
|
RCC.VcooutputI2S=192000000
|
||||||
RCC.VcooutputI2SQ=192000000
|
RCC.VcooutputI2SQ=192000000
|
||||||
|
VP_SYS_VS_Systick.Mode=SysTick
|
||||||
|
VP_SYS_VS_Systick.Signal=SYS_VS_Systick
|
||||||
board=STM32F429I-DISC1
|
board=STM32F429I-DISC1
|
||||||
boardIOC=true
|
boardIOC=true
|
||||||
Reference in new issue
Block a user