├── 1.Hardware ├── PCB_2021-02-26.json ├── Power_X_2021-02-26.json └── README.md ├── 2.Software ├── Power_X │ ├── .iotlink │ │ └── settings.json │ ├── .mxproject │ ├── .vscode │ │ ├── c_cpp_properties.json │ │ └── launch.json │ ├── Core │ │ ├── Inc │ │ │ ├── bmp.h │ │ │ ├── gpio.h │ │ │ ├── ina226.h │ │ │ ├── main.h │ │ │ ├── oled.h │ │ │ ├── oledfont.h │ │ │ ├── stm32f1xx_hal_conf.h │ │ │ ├── stm32f1xx_it.h │ │ │ └── tim.h │ │ └── Src │ │ │ ├── gpio.c │ │ │ ├── ina226.c │ │ │ ├── main.c │ │ │ ├── oled.c │ │ │ ├── stm32f1xx_hal_msp.c │ │ │ ├── stm32f1xx_it.c │ │ │ ├── system_stm32f1xx.c │ │ │ └── tim.c │ ├── Drivers │ │ ├── CMSIS │ │ │ ├── Device │ │ │ │ └── ST │ │ │ │ │ └── STM32F1xx │ │ │ │ │ └── Include │ │ │ │ │ ├── stm32f103xb.h │ │ │ │ │ ├── stm32f1xx.h │ │ │ │ │ └── system_stm32f1xx.h │ │ │ └── Include │ │ │ │ ├── cmsis_armcc.h │ │ │ │ ├── cmsis_armclang.h │ │ │ │ ├── cmsis_compiler.h │ │ │ │ ├── cmsis_gcc.h │ │ │ │ ├── cmsis_iccarm.h │ │ │ │ ├── cmsis_version.h │ │ │ │ ├── core_armv8mbl.h │ │ │ │ ├── core_armv8mml.h │ │ │ │ ├── core_cm0.h │ │ │ │ ├── core_cm0plus.h │ │ │ │ ├── core_cm1.h │ │ │ │ ├── core_cm23.h │ │ │ │ ├── core_cm3.h │ │ │ │ ├── core_cm33.h │ │ │ │ ├── core_cm4.h │ │ │ │ ├── core_cm7.h │ │ │ │ ├── core_sc000.h │ │ │ │ ├── core_sc300.h │ │ │ │ ├── mpu_armv7.h │ │ │ │ ├── mpu_armv8.h │ │ │ │ └── tz_context.h │ │ └── STM32F1xx_HAL_Driver │ │ │ ├── Inc │ │ │ ├── Legacy │ │ │ │ └── stm32_hal_legacy.h │ │ │ ├── stm32f1xx_hal.h │ │ │ ├── stm32f1xx_hal_cortex.h │ │ │ ├── stm32f1xx_hal_def.h │ │ │ ├── stm32f1xx_hal_dma.h │ │ │ ├── stm32f1xx_hal_dma_ex.h │ │ │ ├── stm32f1xx_hal_exti.h │ │ │ ├── stm32f1xx_hal_flash.h │ │ │ ├── stm32f1xx_hal_flash_ex.h │ │ │ ├── stm32f1xx_hal_gpio.h │ │ │ ├── stm32f1xx_hal_gpio_ex.h │ │ │ ├── stm32f1xx_hal_pwr.h │ │ │ ├── stm32f1xx_hal_rcc.h │ │ │ ├── stm32f1xx_hal_rcc_ex.h │ │ │ ├── stm32f1xx_hal_tim.h │ │ │ └── stm32f1xx_hal_tim_ex.h │ │ │ └── Src │ │ │ ├── stm32f1xx_hal.c │ │ │ ├── stm32f1xx_hal_cortex.c │ │ │ ├── stm32f1xx_hal_dma.c │ │ │ ├── stm32f1xx_hal_exti.c │ │ │ ├── stm32f1xx_hal_flash.c │ │ │ ├── stm32f1xx_hal_flash_ex.c │ │ │ ├── stm32f1xx_hal_gpio.c │ │ │ ├── stm32f1xx_hal_gpio_ex.c │ │ │ ├── stm32f1xx_hal_pwr.c │ │ │ ├── stm32f1xx_hal_rcc.c │ │ │ ├── stm32f1xx_hal_rcc_ex.c │ │ │ ├── stm32f1xx_hal_tim.c │ │ │ └── stm32f1xx_hal_tim_ex.c │ ├── Makefile │ ├── Power_X.ioc │ ├── STM32F103C8Tx_FLASH.ld │ ├── build │ │ ├── Power_X.bin │ │ ├── Power_X.elf │ │ ├── Power_X.hex │ │ ├── Power_X.map │ │ ├── gpio.d │ │ ├── gpio.lst │ │ ├── gpio.o │ │ ├── ina226.d │ │ ├── ina226.lst │ │ ├── ina226.o │ │ ├── main.d │ │ ├── main.lst │ │ ├── main.o │ │ ├── oled.d │ │ ├── oled.lst │ │ ├── oled.o │ │ ├── startup_stm32f103xb.d │ │ ├── startup_stm32f103xb.o │ │ ├── stm32f1xx_hal.d │ │ ├── stm32f1xx_hal.lst │ │ ├── stm32f1xx_hal.o │ │ ├── stm32f1xx_hal_cortex.d │ │ ├── stm32f1xx_hal_cortex.lst │ │ ├── stm32f1xx_hal_cortex.o │ │ ├── stm32f1xx_hal_dma.d │ │ ├── stm32f1xx_hal_dma.lst │ │ ├── stm32f1xx_hal_dma.o │ │ ├── stm32f1xx_hal_exti.d │ │ ├── stm32f1xx_hal_exti.lst │ │ ├── stm32f1xx_hal_exti.o │ │ ├── stm32f1xx_hal_flash.d │ │ ├── stm32f1xx_hal_flash.lst │ │ ├── stm32f1xx_hal_flash.o │ │ ├── stm32f1xx_hal_flash_ex.d │ │ ├── stm32f1xx_hal_flash_ex.lst │ │ ├── stm32f1xx_hal_flash_ex.o │ │ ├── stm32f1xx_hal_gpio.d │ │ ├── stm32f1xx_hal_gpio.lst │ │ ├── stm32f1xx_hal_gpio.o │ │ ├── stm32f1xx_hal_gpio_ex.d │ │ ├── stm32f1xx_hal_gpio_ex.lst │ │ ├── stm32f1xx_hal_gpio_ex.o │ │ ├── stm32f1xx_hal_msp.d │ │ ├── stm32f1xx_hal_msp.lst │ │ ├── stm32f1xx_hal_msp.o │ │ ├── stm32f1xx_hal_pwr.d │ │ ├── stm32f1xx_hal_pwr.lst │ │ ├── stm32f1xx_hal_pwr.o │ │ ├── stm32f1xx_hal_rcc.d │ │ ├── stm32f1xx_hal_rcc.lst │ │ ├── stm32f1xx_hal_rcc.o │ │ ├── stm32f1xx_hal_rcc_ex.d │ │ ├── stm32f1xx_hal_rcc_ex.lst │ │ ├── stm32f1xx_hal_rcc_ex.o │ │ ├── stm32f1xx_hal_tim.d │ │ ├── stm32f1xx_hal_tim.lst │ │ ├── stm32f1xx_hal_tim.o │ │ ├── stm32f1xx_hal_tim_ex.d │ │ ├── stm32f1xx_hal_tim_ex.lst │ │ ├── stm32f1xx_hal_tim_ex.o │ │ ├── stm32f1xx_it.d │ │ ├── stm32f1xx_it.lst │ │ ├── stm32f1xx_it.o │ │ ├── system_stm32f1xx.d │ │ ├── system_stm32f1xx.lst │ │ ├── system_stm32f1xx.o │ │ ├── tim.d │ │ ├── tim.lst │ │ └── tim.o │ └── startup_stm32f103xb.s ├── README.md └── 固件 │ ├── Power_X.bin │ └── Power_X.hex ├── 3.Image ├── 1.JPG ├── 2.JPG ├── 3.jpg └── Render.jpg ├── LICENSE └── README.md /1.Hardware/README.md: -------------------------------------------------------------------------------- 1 | # Power_X硬件部分 2 | 3 | json文件需使用立创EDA打开,生成gerber文件时提示是否检查网络和OCR均选否,硬件已打板测试无误 -------------------------------------------------------------------------------- /2.Software/Power_X/.iotlink/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "compiler": { 3 | "path": "${system_default}", 4 | "prefix": "arm-none-eabi", 5 | "makefile": "Makefile", 6 | "makeparam": "-j12" 7 | }, 8 | "debugger": { 9 | "adapter": "JLink", 10 | "openocdPath": "${system_default}", 11 | "openocdOption": "", 12 | "interface": "SWD", 13 | "deviceName": "STM32F103C8", 14 | "loadAddress": "0x08000000", 15 | "verify": true, 16 | "binfile": "build\\Power_X.elf" 17 | }, 18 | "general": {}, 19 | "version": "1.0.0" 20 | } -------------------------------------------------------------------------------- /2.Software/Power_X/.mxproject: -------------------------------------------------------------------------------- 1 | [PreviousLibFiles] 2 | LibFiles=Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h;Drivers/STM32F1xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_def.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc_ex.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio_ex.h;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_gpio_ex.c;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma_ex.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_cortex.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash_ex.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_exti.h;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim_ex.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rcc.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rcc_ex.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_gpio.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_dma.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_cortex.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_pwr.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash_ex.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_exti.c;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h;Drivers/STM32F1xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_def.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc_ex.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio_ex.h;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_gpio_ex.c;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma_ex.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_cortex.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash_ex.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_exti.h;Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f103xb.h;Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f1xx.h;Drivers/CMSIS/Device/ST/STM32F1xx/Include/system_stm32f1xx.h;Drivers/CMSIS/Device/ST/STM32F1xx/Source/Templates/system_stm32f1xx.c;Drivers/CMSIS/Include/cmsis_armcc.h;Drivers/CMSIS/Include/cmsis_armclang.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_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_cm4.h;Drivers/CMSIS/Include/core_cm7.h;Drivers/CMSIS/Include/core_sc000.h;Drivers/CMSIS/Include/core_sc300.h;Drivers/CMSIS/Include/mpu_armv7.h;Drivers/CMSIS/Include/mpu_armv8.h;Drivers/CMSIS/Include/tz_context.h; 3 | 4 | [PreviousUsedMakefileFiles] 5 | SourceFiles=Core\Src\main.c;Core\Src\gpio.c;Core\Src\tim.c;Core\Src\stm32f1xx_it.c;Core\Src\stm32f1xx_hal_msp.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_gpio_ex.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim_ex.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rcc.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rcc_ex.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_gpio.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_dma.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_cortex.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_pwr.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash_ex.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_exti.c;Core\Src/system_stm32f1xx.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_gpio_ex.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim_ex.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rcc.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rcc_ex.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_gpio.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_dma.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_cortex.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_pwr.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash_ex.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_exti.c;Core\Src/system_stm32f1xx.c;Drivers/CMSIS/Device/ST/STM32F1xx/Source/Templates/system_stm32f1xx.c;; 6 | HeaderPath=Drivers\STM32F1xx_HAL_Driver\Inc;Drivers\STM32F1xx_HAL_Driver\Inc\Legacy;Drivers\CMSIS\Device\ST\STM32F1xx\Include;Drivers\CMSIS\Include;Core\Inc; 7 | CDefines=USE_HAL_DRIVER;STM32F103xB;USE_HAL_DRIVER;USE_HAL_DRIVER; 8 | 9 | [PreviousGenFiles] 10 | AdvancedFolderStructure=true 11 | HeaderFileListSize=5 12 | HeaderFiles#0=E:/Desktop/Power_X/Core/Inc/gpio.h 13 | HeaderFiles#1=E:/Desktop/Power_X/Core/Inc/tim.h 14 | HeaderFiles#2=E:/Desktop/Power_X/Core/Inc/stm32f1xx_it.h 15 | HeaderFiles#3=E:/Desktop/Power_X/Core/Inc/stm32f1xx_hal_conf.h 16 | HeaderFiles#4=E:/Desktop/Power_X/Core/Inc/main.h 17 | HeaderFolderListSize=1 18 | HeaderPath#0=E:/Desktop/Power_X/Core/Inc 19 | HeaderFiles=; 20 | SourceFileListSize=5 21 | SourceFiles#0=E:/Desktop/Power_X/Core/Src/gpio.c 22 | SourceFiles#1=E:/Desktop/Power_X/Core/Src/tim.c 23 | SourceFiles#2=E:/Desktop/Power_X/Core/Src/stm32f1xx_it.c 24 | SourceFiles#3=E:/Desktop/Power_X/Core/Src/stm32f1xx_hal_msp.c 25 | SourceFiles#4=E:/Desktop/Power_X/Core/Src/main.c 26 | SourceFolderListSize=1 27 | SourcePath#0=E:/Desktop/Power_X/Core/Src 28 | SourceFiles=; 29 | 30 | -------------------------------------------------------------------------------- /2.Software/Power_X/.vscode/c_cpp_properties.json: -------------------------------------------------------------------------------- 1 | { 2 | "env": { 3 | "sdkPath": "iot_link" 4 | }, 5 | "configurations": [ 6 | { 7 | "name": "Win32", 8 | "includePath": [ 9 | "C:/Users/Cheng/.iotlink/tools/gcc-arm-none-eabi/arm-none-eabi/include", 10 | "C:/Users/Cheng/.iotlink/tools/gcc-arm-none-eabi/lib/gcc/arm-none-eabi/9.2.1/include", 11 | "${workspaceFolder}/**", 12 | "${sdkPath}/**" 13 | ], 14 | "browse": { 15 | "limitSymbolsToIncludedHeaders": true 16 | }, 17 | "defines": [ 18 | "_DEBUG", 19 | "USE_HAL_DRIVER", 20 | "STM32F103xB" 21 | ], 22 | "intelliSenseMode": "clang-x64", 23 | "cStandard": "c11", 24 | "cppStandard": "c++14", 25 | "compilerPath": "C:/Users/Cheng/.iotlink/tools/gcc-arm-none-eabi/bin/arm-none-eabi-gcc.exe" 26 | } 27 | ], 28 | "version": 4 29 | } -------------------------------------------------------------------------------- /2.Software/Power_X/.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0.2.0", 3 | "configurations": [ 4 | { 5 | "name": "Launch", 6 | "type": "iotlink-debug", 7 | "request": "launch", 8 | "cwd": "${workspaceFolder}", 9 | "initBreak": "main" 10 | }, 11 | { 12 | "name": "Attach", 13 | "type": "iotlink-debug", 14 | "request": "attach", 15 | "cwd": "${workspaceFolder}" 16 | } 17 | ] 18 | } -------------------------------------------------------------------------------- /2.Software/Power_X/Core/Inc/bmp.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheng-inkor/Power_X/35a9ca20c014c2595a8f86b764cd9c75585b9506/2.Software/Power_X/Core/Inc/bmp.h -------------------------------------------------------------------------------- /2.Software/Power_X/Core/Inc/gpio.h: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * @file gpio.h 4 | * @brief This file contains all the function prototypes for 5 | * the gpio.c file 6 | ****************************************************************************** 7 | * @attention 8 | * 9 | *

© Copyright (c) 2021 STMicroelectronics. 10 | * All rights reserved.

11 | * 12 | * This software component is licensed by ST under BSD 3-Clause license, 13 | * the "License"; You may not use this file except in compliance with the 14 | * License. You may obtain a copy of the License at: 15 | * opensource.org/licenses/BSD-3-Clause 16 | * 17 | ****************************************************************************** 18 | */ 19 | /* Define to prevent recursive inclusion -------------------------------------*/ 20 | #ifndef __GPIO_H__ 21 | #define __GPIO_H__ 22 | 23 | #ifdef __cplusplus 24 | extern "C" { 25 | #endif 26 | 27 | /* Includes ------------------------------------------------------------------*/ 28 | #include "main.h" 29 | 30 | /* USER CODE BEGIN Includes */ 31 | 32 | /* USER CODE END Includes */ 33 | 34 | /* USER CODE BEGIN Private defines */ 35 | 36 | /* USER CODE END Private defines */ 37 | 38 | void MX_GPIO_Init(void); 39 | 40 | /* USER CODE BEGIN Prototypes */ 41 | 42 | /* USER CODE END Prototypes */ 43 | 44 | #ifdef __cplusplus 45 | } 46 | #endif 47 | #endif /*__ GPIO_H__ */ 48 | 49 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 50 | -------------------------------------------------------------------------------- /2.Software/Power_X/Core/Inc/ina226.h: -------------------------------------------------------------------------------- 1 | #ifndef __INA226_H 2 | #define __INA226_H 3 | #include "stm32f1xx_hal.h" 4 | #define CFG_REG 0x00 // 5 | #define SV_REG 0x01 //分流电压 6 | #define BV_REG 0x02 //总线电压 7 | #define PWR_REG 0x03 //电源功率 8 | #define CUR_REG 0x04 //电流 9 | #define CAL_REG 0x05 //校准,设定满量程范围以及电流和功率测数的 10 | #define ONFF_REG 0x06 //屏蔽 使能 警报配置和转换准备就绪 11 | #define AL_REG 0x07 //包含与所选警报功能相比较的限定值 12 | #define INA226_GET_ADDR 0XFF //包含唯一的芯片标识号 13 | #define INA226_ADDR1 0x80 14 | //#define INA226_GETALADDR 0x14 15 | 16 | //IO操作 17 | #define IIC_SCL_H HAL_GPIO_WritePin(GPIOB, GPIO_PIN_6, GPIO_PIN_SET) //SCL H 18 | #define IIC_SCL_L HAL_GPIO_WritePin(GPIOB, GPIO_PIN_6, GPIO_PIN_RESET) //SCL H 19 | #define IIC_SDA_H HAL_GPIO_WritePin(GPIOB, GPIO_PIN_7, GPIO_PIN_SET) //SDA_H 20 | #define IIC_SDA_L HAL_GPIO_WritePin(GPIOB, GPIO_PIN_7, GPIO_PIN_RESET) //SDA_L 21 | #define READ_SDA HAL_GPIO_ReadPin(GPIOB, GPIO_PIN_7) //输入SDA 22 | #define SDA_READ GPIOB->IDR &GPIO_IDR_IDR7 23 | 24 | //定义配置数据 25 | #define INA226_VAL_LSB 2.5f //分流电压 LSB 2.5uV 26 | #define Voltage_LSB 1.25f //总线电压 LSB 1.25mV 27 | #define CURRENT_LSB 1.0f //电流LSB 1mA 28 | #define POWER_LSB 25 * CURRENT_LSB 29 | #define CAL 456 //0.00512/(Current_LSB*R_SHUNT) = 470 //电流偏大改小 30 | 31 | typedef struct 32 | { 33 | float voltageVal; //mV 34 | float Shunt_voltage; //uV 35 | float Shunt_Current; //mA 36 | float Power_Val; //功率 37 | float Power; //功率mW 38 | uint32_t ina226_id; 39 | } INA226; 40 | 41 | void INA226_SetRegPointer(uint8_t addr, uint8_t reg); 42 | void INA226_SendData(uint8_t addr, uint8_t reg, uint16_t data); 43 | 44 | uint16_t INA226_ReadData(uint8_t addr); 45 | void INA226_Get_ID(uint8_t addr); //获取 id 46 | uint16_t INA226_GetVoltage(uint8_t addr); //获取总线电压装载值 47 | uint16_t INA226_GetShunt_Current(uint8_t addr); //获取分流电流装载值 48 | uint16_t INA226_GetShuntVoltage(uint8_t addr); //分流电压装载值 49 | //uint16_t INA226_Get_Power(uint8_t addr); //获取功率装载值,不使用 50 | uint16_t INA226_GET_CAL_REG(uint8_t addr); //获取校准值 51 | 52 | void mx_ina226_init(void); 53 | void GetVoltage(float *Voltage); 54 | void Get_Shunt_voltage(float *Current); 55 | void Get_Shunt_Current(float *Current); 56 | void get_power(void); ////获取功率= 总线电压 * 电流 57 | 58 | uint8_t INA226_AlertAddr(void); 59 | void Get_Power(float *Power); 60 | extern INA226 INA226_data; 61 | #endif 62 | -------------------------------------------------------------------------------- /2.Software/Power_X/Core/Inc/main.h: -------------------------------------------------------------------------------- 1 | /* USER CODE BEGIN Header */ 2 | /** 3 | ****************************************************************************** 4 | * @file : main.h 5 | * @brief : Header for main.c file. 6 | * This file contains the common defines of the application. 7 | ****************************************************************************** 8 | * @attention 9 | * 10 | *

© Copyright (c) 2021 STMicroelectronics. 11 | * All rights reserved.

12 | * 13 | * This software component is licensed by ST under BSD 3-Clause license, 14 | * the "License"; You may not use this file except in compliance with the 15 | * License. You may obtain a copy of the License at: 16 | * opensource.org/licenses/BSD-3-Clause 17 | * 18 | ****************************************************************************** 19 | */ 20 | /* USER CODE END Header */ 21 | 22 | /* Define to prevent recursive inclusion -------------------------------------*/ 23 | #ifndef __MAIN_H 24 | #define __MAIN_H 25 | 26 | #ifdef __cplusplus 27 | extern "C" { 28 | #endif 29 | 30 | /* Includes ------------------------------------------------------------------*/ 31 | #include "stm32f1xx_hal.h" 32 | 33 | /* Private includes ----------------------------------------------------------*/ 34 | /* USER CODE BEGIN Includes */ 35 | 36 | /* USER CODE END Includes */ 37 | 38 | /* Exported types ------------------------------------------------------------*/ 39 | /* USER CODE BEGIN ET */ 40 | 41 | /* USER CODE END ET */ 42 | 43 | /* Exported constants --------------------------------------------------------*/ 44 | /* USER CODE BEGIN EC */ 45 | 46 | /* USER CODE END EC */ 47 | 48 | /* Exported macro ------------------------------------------------------------*/ 49 | /* USER CODE BEGIN EM */ 50 | 51 | /* USER CODE END EM */ 52 | 53 | /* Exported functions prototypes ---------------------------------------------*/ 54 | void Error_Handler(void); 55 | 56 | /* USER CODE BEGIN EFP */ 57 | 58 | /* USER CODE END EFP */ 59 | 60 | /* Private defines -----------------------------------------------------------*/ 61 | #define KEY1_Pin GPIO_PIN_1 62 | #define KEY1_GPIO_Port GPIOA 63 | #define KEY1_EXTI_IRQn EXTI1_IRQn 64 | #define KEY2_Pin GPIO_PIN_2 65 | #define KEY2_GPIO_Port GPIOA 66 | #define KEY2_EXTI_IRQn EXTI2_IRQn 67 | #define KEY3_Pin GPIO_PIN_3 68 | #define KEY3_GPIO_Port GPIOA 69 | #define KEY3_EXTI_IRQn EXTI3_IRQn 70 | #define LED_Pin GPIO_PIN_12 71 | #define LED_GPIO_Port GPIOB 72 | #define I2C_CLK_Pin GPIO_PIN_6 73 | #define I2C_CLK_GPIO_Port GPIOB 74 | #define I2C_SDA_Pin GPIO_PIN_7 75 | #define I2C_SDA_GPIO_Port GPIOB 76 | /* USER CODE BEGIN Private defines */ 77 | 78 | /* USER CODE END Private defines */ 79 | 80 | #ifdef __cplusplus 81 | } 82 | #endif 83 | 84 | #endif /* __MAIN_H */ 85 | 86 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 87 | -------------------------------------------------------------------------------- /2.Software/Power_X/Core/Inc/oled.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheng-inkor/Power_X/35a9ca20c014c2595a8f86b764cd9c75585b9506/2.Software/Power_X/Core/Inc/oled.h -------------------------------------------------------------------------------- /2.Software/Power_X/Core/Inc/oledfont.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheng-inkor/Power_X/35a9ca20c014c2595a8f86b764cd9c75585b9506/2.Software/Power_X/Core/Inc/oledfont.h -------------------------------------------------------------------------------- /2.Software/Power_X/Core/Inc/stm32f1xx_it.h: -------------------------------------------------------------------------------- 1 | /* USER CODE BEGIN Header */ 2 | /** 3 | ****************************************************************************** 4 | * @file stm32f1xx_it.h 5 | * @brief This file contains the headers of the interrupt handlers. 6 | ****************************************************************************** 7 | * @attention 8 | * 9 | *

© Copyright (c) 2021 STMicroelectronics. 10 | * All rights reserved.

11 | * 12 | * This software component is licensed by ST under BSD 3-Clause license, 13 | * the "License"; You may not use this file except in compliance with the 14 | * License. You may obtain a copy of the License at: 15 | * opensource.org/licenses/BSD-3-Clause 16 | * 17 | ****************************************************************************** 18 | */ 19 | /* USER CODE END Header */ 20 | 21 | /* Define to prevent recursive inclusion -------------------------------------*/ 22 | #ifndef __STM32F1xx_IT_H 23 | #define __STM32F1xx_IT_H 24 | 25 | #ifdef __cplusplus 26 | extern "C" { 27 | #endif 28 | 29 | /* Private includes ----------------------------------------------------------*/ 30 | /* USER CODE BEGIN Includes */ 31 | 32 | /* USER CODE END Includes */ 33 | 34 | /* Exported types ------------------------------------------------------------*/ 35 | /* USER CODE BEGIN ET */ 36 | 37 | /* USER CODE END ET */ 38 | 39 | /* Exported constants --------------------------------------------------------*/ 40 | /* USER CODE BEGIN EC */ 41 | 42 | /* USER CODE END EC */ 43 | 44 | /* Exported macro ------------------------------------------------------------*/ 45 | /* USER CODE BEGIN EM */ 46 | 47 | /* USER CODE END EM */ 48 | 49 | /* Exported functions prototypes ---------------------------------------------*/ 50 | void NMI_Handler(void); 51 | void HardFault_Handler(void); 52 | void MemManage_Handler(void); 53 | void BusFault_Handler(void); 54 | void UsageFault_Handler(void); 55 | void SVC_Handler(void); 56 | void DebugMon_Handler(void); 57 | void PendSV_Handler(void); 58 | void SysTick_Handler(void); 59 | void EXTI1_IRQHandler(void); 60 | void EXTI2_IRQHandler(void); 61 | void EXTI3_IRQHandler(void); 62 | void TIM1_UP_IRQHandler(void); 63 | /* USER CODE BEGIN EFP */ 64 | 65 | /* USER CODE END EFP */ 66 | 67 | #ifdef __cplusplus 68 | } 69 | #endif 70 | 71 | #endif /* __STM32F1xx_IT_H */ 72 | 73 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 74 | -------------------------------------------------------------------------------- /2.Software/Power_X/Core/Inc/tim.h: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * @file tim.h 4 | * @brief This file contains all the function prototypes for 5 | * the tim.c file 6 | ****************************************************************************** 7 | * @attention 8 | * 9 | *

© Copyright (c) 2021 STMicroelectronics. 10 | * All rights reserved.

11 | * 12 | * This software component is licensed by ST under BSD 3-Clause license, 13 | * the "License"; You may not use this file except in compliance with the 14 | * License. You may obtain a copy of the License at: 15 | * opensource.org/licenses/BSD-3-Clause 16 | * 17 | ****************************************************************************** 18 | */ 19 | /* Define to prevent recursive inclusion -------------------------------------*/ 20 | #ifndef __TIM_H__ 21 | #define __TIM_H__ 22 | 23 | #ifdef __cplusplus 24 | extern "C" { 25 | #endif 26 | 27 | /* Includes ------------------------------------------------------------------*/ 28 | #include "main.h" 29 | 30 | /* USER CODE BEGIN Includes */ 31 | 32 | /* USER CODE END Includes */ 33 | 34 | extern TIM_HandleTypeDef htim1; 35 | 36 | /* USER CODE BEGIN Private defines */ 37 | extern uint8_t Flag_KEY1; 38 | extern uint8_t Flag_KEY2; 39 | extern uint8_t Flag_KEY3; 40 | /* USER CODE END Private defines */ 41 | 42 | void MX_TIM1_Init(void); 43 | 44 | /* USER CODE BEGIN Prototypes */ 45 | void Data_Refresh_Task(); 46 | void Oled_Data_List(); 47 | /* USER CODE END Prototypes */ 48 | 49 | #ifdef __cplusplus 50 | } 51 | #endif 52 | 53 | #endif /* __TIM_H__ */ 54 | 55 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 56 | -------------------------------------------------------------------------------- /2.Software/Power_X/Core/Src/gpio.c: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * @file gpio.c 4 | * @brief This file provides code for the configuration 5 | * of all used GPIO pins. 6 | ****************************************************************************** 7 | * @attention 8 | * 9 | *

© Copyright (c) 2021 STMicroelectronics. 10 | * All rights reserved.

11 | * 12 | * This software component is licensed by ST under BSD 3-Clause license, 13 | * the "License"; You may not use this file except in compliance with the 14 | * License. You may obtain a copy of the License at: 15 | * opensource.org/licenses/BSD-3-Clause 16 | * 17 | ****************************************************************************** 18 | */ 19 | 20 | /* Includes ------------------------------------------------------------------*/ 21 | #include "gpio.h" 22 | 23 | /* USER CODE BEGIN 0 */ 24 | uint8_t Flag_KEY1 = 0; 25 | uint8_t Flag_KEY2 = 0; 26 | uint8_t Flag_KEY3 = 0; 27 | HAL_GPIO_EXTI_Callback(uint16_t GPIO_Pin) 28 | { 29 | if (GPIO_Pin == KEY1_Pin) 30 | { 31 | // HAL_Delay(10); 32 | if (HAL_GPIO_ReadPin(KEY3_GPIO_Port, KEY1_Pin) == RESET) 33 | { 34 | Flag_KEY1 = 1; 35 | } 36 | } 37 | if (GPIO_Pin == KEY2_Pin) 38 | { 39 | // HAL_Delay(10); 40 | if (HAL_GPIO_ReadPin(KEY2_GPIO_Port, KEY2_Pin) == RESET) 41 | { 42 | Flag_KEY2 = 1; 43 | } 44 | } 45 | if (GPIO_Pin == KEY3_Pin) 46 | { 47 | // HAL_Delay(10); 48 | if (HAL_GPIO_ReadPin(KEY3_GPIO_Port, KEY3_Pin) == RESET) 49 | { 50 | Flag_KEY3 = 1; 51 | } 52 | } 53 | } 54 | /* USER CODE END 0 */ 55 | 56 | /*----------------------------------------------------------------------------*/ 57 | /* Configure GPIO */ 58 | /*----------------------------------------------------------------------------*/ 59 | /* USER CODE BEGIN 1 */ 60 | 61 | /* USER CODE END 1 */ 62 | 63 | /** Configure pins as 64 | * Analog 65 | * Input 66 | * Output 67 | * EVENT_OUT 68 | * EXTI 69 | */ 70 | void MX_GPIO_Init(void) 71 | { 72 | 73 | GPIO_InitTypeDef GPIO_InitStruct = {0}; 74 | 75 | /* GPIO Ports Clock Enable */ 76 | __HAL_RCC_GPIOC_CLK_ENABLE(); 77 | __HAL_RCC_GPIOD_CLK_ENABLE(); 78 | __HAL_RCC_GPIOA_CLK_ENABLE(); 79 | __HAL_RCC_GPIOB_CLK_ENABLE(); 80 | 81 | /*Configure GPIO pin Output Level */ 82 | HAL_GPIO_WritePin(GPIOB, LED_Pin|I2C_CLK_Pin|I2C_SDA_Pin, GPIO_PIN_SET); 83 | 84 | /*Configure GPIO pins : PAPin PAPin PAPin */ 85 | GPIO_InitStruct.Pin = KEY1_Pin|KEY2_Pin|KEY3_Pin; 86 | GPIO_InitStruct.Mode = GPIO_MODE_IT_FALLING; 87 | GPIO_InitStruct.Pull = GPIO_PULLUP; 88 | HAL_GPIO_Init(GPIOA, &GPIO_InitStruct); 89 | 90 | /*Configure GPIO pins : PBPin PBPin PBPin */ 91 | GPIO_InitStruct.Pin = LED_Pin|I2C_CLK_Pin|I2C_SDA_Pin; 92 | GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP; 93 | GPIO_InitStruct.Pull = GPIO_NOPULL; 94 | GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH; 95 | HAL_GPIO_Init(GPIOB, &GPIO_InitStruct); 96 | 97 | /* EXTI interrupt init*/ 98 | HAL_NVIC_SetPriority(EXTI1_IRQn, 1, 1); 99 | HAL_NVIC_EnableIRQ(EXTI1_IRQn); 100 | 101 | HAL_NVIC_SetPriority(EXTI2_IRQn, 1, 1); 102 | HAL_NVIC_EnableIRQ(EXTI2_IRQn); 103 | 104 | HAL_NVIC_SetPriority(EXTI3_IRQn, 1, 1); 105 | HAL_NVIC_EnableIRQ(EXTI3_IRQn); 106 | 107 | } 108 | 109 | /* USER CODE BEGIN 2 */ 110 | 111 | /* USER CODE END 2 */ 112 | 113 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 114 | -------------------------------------------------------------------------------- /2.Software/Power_X/Core/Src/ina226.c: -------------------------------------------------------------------------------- 1 | #include "ina226.h" 2 | // 模拟IIC: 3 | 4 | INA226 INA226_data; 5 | 6 | static void delay_nns(uint16_t D) //30纳秒ns 根据手册要用到IIC的HS高速模式 7 | { 8 | while (--D) 9 | ; 10 | } 11 | 12 | void delay_nms(uint16_t ms) //毫秒 13 | { 14 | uint16_t i; 15 | uint32_t M = 0; //720W 16 | for (i = 0; i < ms; i++) 17 | for (M = 12000; M > 0; M--) 18 | ; 19 | } 20 | 21 | void delay_nus(uint16_t us) //微秒 22 | { 23 | uint16_t i; 24 | uint16_t M = 0; //720W 25 | for (i = 0; i < us; i++) 26 | for (M = 72; M > 0; M--) 27 | ; 28 | } 29 | 30 | void INA226_IIC_Init(void) 31 | { 32 | // GPIO_InitTypeDef GPIO_Initure; 33 | // __HAL_RCC_GPIOB_CLK_ENABLE(); //使能GPIOB时钟 34 | 35 | // GPIO_Initure.Pin = GPIO_PIN_6 | GPIO_PIN_7; //PB10SCL PB11SDA 36 | // GPIO_Initure.Mode = GPIO_MODE_OUTPUT_PP; //推挽输出 37 | // GPIO_Initure.Pull = GPIO_PULLUP; //上拉 38 | // GPIO_Initure.Speed = GPIO_SPEED_FREQ_HIGH; //高速 39 | // HAL_GPIO_Init(GPIOB, &GPIO_Initure); 40 | 41 | IIC_SDA_H; 42 | IIC_SCL_H; 43 | delay_nms(5); 44 | } 45 | 46 | void INA226_IIC_Start(void) 47 | { 48 | IIC_SDA_H; 49 | IIC_SCL_H; 50 | delay_nns(5); 51 | IIC_SDA_L; //START:when CLK is high,DATA change form high to low 52 | delay_nns(5); 53 | IIC_SCL_L; //钳住I2C总线,准备发送或接收数据 54 | delay_nns(5); 55 | } 56 | 57 | void INA226_IIC_Stop(void) 58 | { 59 | IIC_SDA_L; //STOP:when CLK is high DATA change form low to high 60 | delay_nns(5); 61 | IIC_SCL_H; 62 | delay_nns(5); 63 | IIC_SDA_H; //发送I2C总线结束信号 64 | delay_nns(5); 65 | } 66 | 67 | void INA226_IIC_Ack(void) 68 | { 69 | IIC_SDA_L; 70 | delay_nns(5); 71 | IIC_SCL_H; 72 | delay_nns(5); 73 | IIC_SCL_L; 74 | delay_nns(5); 75 | IIC_SDA_H; 76 | } 77 | 78 | void INA226_IIC_NAck(void) 79 | { 80 | IIC_SDA_H; 81 | delay_nns(5); 82 | IIC_SCL_H; 83 | delay_nns(5); 84 | IIC_SCL_L; 85 | delay_nns(5); 86 | IIC_SDA_L; 87 | } 88 | 89 | uint8_t INA226_IIC_Wait_Ack(void) 90 | { 91 | uint8_t ucErrTime = 0; 92 | //SDA_IN(); //SDA设置为输入 93 | IIC_SDA_H; 94 | delay_nns(5); 95 | IIC_SCL_H; 96 | delay_nns(5); 97 | 98 | while (READ_SDA) 99 | { 100 | ucErrTime++; 101 | if (ucErrTime > 250) 102 | { 103 | INA226_IIC_Stop(); 104 | return 1; 105 | } 106 | } 107 | IIC_SCL_L; //时钟输出0 108 | return 0; 109 | } 110 | 111 | void INA226_IIC_Send_Byte(uint8_t txd) 112 | { 113 | IIC_SCL_L; //拉低时钟开始数据传输 114 | for (uint8_t i = 0; i < 8; i++) 115 | { 116 | if (txd & 0x80) 117 | IIC_SDA_H; 118 | else 119 | IIC_SDA_L; 120 | txd <<= 1; 121 | 122 | IIC_SCL_H; 123 | delay_nns(5); 124 | IIC_SCL_L; 125 | delay_nns(5); 126 | } 127 | // IIC_SDA_H; 128 | // IIC_SCL_H; //当去掉wait_ack时的时候添加 129 | // delay_nns(5); 130 | //IIC_SCL_L; 131 | } 132 | 133 | uint8_t INA226_IIC_Read_Byte(unsigned char ack) 134 | { 135 | uint8_t TData = 0, i; 136 | for (i = 0; i < 8; i++) 137 | { 138 | IIC_SCL_H; 139 | delay_nns(5); 140 | TData = TData << 1; 141 | //if(GPIOB->IDR& GPIO_IDR_IDR7) //判断SDA是否为高 142 | if (SDA_READ) 143 | { 144 | TData |= 0x01; 145 | } 146 | IIC_SCL_L; 147 | delay_nns(5); 148 | } 149 | if (!ack) 150 | INA226_IIC_NAck(); 151 | else 152 | INA226_IIC_Ack(); 153 | // IIC_SCL_L; 154 | // delay_nns(5); 155 | // IIC_SDA_L; 156 | // delay_nns(5); //ACK 157 | // IIC_SCL_H; 158 | // delay_nns(5); 159 | // IIC_SCL_L; 160 | // delay_nns(5); 161 | // IIC_SDA_H; 162 | return TData; 163 | } 164 | 165 | /**********************IIC_END*************************/ 166 | 167 | //初始化INA226 168 | void mx_ina226_init(void) 169 | { 170 | 171 | INA226_IIC_Init(); 172 | INA226_SendData(INA226_ADDR1, CFG_REG, 0x8000); //重新启动 173 | 174 | INA226_SendData(INA226_ADDR1, CFG_REG, 0x484f); //设置转换时间204us,求平均值次数128,采样时间为204*128,设置模式为分流和总线连续模式 175 | INA226_SendData(INA226_ADDR1, CAL_REG, CAL); //设置分辨率 176 | INA226_Get_ID(INA226_ADDR1); //获取ina226的id 177 | } 178 | 179 | //设置寄存器指针 180 | void INA226_SetRegPointer(uint8_t addr, uint8_t reg) 181 | { 182 | INA226_IIC_Start(); 183 | 184 | INA226_IIC_Send_Byte(addr); 185 | INA226_IIC_Wait_Ack(); 186 | 187 | INA226_IIC_Send_Byte(reg); 188 | INA226_IIC_Wait_Ack(); 189 | 190 | INA226_IIC_Stop(); 191 | } 192 | 193 | //发送,写入数据 194 | void INA226_SendData(uint8_t addr, uint8_t reg, uint16_t data) 195 | { 196 | uint8_t temp = 0; 197 | INA226_IIC_Start(); 198 | 199 | INA226_IIC_Send_Byte(addr); 200 | INA226_IIC_Wait_Ack(); 201 | 202 | INA226_IIC_Send_Byte(reg); 203 | INA226_IIC_Wait_Ack(); 204 | 205 | temp = (uint8_t)(data >> 8); 206 | INA226_IIC_Send_Byte(temp); 207 | INA226_IIC_Wait_Ack(); 208 | 209 | temp = (uint8_t)(data & 0x00FF); 210 | INA226_IIC_Send_Byte(temp); 211 | INA226_IIC_Wait_Ack(); 212 | 213 | INA226_IIC_Stop(); 214 | } 215 | 216 | //读取数据 217 | uint16_t INA226_ReadData(uint8_t addr) 218 | { 219 | uint16_t temp = 0; 220 | INA226_IIC_Start(); 221 | 222 | INA226_IIC_Send_Byte(addr + 1); 223 | INA226_IIC_Wait_Ack(); 224 | 225 | temp = INA226_IIC_Read_Byte(1); 226 | temp <<= 8; 227 | temp |= INA226_IIC_Read_Byte(0); 228 | 229 | INA226_IIC_Stop(); 230 | return temp; 231 | } 232 | //1mA/bit 233 | uint16_t INA226_GetShunt_Current(uint8_t addr) 234 | { 235 | uint16_t temp = 0; 236 | INA226_SetRegPointer(addr, CUR_REG); 237 | temp = INA226_ReadData(addr); 238 | if (temp & 0x8000) 239 | temp = ~(temp - 1); 240 | return temp; 241 | } 242 | 243 | //获取id 244 | void INA226_Get_ID(uint8_t addr) 245 | { 246 | uint32_t temp = 0; 247 | INA226_SetRegPointer(addr, INA226_GET_ADDR); 248 | temp = INA226_ReadData(addr); 249 | INA226_data.ina226_id = temp; 250 | } 251 | 252 | //获取校准值 253 | uint16_t INA226_GET_CAL_REG(uint8_t addr) 254 | { 255 | uint32_t temp = 0; 256 | INA226_SetRegPointer(addr, CAL_REG); 257 | temp = INA226_ReadData(addr); 258 | return (uint16_t)temp; 259 | } 260 | 261 | //1.25mV/bit 262 | uint16_t INA226_GetVoltage(uint8_t addr) 263 | { 264 | uint32_t temp = 0; 265 | INA226_SetRegPointer(addr, BV_REG); 266 | temp = INA226_ReadData(addr); 267 | return (uint16_t)temp; 268 | } 269 | 270 | //2.5uV/bit 271 | uint16_t INA226_GetShuntVoltage(uint8_t addr) 272 | { 273 | int16_t temp = 0; 274 | INA226_SetRegPointer(addr, SV_REG); 275 | temp = INA226_ReadData(addr); 276 | if (temp & 0x8000) 277 | temp = ~(temp - 1); 278 | return (uint16_t)temp; 279 | } 280 | 281 | //获取电压 282 | void GetVoltage(float *Voltage) //mV 283 | { 284 | *Voltage = INA226_GetVoltage(INA226_ADDR1) * Voltage_LSB; 285 | } 286 | 287 | //获取分流电压 288 | void Get_Shunt_voltage(float *Voltage) //uV 289 | { 290 | *Voltage = (INA226_GetShuntVoltage(INA226_ADDR1) * INA226_VAL_LSB); //如需矫正电流分流参数请将这里改为2.5 291 | } 292 | 293 | //获取电流 294 | void Get_Shunt_Current(float *Current) //mA 295 | { 296 | *Current = (INA226_GetShunt_Current(INA226_ADDR1) * CURRENT_LSB); 297 | } 298 | 299 | //获取功率= 总线电压 * 电流 300 | void get_power() //W 301 | { 302 | GetVoltage(&INA226_data.voltageVal); //mV 303 | Get_Shunt_voltage(&INA226_data.Shunt_voltage); //uV 304 | Get_Shunt_Current(&INA226_data.Shunt_Current); //mA 305 | Get_Power(&INA226_data.Power); 306 | INA226_data.Power_Val = INA226_data.voltageVal * 0.001f * INA226_data.Shunt_Current * 0.001f; //mV*mA 307 | } 308 | 309 | //获取功率装载值,ina226内部计算的的功率,由于未经校准,故不采用 310 | 311 | uint16_t INA226_Get_Power(uint8_t addr) 312 | { 313 | int16_t temp = 0; 314 | INA226_SetRegPointer(addr, PWR_REG); 315 | temp = INA226_ReadData(addr); 316 | return (uint16_t)temp; 317 | } 318 | 319 | //获取功率,ina226内部计算,不准确,不采用 320 | void Get_Power(float *Power) //W 321 | { 322 | *Power = (INA226_Get_Power(INA226_ADDR1) * POWER_LSB); 323 | } 324 | 325 | //不设置报警,舍弃 326 | /* 327 | uint8_t INA226_AlertAddr() 328 | { 329 | uint8_t temp; 330 | IIC_Start(); 331 | 332 | IIC_Send_Byte(INA226_GETALADDR); 333 | IIC_Wait_Ack(); 334 | 335 | temp = IIC_Read_Byte(1); 336 | 337 | IIC_Stop(); 338 | return temp; 339 | } 340 | */ 341 | -------------------------------------------------------------------------------- /2.Software/Power_X/Core/Src/main.c: -------------------------------------------------------------------------------- 1 | /* USER CODE BEGIN Header */ 2 | /** 3 | ****************************************************************************** 4 | * @file : main.c 5 | * @brief : Main program body 6 | ****************************************************************************** 7 | * @attention 8 | * 9 | *

© Copyright (c) 2021 STMicroelectronics. 10 | * All rights reserved.

11 | * 12 | * This software component is licensed by ST under BSD 3-Clause license, 13 | * the "License"; You may not use this file except in compliance with the 14 | * License. You may obtain a copy of the License at: 15 | * opensource.org/licenses/BSD-3-Clause 16 | * 17 | ****************************************************************************** 18 | */ 19 | /* USER CODE END Header */ 20 | /* Includes ------------------------------------------------------------------*/ 21 | #include "main.h" 22 | #include "tim.h" 23 | #include "gpio.h" 24 | 25 | /* Private includes ----------------------------------------------------------*/ 26 | /* USER CODE BEGIN Includes */ 27 | #include 28 | #include 29 | 30 | /* USER CODE END Includes */ 31 | 32 | /* Private typedef -----------------------------------------------------------*/ 33 | /* USER CODE BEGIN PTD */ 34 | 35 | /* USER CODE END PTD */ 36 | 37 | /* Private define ------------------------------------------------------------*/ 38 | /* USER CODE BEGIN PD */ 39 | /* USER CODE END PD */ 40 | 41 | /* Private macro -------------------------------------------------------------*/ 42 | /* USER CODE BEGIN PM */ 43 | 44 | /* USER CODE END PM */ 45 | 46 | /* Private variables ---------------------------------------------------------*/ 47 | 48 | /* USER CODE BEGIN PV */ 49 | 50 | /* USER CODE END PV */ 51 | 52 | /* Private function prototypes -----------------------------------------------*/ 53 | void SystemClock_Config(void); 54 | /* USER CODE BEGIN PFP */ 55 | 56 | /* USER CODE END PFP */ 57 | 58 | /* Private user code ---------------------------------------------------------*/ 59 | /* USER CODE BEGIN 0 */ 60 | 61 | /* USER CODE END 0 */ 62 | 63 | /** 64 | * @brief The application entry point. 65 | * @retval int 66 | */ 67 | int main(void) 68 | { 69 | /* USER CODE BEGIN 1 */ 70 | 71 | /* USER CODE END 1 */ 72 | 73 | /* MCU Configuration--------------------------------------------------------*/ 74 | 75 | /* Reset of all peripherals, Initializes the Flash interface and the Systick. */ 76 | HAL_Init(); 77 | 78 | /* USER CODE BEGIN Init */ 79 | 80 | /* USER CODE END Init */ 81 | 82 | /* Configure the system clock */ 83 | SystemClock_Config(); 84 | 85 | /* USER CODE BEGIN SysInit */ 86 | 87 | /* USER CODE END SysInit */ 88 | 89 | /* Initialize all configured peripherals */ 90 | MX_GPIO_Init(); 91 | MX_TIM1_Init(); 92 | /* USER CODE BEGIN 2 */ 93 | mx_ina226_init(); 94 | OLED_Init(); 95 | OLED_Clear(); 96 | HAL_TIM_Base_Start_IT(&htim1); 97 | /* USER CODE END 2 */ 98 | 99 | /* Infinite loop */ 100 | /* USER CODE BEGIN WHILE */ 101 | while (1) 102 | { 103 | /* USER CODE END WHILE */ 104 | 105 | /* USER CODE BEGIN 3 */ 106 | } 107 | /* USER CODE END 3 */ 108 | } 109 | 110 | /** 111 | * @brief System Clock Configuration 112 | * @retval None 113 | */ 114 | void SystemClock_Config(void) 115 | { 116 | RCC_OscInitTypeDef RCC_OscInitStruct = {0}; 117 | RCC_ClkInitTypeDef RCC_ClkInitStruct = {0}; 118 | 119 | /** Initializes the RCC Oscillators according to the specified parameters 120 | * in the RCC_OscInitTypeDef structure. 121 | */ 122 | RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSE; 123 | RCC_OscInitStruct.HSEState = RCC_HSE_ON; 124 | RCC_OscInitStruct.HSEPredivValue = RCC_HSE_PREDIV_DIV1; 125 | RCC_OscInitStruct.HSIState = RCC_HSI_ON; 126 | RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON; 127 | RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSE; 128 | RCC_OscInitStruct.PLL.PLLMUL = RCC_PLL_MUL9; 129 | if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK) 130 | { 131 | Error_Handler(); 132 | } 133 | /** Initializes the CPU, AHB and APB buses clocks 134 | */ 135 | RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK | RCC_CLOCKTYPE_SYSCLK | RCC_CLOCKTYPE_PCLK1 | RCC_CLOCKTYPE_PCLK2; 136 | RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK; 137 | RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1; 138 | RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV2; 139 | RCC_ClkInitStruct.APB2CLKDivider = RCC_HCLK_DIV1; 140 | 141 | if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_2) != HAL_OK) 142 | { 143 | Error_Handler(); 144 | } 145 | } 146 | 147 | /* USER CODE BEGIN 4 */ 148 | 149 | /* USER CODE END 4 */ 150 | 151 | /** 152 | * @brief This function is executed in case of error occurrence. 153 | * @retval None 154 | */ 155 | void Error_Handler(void) 156 | { 157 | /* USER CODE BEGIN Error_Handler_Debug */ 158 | /* User can add his own implementation to report the HAL error return state */ 159 | __disable_irq(); 160 | while (1) 161 | { 162 | } 163 | /* USER CODE END Error_Handler_Debug */ 164 | } 165 | 166 | #ifdef USE_FULL_ASSERT 167 | /** 168 | * @brief Reports the name of the source file and the source line number 169 | * where the assert_param error has occurred. 170 | * @param file: pointer to the source file name 171 | * @param line: assert_param error line source number 172 | * @retval None 173 | */ 174 | void assert_failed(uint8_t *file, uint32_t line) 175 | { 176 | /* USER CODE BEGIN 6 */ 177 | /* User can add his own implementation to report the file name and line number, 178 | ex: printf("Wrong parameters value: file %s on line %d\r\n", file, line) */ 179 | /* USER CODE END 6 */ 180 | } 181 | #endif /* USE_FULL_ASSERT */ 182 | 183 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 184 | -------------------------------------------------------------------------------- /2.Software/Power_X/Core/Src/oled.c: -------------------------------------------------------------------------------- 1 | #include "oled.h" 2 | #include "oledfont.h" 3 | //OLED的显存 4 | //存放格式如下. 5 | //[0]0 1 2 3 ... 127 6 | //[1]0 1 2 3 ... 127 7 | //[2]0 1 2 3 ... 127 8 | //[3]0 1 2 3 ... 127 9 | //[4]0 1 2 3 ... 127 10 | //[5]0 1 2 3 ... 127 11 | //[6]0 1 2 3 ... 127 12 | //[7]0 1 2 3 ... 127 13 | /********************************************** 14 | //IIC Start 15 | **********************************************/ 16 | /********************************************** 17 | //IIC Start 18 | **********************************************/ 19 | void IIC_Start() 20 | { 21 | OLED_SCLK_Set(); 22 | OLED_SDIN_Set(); 23 | OLED_SDIN_Clr(); 24 | OLED_SCLK_Clr(); 25 | } 26 | 27 | /********************************************** 28 | //IIC Stop 29 | **********************************************/ 30 | void IIC_Stop() 31 | { 32 | OLED_SCLK_Set(); 33 | // OLED_SCLK_Clr(); 34 | OLED_SDIN_Clr(); 35 | OLED_SDIN_Set(); 36 | } 37 | 38 | void IIC_Wait_Ack() 39 | { 40 | 41 | //GPIOB->CRH &= 0XFFF0FFFF; //设置PB12为上拉输入模式 42 | //GPIOB->CRH |= 0x00080000; 43 | // OLED_SDA = 1; 44 | // delay_us(1); 45 | //OLED_SCL = 1; 46 | //delay_us(50000); 47 | /* while(1) 48 | { 49 | if(!OLED_SDA) //判断是否接收到OLED 应答信号 50 | { 51 | //GPIOB->CRH &= 0XFFF0FFFF; //设置PB12为通用推免输出模式 52 | //GPIOB->CRH |= 0x00030000; 53 | return; 54 | } 55 | } 56 | */ 57 | OLED_SCLK_Set(); 58 | OLED_SCLK_Clr(); 59 | } 60 | /********************************************** 61 | // IIC Write byte 62 | **********************************************/ 63 | 64 | void Write_IIC_Byte(unsigned char IIC_Byte) 65 | { 66 | unsigned char i; 67 | unsigned char m, da; 68 | da = IIC_Byte; 69 | OLED_SCLK_Clr(); 70 | for (i = 0; i < 8; i++) 71 | { 72 | m = da; 73 | // OLED_SCLK_Clr(); 74 | m = m & 0x80; 75 | if (m == 0x80) 76 | { 77 | OLED_SDIN_Set(); 78 | } 79 | else 80 | OLED_SDIN_Clr(); 81 | da = da << 1; 82 | OLED_SCLK_Set(); 83 | OLED_SCLK_Clr(); 84 | } 85 | } 86 | /********************************************** 87 | // IIC Write Command 88 | **********************************************/ 89 | void Write_IIC_Command(unsigned char IIC_Command) 90 | { 91 | IIC_Start(); 92 | Write_IIC_Byte(0x78); //Slave address,SA0=0 93 | IIC_Wait_Ack(); 94 | Write_IIC_Byte(0x00); //write command 95 | IIC_Wait_Ack(); 96 | Write_IIC_Byte(IIC_Command); 97 | IIC_Wait_Ack(); 98 | IIC_Stop(); 99 | } 100 | /********************************************** 101 | // IIC Write Data 102 | **********************************************/ 103 | void Write_IIC_Data(unsigned char IIC_Data) 104 | { 105 | IIC_Start(); 106 | Write_IIC_Byte(0x78); //D/C#=0; R/W#=0 107 | IIC_Wait_Ack(); 108 | Write_IIC_Byte(0x40); //write data 109 | IIC_Wait_Ack(); 110 | Write_IIC_Byte(IIC_Data); 111 | IIC_Wait_Ack(); 112 | IIC_Stop(); 113 | } 114 | void OLED_WR_Byte(unsigned dat, unsigned cmd) 115 | { 116 | if (cmd) 117 | { 118 | 119 | Write_IIC_Data(dat); 120 | } 121 | else 122 | { 123 | Write_IIC_Command(dat); 124 | } 125 | } 126 | 127 | /******************************************** 128 | // fill_Picture 129 | ********************************************/ 130 | void fill_picture(unsigned char fill_Data) 131 | { 132 | unsigned char m, n; 133 | for (m = 0; m < 8; m++) 134 | { 135 | OLED_WR_Byte(0xb0 + m, 0); //page0-page1 136 | OLED_WR_Byte(0x00, 0); //low column start address 137 | OLED_WR_Byte(0x10, 0); //high column start address 138 | for (n = 0; n < 128; n++) 139 | { 140 | OLED_WR_Byte(fill_Data, 1); 141 | } 142 | } 143 | } 144 | 145 | /***********************Delay****************************************/ 146 | void Delay_50ms(unsigned int Del_50ms) 147 | { 148 | unsigned int m; 149 | for (; Del_50ms > 0; Del_50ms--) 150 | for (m = 6245; m > 0; m--) 151 | ; 152 | } 153 | 154 | void Delay_1ms(unsigned int Del_1ms) 155 | { 156 | unsigned char j; 157 | while (Del_1ms--) 158 | { 159 | for (j = 0; j < 123; j++) 160 | ; 161 | } 162 | } 163 | 164 | //坐标设置 165 | 166 | void OLED_Set_Pos(unsigned char x, unsigned char y) 167 | { 168 | OLED_WR_Byte(0xb0 + y, OLED_CMD); 169 | OLED_WR_Byte(((x & 0xf0) >> 4) | 0x10, OLED_CMD); 170 | OLED_WR_Byte((x & 0x0f), OLED_CMD); 171 | } 172 | //开启OLED显示 173 | void OLED_Display_On(void) 174 | { 175 | OLED_WR_Byte(0X8D, OLED_CMD); //SET DCDC命令 176 | OLED_WR_Byte(0X14, OLED_CMD); //DCDC ON 177 | OLED_WR_Byte(0XAF, OLED_CMD); //DISPLAY ON 178 | } 179 | //关闭OLED显示 180 | void OLED_Display_Off(void) 181 | { 182 | OLED_WR_Byte(0X8D, OLED_CMD); //SET DCDC命令 183 | OLED_WR_Byte(0X10, OLED_CMD); //DCDC OFF 184 | OLED_WR_Byte(0XAE, OLED_CMD); //DISPLAY OFF 185 | } 186 | //清屏函数,清完屏,整个屏幕是黑色的!和没点亮一样!!! 187 | void OLED_Clear(void) 188 | { 189 | uint8_t i, n; 190 | for (i = 0; i < 8; i++) 191 | { 192 | OLED_WR_Byte(0xb0 + i, OLED_CMD); //设置页地址(0~7) 193 | OLED_WR_Byte(0x00, OLED_CMD); //设置显示位置—列低地址 194 | OLED_WR_Byte(0x10, OLED_CMD); //设置显示位置—列高地址 195 | for (n = 0; n < 128; n++) 196 | OLED_WR_Byte(0, OLED_DATA); 197 | } //更新显示 198 | } 199 | void OLED_On(void) 200 | { 201 | uint8_t i, n; 202 | for (i = 0; i < 8; i++) 203 | { 204 | OLED_WR_Byte(0xb0 + i, OLED_CMD); //设置页地址(0~7) 205 | OLED_WR_Byte(0x00, OLED_CMD); //设置显示位置—列低地址 206 | OLED_WR_Byte(0x10, OLED_CMD); //设置显示位置—列高地址 207 | for (n = 0; n < 128; n++) 208 | OLED_WR_Byte(1, OLED_DATA); 209 | } //更新显示 210 | } 211 | //在指定位置显示一个字符,包括部分字符 212 | //x:0~127 213 | //y:0~63 214 | //mode:0,反白显示;1,正常显示 215 | //size:选择字体 16/12 216 | void OLED_ShowChar(uint8_t x, uint8_t y, uint8_t chr, uint8_t Char_Size) 217 | { 218 | unsigned char c = 0, i = 0; 219 | c = chr - ' '; //得到偏移后的值 220 | if (x > Max_Column - 1) 221 | { 222 | x = 0; 223 | y = y + 2; 224 | } 225 | if (Char_Size == 16) 226 | { 227 | OLED_Set_Pos(x, y); 228 | for (i = 0; i < 8; i++) 229 | OLED_WR_Byte(F8X16[c * 16 + i], OLED_DATA); 230 | OLED_Set_Pos(x, y + 1); 231 | for (i = 0; i < 8; i++) 232 | OLED_WR_Byte(F8X16[c * 16 + i + 8], OLED_DATA); 233 | } 234 | else 235 | { 236 | OLED_Set_Pos(x, y); 237 | for (i = 0; i < 6; i++) 238 | OLED_WR_Byte(F6x8[c][i], OLED_DATA); 239 | } 240 | } 241 | //m^n函数 242 | uint32_t oled_pow(uint8_t m, uint8_t n) 243 | { 244 | uint32_t result = 1; 245 | while (n--) 246 | result *= m; 247 | return result; 248 | } 249 | //显示2个数字 250 | //x,y :起点坐标 251 | //len :数字的位数 252 | //size:字体大小 253 | //mode:模式 0,填充模式;1,叠加模式 254 | //num:数值(0~4294967295); 255 | void OLED_ShowNum(uint8_t x, uint8_t y, uint8_t num, uint8_t len, uint8_t size2) 256 | { 257 | uint8_t t, temp; 258 | uint8_t enshow = 0; 259 | for (t = 0; t < len; t++) 260 | { 261 | temp = (num / oled_pow(10, len - t - 1)) % 10; 262 | if (enshow == 0 && t < (len - 1)) 263 | { 264 | if (temp == 0) 265 | { 266 | OLED_ShowChar(x + (size2 / 2) * t, y, '0', size2); 267 | continue; 268 | } 269 | else 270 | enshow = 1; 271 | } 272 | OLED_ShowChar(x + (size2 / 2) * t, y, temp + '0', size2); 273 | } 274 | } 275 | //显示一个字符号串 276 | void OLED_ShowString(uint8_t x, uint8_t y, uint8_t *chr, uint8_t Char_Size) 277 | { 278 | unsigned char j = 0; 279 | while (chr[j] != '\0') 280 | { 281 | OLED_ShowChar(x, y, chr[j], Char_Size); 282 | x += 8; 283 | if (x > 120) 284 | { 285 | x = 0; 286 | y += 2; 287 | } 288 | j++; 289 | } 290 | } 291 | //显示汉字 292 | void OLED_ShowCHinese(uint8_t x, uint8_t y, uint8_t no) 293 | { 294 | uint8_t t, adder = 0; 295 | OLED_Set_Pos(x, y); 296 | for (t = 0; t < 16; t++) 297 | { 298 | OLED_WR_Byte(Hzk[2 * no][t], OLED_DATA); 299 | adder += 1; 300 | } 301 | OLED_Set_Pos(x, y + 1); 302 | for (t = 0; t < 16; t++) 303 | { 304 | OLED_WR_Byte(Hzk[2 * no + 1][t], OLED_DATA); 305 | adder += 1; 306 | } 307 | } 308 | /***********功能描述:显示显示BMP图片128×64起始点坐标(x,y),x的范围0~127,y为页的范围0~7*****************/ 309 | void OLED_DrawBMP(unsigned char x0, unsigned char y0, unsigned char x1, unsigned char y1, unsigned char BMP[]) 310 | { 311 | unsigned int j = 0; 312 | unsigned char x, y; 313 | 314 | if (y1 % 8 == 0) 315 | y = y1 / 8; 316 | else 317 | y = y1 / 8 + 1; 318 | for (y = y0; y < y1; y++) 319 | { 320 | OLED_Set_Pos(x0, y); 321 | for (x = x0; x < x1; x++) 322 | { 323 | OLED_WR_Byte(BMP[j++], OLED_DATA); 324 | } 325 | } 326 | } 327 | 328 | //初始化SSD1306 329 | void OLED_Init(void) 330 | { 331 | HAL_Delay(10); //防止芯片复位后OLED还没复位,导致无法显示 332 | OLED_WR_Byte(0xAE, OLED_CMD); //--display off 333 | OLED_WR_Byte(0x00, OLED_CMD); //---set low column address 334 | OLED_WR_Byte(0x10, OLED_CMD); //---set high column address 335 | OLED_WR_Byte(0x40, OLED_CMD); //--set start line address 336 | OLED_WR_Byte(0xB0, OLED_CMD); //--set page address 337 | OLED_WR_Byte(0x81, OLED_CMD); // contract control 338 | OLED_WR_Byte(0xFF, OLED_CMD); //--128 339 | OLED_WR_Byte(0xA1, OLED_CMD); //set segment remap 340 | OLED_WR_Byte(0xA6, OLED_CMD); //--normal / reverse 341 | OLED_WR_Byte(0xA8, OLED_CMD); //--set multiplex ratio(1 to 64) 342 | OLED_WR_Byte(0x3F, OLED_CMD); //--1/32 duty 343 | OLED_WR_Byte(0xC8, OLED_CMD); //Com scan direction 344 | OLED_WR_Byte(0xD3, OLED_CMD); //-set display offset 345 | OLED_WR_Byte(0x00, OLED_CMD); // 346 | 347 | OLED_WR_Byte(0xD5, OLED_CMD); //set osc division 348 | OLED_WR_Byte(0x80, OLED_CMD); // 349 | 350 | OLED_WR_Byte(0xD8, OLED_CMD); //set area color mode off 351 | OLED_WR_Byte(0x05, OLED_CMD); // 352 | 353 | OLED_WR_Byte(0xD9, OLED_CMD); //Set Pre-Charge Period 354 | OLED_WR_Byte(0xF1, OLED_CMD); // 355 | 356 | OLED_WR_Byte(0xDA, OLED_CMD); //set com pin configuartion 357 | OLED_WR_Byte(0x12, OLED_CMD); // 358 | 359 | OLED_WR_Byte(0xDB, OLED_CMD); //set Vcomh 360 | OLED_WR_Byte(0x30, OLED_CMD); // 361 | 362 | OLED_WR_Byte(0x8D, OLED_CMD); //set charge pump enable 363 | OLED_WR_Byte(0x14, OLED_CMD); // 364 | 365 | OLED_WR_Byte(0xAF, OLED_CMD); //--turn on oled panel 366 | } 367 | -------------------------------------------------------------------------------- /2.Software/Power_X/Core/Src/stm32f1xx_hal_msp.c: -------------------------------------------------------------------------------- 1 | /* USER CODE BEGIN Header */ 2 | /** 3 | ****************************************************************************** 4 | * @file stm32f1xx_hal_msp.c 5 | * @brief This file provides code for the MSP Initialization 6 | * and de-Initialization codes. 7 | ****************************************************************************** 8 | * @attention 9 | * 10 | *

© Copyright (c) 2021 STMicroelectronics. 11 | * All rights reserved.

12 | * 13 | * This software component is licensed by ST under BSD 3-Clause license, 14 | * the "License"; You may not use this file except in compliance with the 15 | * License. You may obtain a copy of the License at: 16 | * opensource.org/licenses/BSD-3-Clause 17 | * 18 | ****************************************************************************** 19 | */ 20 | /* USER CODE END Header */ 21 | 22 | /* Includes ------------------------------------------------------------------*/ 23 | #include "main.h" 24 | /* USER CODE BEGIN Includes */ 25 | 26 | /* USER CODE END Includes */ 27 | 28 | /* Private typedef -----------------------------------------------------------*/ 29 | /* USER CODE BEGIN TD */ 30 | 31 | /* USER CODE END TD */ 32 | 33 | /* Private define ------------------------------------------------------------*/ 34 | /* USER CODE BEGIN Define */ 35 | 36 | /* USER CODE END Define */ 37 | 38 | /* Private macro -------------------------------------------------------------*/ 39 | /* USER CODE BEGIN Macro */ 40 | 41 | /* USER CODE END Macro */ 42 | 43 | /* Private variables ---------------------------------------------------------*/ 44 | /* USER CODE BEGIN PV */ 45 | 46 | /* USER CODE END PV */ 47 | 48 | /* Private function prototypes -----------------------------------------------*/ 49 | /* USER CODE BEGIN PFP */ 50 | 51 | /* USER CODE END PFP */ 52 | 53 | /* External functions --------------------------------------------------------*/ 54 | /* USER CODE BEGIN ExternalFunctions */ 55 | 56 | /* USER CODE END ExternalFunctions */ 57 | 58 | /* USER CODE BEGIN 0 */ 59 | 60 | /* USER CODE END 0 */ 61 | /** 62 | * Initializes the Global MSP. 63 | */ 64 | void HAL_MspInit(void) 65 | { 66 | /* USER CODE BEGIN MspInit 0 */ 67 | 68 | /* USER CODE END MspInit 0 */ 69 | 70 | __HAL_RCC_AFIO_CLK_ENABLE(); 71 | __HAL_RCC_PWR_CLK_ENABLE(); 72 | 73 | HAL_NVIC_SetPriorityGrouping(NVIC_PRIORITYGROUP_2); 74 | 75 | /* System interrupt init*/ 76 | 77 | /** NOJTAG: JTAG-DP Disabled and SW-DP Enabled 78 | */ 79 | __HAL_AFIO_REMAP_SWJ_NOJTAG(); 80 | 81 | /* USER CODE BEGIN MspInit 1 */ 82 | 83 | /* USER CODE END MspInit 1 */ 84 | } 85 | 86 | /* USER CODE BEGIN 1 */ 87 | 88 | /* USER CODE END 1 */ 89 | 90 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 91 | -------------------------------------------------------------------------------- /2.Software/Power_X/Core/Src/stm32f1xx_it.c: -------------------------------------------------------------------------------- 1 | /* USER CODE BEGIN Header */ 2 | /** 3 | ****************************************************************************** 4 | * @file stm32f1xx_it.c 5 | * @brief Interrupt Service Routines. 6 | ****************************************************************************** 7 | * @attention 8 | * 9 | *

© Copyright (c) 2021 STMicroelectronics. 10 | * All rights reserved.

11 | * 12 | * This software component is licensed by ST under BSD 3-Clause license, 13 | * the "License"; You may not use this file except in compliance with the 14 | * License. You may obtain a copy of the License at: 15 | * opensource.org/licenses/BSD-3-Clause 16 | * 17 | ****************************************************************************** 18 | */ 19 | /* USER CODE END Header */ 20 | 21 | /* Includes ------------------------------------------------------------------*/ 22 | #include "main.h" 23 | #include "stm32f1xx_it.h" 24 | /* Private includes ----------------------------------------------------------*/ 25 | /* USER CODE BEGIN Includes */ 26 | /* USER CODE END Includes */ 27 | 28 | /* Private typedef -----------------------------------------------------------*/ 29 | /* USER CODE BEGIN TD */ 30 | 31 | /* USER CODE END TD */ 32 | 33 | /* Private define ------------------------------------------------------------*/ 34 | /* USER CODE BEGIN PD */ 35 | 36 | /* USER CODE END PD */ 37 | 38 | /* Private macro -------------------------------------------------------------*/ 39 | /* USER CODE BEGIN PM */ 40 | 41 | /* USER CODE END PM */ 42 | 43 | /* Private variables ---------------------------------------------------------*/ 44 | /* USER CODE BEGIN PV */ 45 | 46 | /* USER CODE END PV */ 47 | 48 | /* Private function prototypes -----------------------------------------------*/ 49 | /* USER CODE BEGIN PFP */ 50 | 51 | /* USER CODE END PFP */ 52 | 53 | /* Private user code ---------------------------------------------------------*/ 54 | /* USER CODE BEGIN 0 */ 55 | 56 | /* USER CODE END 0 */ 57 | 58 | /* External variables --------------------------------------------------------*/ 59 | extern TIM_HandleTypeDef htim1; 60 | /* USER CODE BEGIN EV */ 61 | 62 | /* USER CODE END EV */ 63 | 64 | /******************************************************************************/ 65 | /* Cortex-M3 Processor Interruption and Exception Handlers */ 66 | /******************************************************************************/ 67 | /** 68 | * @brief This function handles Non maskable interrupt. 69 | */ 70 | void NMI_Handler(void) 71 | { 72 | /* USER CODE BEGIN NonMaskableInt_IRQn 0 */ 73 | 74 | /* USER CODE END NonMaskableInt_IRQn 0 */ 75 | /* USER CODE BEGIN NonMaskableInt_IRQn 1 */ 76 | while (1) 77 | { 78 | } 79 | /* USER CODE END NonMaskableInt_IRQn 1 */ 80 | } 81 | 82 | /** 83 | * @brief This function handles Hard fault interrupt. 84 | */ 85 | void HardFault_Handler(void) 86 | { 87 | /* USER CODE BEGIN HardFault_IRQn 0 */ 88 | 89 | /* USER CODE END HardFault_IRQn 0 */ 90 | while (1) 91 | { 92 | /* USER CODE BEGIN W1_HardFault_IRQn 0 */ 93 | /* USER CODE END W1_HardFault_IRQn 0 */ 94 | } 95 | } 96 | 97 | /** 98 | * @brief This function handles Memory management fault. 99 | */ 100 | void MemManage_Handler(void) 101 | { 102 | /* USER CODE BEGIN MemoryManagement_IRQn 0 */ 103 | 104 | /* USER CODE END MemoryManagement_IRQn 0 */ 105 | while (1) 106 | { 107 | /* USER CODE BEGIN W1_MemoryManagement_IRQn 0 */ 108 | /* USER CODE END W1_MemoryManagement_IRQn 0 */ 109 | } 110 | } 111 | 112 | /** 113 | * @brief This function handles Prefetch fault, memory access fault. 114 | */ 115 | void BusFault_Handler(void) 116 | { 117 | /* USER CODE BEGIN BusFault_IRQn 0 */ 118 | 119 | /* USER CODE END BusFault_IRQn 0 */ 120 | while (1) 121 | { 122 | /* USER CODE BEGIN W1_BusFault_IRQn 0 */ 123 | /* USER CODE END W1_BusFault_IRQn 0 */ 124 | } 125 | } 126 | 127 | /** 128 | * @brief This function handles Undefined instruction or illegal state. 129 | */ 130 | void UsageFault_Handler(void) 131 | { 132 | /* USER CODE BEGIN UsageFault_IRQn 0 */ 133 | 134 | /* USER CODE END UsageFault_IRQn 0 */ 135 | while (1) 136 | { 137 | /* USER CODE BEGIN W1_UsageFault_IRQn 0 */ 138 | /* USER CODE END W1_UsageFault_IRQn 0 */ 139 | } 140 | } 141 | 142 | /** 143 | * @brief This function handles System service call via SWI instruction. 144 | */ 145 | void SVC_Handler(void) 146 | { 147 | /* USER CODE BEGIN SVCall_IRQn 0 */ 148 | 149 | /* USER CODE END SVCall_IRQn 0 */ 150 | /* USER CODE BEGIN SVCall_IRQn 1 */ 151 | 152 | /* USER CODE END SVCall_IRQn 1 */ 153 | } 154 | 155 | /** 156 | * @brief This function handles Debug monitor. 157 | */ 158 | void DebugMon_Handler(void) 159 | { 160 | /* USER CODE BEGIN DebugMonitor_IRQn 0 */ 161 | 162 | /* USER CODE END DebugMonitor_IRQn 0 */ 163 | /* USER CODE BEGIN DebugMonitor_IRQn 1 */ 164 | 165 | /* USER CODE END DebugMonitor_IRQn 1 */ 166 | } 167 | 168 | /** 169 | * @brief This function handles Pendable request for system service. 170 | */ 171 | void PendSV_Handler(void) 172 | { 173 | /* USER CODE BEGIN PendSV_IRQn 0 */ 174 | 175 | /* USER CODE END PendSV_IRQn 0 */ 176 | /* USER CODE BEGIN PendSV_IRQn 1 */ 177 | 178 | /* USER CODE END PendSV_IRQn 1 */ 179 | } 180 | 181 | /** 182 | * @brief This function handles System tick timer. 183 | */ 184 | void SysTick_Handler(void) 185 | { 186 | /* USER CODE BEGIN SysTick_IRQn 0 */ 187 | 188 | /* USER CODE END SysTick_IRQn 0 */ 189 | HAL_IncTick(); 190 | /* USER CODE BEGIN SysTick_IRQn 1 */ 191 | 192 | /* USER CODE END SysTick_IRQn 1 */ 193 | } 194 | 195 | /******************************************************************************/ 196 | /* STM32F1xx Peripheral Interrupt Handlers */ 197 | /* Add here the Interrupt Handlers for the used peripherals. */ 198 | /* For the available peripheral interrupt handler names, */ 199 | /* please refer to the startup file (startup_stm32f1xx.s). */ 200 | /******************************************************************************/ 201 | 202 | /** 203 | * @brief This function handles EXTI line1 interrupt. 204 | */ 205 | void EXTI1_IRQHandler(void) 206 | { 207 | /* USER CODE BEGIN EXTI1_IRQn 0 */ 208 | 209 | /* USER CODE END EXTI1_IRQn 0 */ 210 | HAL_GPIO_EXTI_IRQHandler(GPIO_PIN_1); 211 | /* USER CODE BEGIN EXTI1_IRQn 1 */ 212 | 213 | /* USER CODE END EXTI1_IRQn 1 */ 214 | } 215 | 216 | /** 217 | * @brief This function handles EXTI line2 interrupt. 218 | */ 219 | void EXTI2_IRQHandler(void) 220 | { 221 | /* USER CODE BEGIN EXTI2_IRQn 0 */ 222 | 223 | /* USER CODE END EXTI2_IRQn 0 */ 224 | HAL_GPIO_EXTI_IRQHandler(GPIO_PIN_2); 225 | /* USER CODE BEGIN EXTI2_IRQn 1 */ 226 | 227 | /* USER CODE END EXTI2_IRQn 1 */ 228 | } 229 | 230 | /** 231 | * @brief This function handles EXTI line3 interrupt. 232 | */ 233 | void EXTI3_IRQHandler(void) 234 | { 235 | /* USER CODE BEGIN EXTI3_IRQn 0 */ 236 | 237 | /* USER CODE END EXTI3_IRQn 0 */ 238 | HAL_GPIO_EXTI_IRQHandler(GPIO_PIN_3); 239 | /* USER CODE BEGIN EXTI3_IRQn 1 */ 240 | 241 | /* USER CODE END EXTI3_IRQn 1 */ 242 | } 243 | 244 | /** 245 | * @brief This function handles TIM1 update interrupt. 246 | */ 247 | void TIM1_UP_IRQHandler(void) 248 | { 249 | /* USER CODE BEGIN TIM1_UP_IRQn 0 */ 250 | 251 | /* USER CODE END TIM1_UP_IRQn 0 */ 252 | HAL_TIM_IRQHandler(&htim1); 253 | /* USER CODE BEGIN TIM1_UP_IRQn 1 */ 254 | 255 | /* USER CODE END TIM1_UP_IRQn 1 */ 256 | } 257 | 258 | /* USER CODE BEGIN 1 */ 259 | 260 | /* USER CODE END 1 */ 261 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 262 | -------------------------------------------------------------------------------- /2.Software/Power_X/Core/Src/tim.c: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * @file tim.c 4 | * @brief This file provides code for the configuration 5 | * of the TIM instances. 6 | ****************************************************************************** 7 | * @attention 8 | * 9 | *

© Copyright (c) 2021 STMicroelectronics. 10 | * All rights reserved.

11 | * 12 | * This software component is licensed by ST under BSD 3-Clause license, 13 | * the "License"; You may not use this file except in compliance with the 14 | * License. You may obtain a copy of the License at: 15 | * opensource.org/licenses/BSD-3-Clause 16 | * 17 | ****************************************************************************** 18 | */ 19 | 20 | /* Includes ------------------------------------------------------------------*/ 21 | #include "tim.h" 22 | 23 | /* USER CODE BEGIN 0 */ 24 | //TIM1定时器,任务在定时器中不断循环 25 | #include 26 | #include 27 | #include "bmp.h" 28 | #include "oled.h" 29 | #include "ina226.h" 30 | 31 | char char_V[20], char_I[20], char_W[20]; 32 | 33 | HAL_TIM_PeriodElapsedCallback(TIM_HandleTypeDef *htim) 34 | { 35 | if (htim == &htim1) 36 | { 37 | Data_Refresh_Task(); //每10ms更新一次数据 38 | Oled_Data_List(); 39 | } 40 | } 41 | 42 | void Data_Refresh_Task() 43 | { 44 | uint16_t V_int = 0, V_dec = 0, I_int = 0, I_dec = 0, W_int = 0, W_dec = 0; 45 | 46 | get_power(); //INA226读取电压(mv),读取电�?(mA),功率(W) 47 | V_int = (uint16_t)(INA226_data.voltageVal / 1000); 48 | V_dec = (uint16_t)((INA226_data.voltageVal / 1000 - V_int) * 1000); 49 | I_int = (uint16_t)(INA226_data.Shunt_Current / 1000); 50 | I_dec = (uint16_t)((INA226_data.Shunt_Current / 1000 - I_int) * 1000); 51 | W_int = (uint16_t)INA226_data.Power_Val; 52 | W_dec = (uint16_t)((INA226_data.Power_Val - W_int) * 1000); 53 | sprintf(char_V, "Voltage:%d.%03dV ", V_int, V_dec); 54 | sprintf(char_I, "Current:%d.%03dA ", I_int, I_dec); 55 | sprintf(char_W, "Power: %d.%03dW ", W_int, W_dec); 56 | } 57 | 58 | void Oled_Data_List() 59 | { 60 | OLED_ShowString(40, 0, "Power_X", 16); 61 | OLED_ShowString(0, 2, char_V, 16); 62 | OLED_ShowString(0, 4, char_I, 16); 63 | OLED_ShowString(0, 6, char_W, 16); 64 | } 65 | /* USER CODE END 0 */ 66 | 67 | TIM_HandleTypeDef htim1; 68 | 69 | /* TIM1 init function */ 70 | void MX_TIM1_Init(void) 71 | { 72 | TIM_ClockConfigTypeDef sClockSourceConfig = {0}; 73 | TIM_MasterConfigTypeDef sMasterConfig = {0}; 74 | 75 | htim1.Instance = TIM1; 76 | htim1.Init.Prescaler = 720 - 1; 77 | htim1.Init.CounterMode = TIM_COUNTERMODE_UP; 78 | htim1.Init.Period = 1000 - 1; 79 | htim1.Init.ClockDivision = TIM_CLOCKDIVISION_DIV1; 80 | htim1.Init.RepetitionCounter = 0; 81 | htim1.Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_ENABLE; 82 | if (HAL_TIM_Base_Init(&htim1) != HAL_OK) 83 | { 84 | Error_Handler(); 85 | } 86 | sClockSourceConfig.ClockSource = TIM_CLOCKSOURCE_INTERNAL; 87 | if (HAL_TIM_ConfigClockSource(&htim1, &sClockSourceConfig) != HAL_OK) 88 | { 89 | Error_Handler(); 90 | } 91 | sMasterConfig.MasterOutputTrigger = TIM_TRGO_RESET; 92 | sMasterConfig.MasterSlaveMode = TIM_MASTERSLAVEMODE_DISABLE; 93 | if (HAL_TIMEx_MasterConfigSynchronization(&htim1, &sMasterConfig) != HAL_OK) 94 | { 95 | Error_Handler(); 96 | } 97 | } 98 | 99 | void HAL_TIM_Base_MspInit(TIM_HandleTypeDef *tim_baseHandle) 100 | { 101 | 102 | if (tim_baseHandle->Instance == TIM1) 103 | { 104 | /* USER CODE BEGIN TIM1_MspInit 0 */ 105 | 106 | /* USER CODE END TIM1_MspInit 0 */ 107 | /* TIM1 clock enable */ 108 | __HAL_RCC_TIM1_CLK_ENABLE(); 109 | 110 | /* TIM1 interrupt Init */ 111 | HAL_NVIC_SetPriority(TIM1_UP_IRQn, 2, 1); 112 | HAL_NVIC_EnableIRQ(TIM1_UP_IRQn); 113 | /* USER CODE BEGIN TIM1_MspInit 1 */ 114 | 115 | /* USER CODE END TIM1_MspInit 1 */ 116 | } 117 | } 118 | 119 | void HAL_TIM_Base_MspDeInit(TIM_HandleTypeDef *tim_baseHandle) 120 | { 121 | 122 | if (tim_baseHandle->Instance == TIM1) 123 | { 124 | /* USER CODE BEGIN TIM1_MspDeInit 0 */ 125 | 126 | /* USER CODE END TIM1_MspDeInit 0 */ 127 | /* Peripheral clock disable */ 128 | __HAL_RCC_TIM1_CLK_DISABLE(); 129 | 130 | /* TIM1 interrupt Deinit */ 131 | HAL_NVIC_DisableIRQ(TIM1_UP_IRQn); 132 | /* USER CODE BEGIN TIM1_MspDeInit 1 */ 133 | 134 | /* USER CODE END TIM1_MspDeInit 1 */ 135 | } 136 | } 137 | 138 | /* USER CODE BEGIN 1 */ 139 | 140 | /* USER CODE END 1 */ 141 | 142 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 143 | -------------------------------------------------------------------------------- /2.Software/Power_X/Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f103xb.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheng-inkor/Power_X/35a9ca20c014c2595a8f86b764cd9c75585b9506/2.Software/Power_X/Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f103xb.h -------------------------------------------------------------------------------- /2.Software/Power_X/Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f1xx.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheng-inkor/Power_X/35a9ca20c014c2595a8f86b764cd9c75585b9506/2.Software/Power_X/Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f1xx.h -------------------------------------------------------------------------------- /2.Software/Power_X/Drivers/CMSIS/Device/ST/STM32F1xx/Include/system_stm32f1xx.h: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * @file system_stm32f10x.h 4 | * @author MCD Application Team 5 | * @brief CMSIS Cortex-M3 Device Peripheral Access Layer System Header File. 6 | ****************************************************************************** 7 | * @attention 8 | * 9 | *

© Copyright (c) 2017 STMicroelectronics. 10 | * All rights reserved.

11 | * 12 | * This software component is licensed by ST under BSD 3-Clause license, 13 | * the "License"; You may not use this file except in compliance with the 14 | * License. You may obtain a copy of the License at: 15 | * opensource.org/licenses/BSD-3-Clause 16 | * 17 | ****************************************************************************** 18 | */ 19 | 20 | /** @addtogroup CMSIS 21 | * @{ 22 | */ 23 | 24 | /** @addtogroup stm32f10x_system 25 | * @{ 26 | */ 27 | 28 | /** 29 | * @brief Define to prevent recursive inclusion 30 | */ 31 | #ifndef __SYSTEM_STM32F10X_H 32 | #define __SYSTEM_STM32F10X_H 33 | 34 | #ifdef __cplusplus 35 | extern "C" { 36 | #endif 37 | 38 | /** @addtogroup STM32F10x_System_Includes 39 | * @{ 40 | */ 41 | 42 | /** 43 | * @} 44 | */ 45 | 46 | 47 | /** @addtogroup STM32F10x_System_Exported_types 48 | * @{ 49 | */ 50 | 51 | extern uint32_t SystemCoreClock; /*!< System Clock Frequency (Core Clock) */ 52 | extern const uint8_t AHBPrescTable[16U]; /*!< AHB prescalers table values */ 53 | extern const uint8_t APBPrescTable[8U]; /*!< APB prescalers table values */ 54 | 55 | /** 56 | * @} 57 | */ 58 | 59 | /** @addtogroup STM32F10x_System_Exported_Constants 60 | * @{ 61 | */ 62 | 63 | /** 64 | * @} 65 | */ 66 | 67 | /** @addtogroup STM32F10x_System_Exported_Macros 68 | * @{ 69 | */ 70 | 71 | /** 72 | * @} 73 | */ 74 | 75 | /** @addtogroup STM32F10x_System_Exported_Functions 76 | * @{ 77 | */ 78 | 79 | extern void SystemInit(void); 80 | extern void SystemCoreClockUpdate(void); 81 | /** 82 | * @} 83 | */ 84 | 85 | #ifdef __cplusplus 86 | } 87 | #endif 88 | 89 | #endif /*__SYSTEM_STM32F10X_H */ 90 | 91 | /** 92 | * @} 93 | */ 94 | 95 | /** 96 | * @} 97 | */ 98 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 99 | -------------------------------------------------------------------------------- /2.Software/Power_X/Drivers/CMSIS/Include/cmsis_compiler.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************//** 2 | * @file cmsis_compiler.h 3 | * @brief CMSIS compiler generic header file 4 | * @version V5.0.4 5 | * @date 10. January 2018 6 | ******************************************************************************/ 7 | /* 8 | * Copyright (c) 2009-2018 Arm Limited. All rights reserved. 9 | * 10 | * SPDX-License-Identifier: Apache-2.0 11 | * 12 | * Licensed under the Apache License, Version 2.0 (the License); you may 13 | * not use this file except in compliance with the License. 14 | * You may obtain a copy of the License at 15 | * 16 | * www.apache.org/licenses/LICENSE-2.0 17 | * 18 | * Unless required by applicable law or agreed to in writing, software 19 | * distributed under the License is distributed on an AS IS BASIS, WITHOUT 20 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 21 | * See the License for the specific language governing permissions and 22 | * limitations under the License. 23 | */ 24 | 25 | #ifndef __CMSIS_COMPILER_H 26 | #define __CMSIS_COMPILER_H 27 | 28 | #include 29 | 30 | /* 31 | * Arm Compiler 4/5 32 | */ 33 | #if defined ( __CC_ARM ) 34 | #include "cmsis_armcc.h" 35 | 36 | 37 | /* 38 | * Arm Compiler 6 (armclang) 39 | */ 40 | #elif defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050) 41 | #include "cmsis_armclang.h" 42 | 43 | 44 | /* 45 | * GNU Compiler 46 | */ 47 | #elif defined ( __GNUC__ ) 48 | #include "cmsis_gcc.h" 49 | 50 | 51 | /* 52 | * IAR Compiler 53 | */ 54 | #elif defined ( __ICCARM__ ) 55 | #include 56 | 57 | 58 | /* 59 | * TI Arm Compiler 60 | */ 61 | #elif defined ( __TI_ARM__ ) 62 | #include 63 | 64 | #ifndef __ASM 65 | #define __ASM __asm 66 | #endif 67 | #ifndef __INLINE 68 | #define __INLINE inline 69 | #endif 70 | #ifndef __STATIC_INLINE 71 | #define __STATIC_INLINE static inline 72 | #endif 73 | #ifndef __STATIC_FORCEINLINE 74 | #define __STATIC_FORCEINLINE __STATIC_INLINE 75 | #endif 76 | #ifndef __NO_RETURN 77 | #define __NO_RETURN __attribute__((noreturn)) 78 | #endif 79 | #ifndef __USED 80 | #define __USED __attribute__((used)) 81 | #endif 82 | #ifndef __WEAK 83 | #define __WEAK __attribute__((weak)) 84 | #endif 85 | #ifndef __PACKED 86 | #define __PACKED __attribute__((packed)) 87 | #endif 88 | #ifndef __PACKED_STRUCT 89 | #define __PACKED_STRUCT struct __attribute__((packed)) 90 | #endif 91 | #ifndef __PACKED_UNION 92 | #define __PACKED_UNION union __attribute__((packed)) 93 | #endif 94 | #ifndef __UNALIGNED_UINT32 /* deprecated */ 95 | struct __attribute__((packed)) T_UINT32 { uint32_t v; }; 96 | #define __UNALIGNED_UINT32(x) (((struct T_UINT32 *)(x))->v) 97 | #endif 98 | #ifndef __UNALIGNED_UINT16_WRITE 99 | __PACKED_STRUCT T_UINT16_WRITE { uint16_t v; }; 100 | #define __UNALIGNED_UINT16_WRITE(addr, val) (void)((((struct T_UINT16_WRITE *)(void*)(addr))->v) = (val)) 101 | #endif 102 | #ifndef __UNALIGNED_UINT16_READ 103 | __PACKED_STRUCT T_UINT16_READ { uint16_t v; }; 104 | #define __UNALIGNED_UINT16_READ(addr) (((const struct T_UINT16_READ *)(const void *)(addr))->v) 105 | #endif 106 | #ifndef __UNALIGNED_UINT32_WRITE 107 | __PACKED_STRUCT T_UINT32_WRITE { uint32_t v; }; 108 | #define __UNALIGNED_UINT32_WRITE(addr, val) (void)((((struct T_UINT32_WRITE *)(void *)(addr))->v) = (val)) 109 | #endif 110 | #ifndef __UNALIGNED_UINT32_READ 111 | __PACKED_STRUCT T_UINT32_READ { uint32_t v; }; 112 | #define __UNALIGNED_UINT32_READ(addr) (((const struct T_UINT32_READ *)(const void *)(addr))->v) 113 | #endif 114 | #ifndef __ALIGNED 115 | #define __ALIGNED(x) __attribute__((aligned(x))) 116 | #endif 117 | #ifndef __RESTRICT 118 | #warning No compiler specific solution for __RESTRICT. __RESTRICT is ignored. 119 | #define __RESTRICT 120 | #endif 121 | 122 | 123 | /* 124 | * TASKING Compiler 125 | */ 126 | #elif defined ( __TASKING__ ) 127 | /* 128 | * The CMSIS functions have been implemented as intrinsics in the compiler. 129 | * Please use "carm -?i" to get an up to date list of all intrinsics, 130 | * Including the CMSIS ones. 131 | */ 132 | 133 | #ifndef __ASM 134 | #define __ASM __asm 135 | #endif 136 | #ifndef __INLINE 137 | #define __INLINE inline 138 | #endif 139 | #ifndef __STATIC_INLINE 140 | #define __STATIC_INLINE static inline 141 | #endif 142 | #ifndef __STATIC_FORCEINLINE 143 | #define __STATIC_FORCEINLINE __STATIC_INLINE 144 | #endif 145 | #ifndef __NO_RETURN 146 | #define __NO_RETURN __attribute__((noreturn)) 147 | #endif 148 | #ifndef __USED 149 | #define __USED __attribute__((used)) 150 | #endif 151 | #ifndef __WEAK 152 | #define __WEAK __attribute__((weak)) 153 | #endif 154 | #ifndef __PACKED 155 | #define __PACKED __packed__ 156 | #endif 157 | #ifndef __PACKED_STRUCT 158 | #define __PACKED_STRUCT struct __packed__ 159 | #endif 160 | #ifndef __PACKED_UNION 161 | #define __PACKED_UNION union __packed__ 162 | #endif 163 | #ifndef __UNALIGNED_UINT32 /* deprecated */ 164 | struct __packed__ T_UINT32 { uint32_t v; }; 165 | #define __UNALIGNED_UINT32(x) (((struct T_UINT32 *)(x))->v) 166 | #endif 167 | #ifndef __UNALIGNED_UINT16_WRITE 168 | __PACKED_STRUCT T_UINT16_WRITE { uint16_t v; }; 169 | #define __UNALIGNED_UINT16_WRITE(addr, val) (void)((((struct T_UINT16_WRITE *)(void *)(addr))->v) = (val)) 170 | #endif 171 | #ifndef __UNALIGNED_UINT16_READ 172 | __PACKED_STRUCT T_UINT16_READ { uint16_t v; }; 173 | #define __UNALIGNED_UINT16_READ(addr) (((const struct T_UINT16_READ *)(const void *)(addr))->v) 174 | #endif 175 | #ifndef __UNALIGNED_UINT32_WRITE 176 | __PACKED_STRUCT T_UINT32_WRITE { uint32_t v; }; 177 | #define __UNALIGNED_UINT32_WRITE(addr, val) (void)((((struct T_UINT32_WRITE *)(void *)(addr))->v) = (val)) 178 | #endif 179 | #ifndef __UNALIGNED_UINT32_READ 180 | __PACKED_STRUCT T_UINT32_READ { uint32_t v; }; 181 | #define __UNALIGNED_UINT32_READ(addr) (((const struct T_UINT32_READ *)(const void *)(addr))->v) 182 | #endif 183 | #ifndef __ALIGNED 184 | #define __ALIGNED(x) __align(x) 185 | #endif 186 | #ifndef __RESTRICT 187 | #warning No compiler specific solution for __RESTRICT. __RESTRICT is ignored. 188 | #define __RESTRICT 189 | #endif 190 | 191 | 192 | /* 193 | * COSMIC Compiler 194 | */ 195 | #elif defined ( __CSMC__ ) 196 | #include 197 | 198 | #ifndef __ASM 199 | #define __ASM _asm 200 | #endif 201 | #ifndef __INLINE 202 | #define __INLINE inline 203 | #endif 204 | #ifndef __STATIC_INLINE 205 | #define __STATIC_INLINE static inline 206 | #endif 207 | #ifndef __STATIC_FORCEINLINE 208 | #define __STATIC_FORCEINLINE __STATIC_INLINE 209 | #endif 210 | #ifndef __NO_RETURN 211 | // NO RETURN is automatically detected hence no warning here 212 | #define __NO_RETURN 213 | #endif 214 | #ifndef __USED 215 | #warning No compiler specific solution for __USED. __USED is ignored. 216 | #define __USED 217 | #endif 218 | #ifndef __WEAK 219 | #define __WEAK __weak 220 | #endif 221 | #ifndef __PACKED 222 | #define __PACKED @packed 223 | #endif 224 | #ifndef __PACKED_STRUCT 225 | #define __PACKED_STRUCT @packed struct 226 | #endif 227 | #ifndef __PACKED_UNION 228 | #define __PACKED_UNION @packed union 229 | #endif 230 | #ifndef __UNALIGNED_UINT32 /* deprecated */ 231 | @packed struct T_UINT32 { uint32_t v; }; 232 | #define __UNALIGNED_UINT32(x) (((struct T_UINT32 *)(x))->v) 233 | #endif 234 | #ifndef __UNALIGNED_UINT16_WRITE 235 | __PACKED_STRUCT T_UINT16_WRITE { uint16_t v; }; 236 | #define __UNALIGNED_UINT16_WRITE(addr, val) (void)((((struct T_UINT16_WRITE *)(void *)(addr))->v) = (val)) 237 | #endif 238 | #ifndef __UNALIGNED_UINT16_READ 239 | __PACKED_STRUCT T_UINT16_READ { uint16_t v; }; 240 | #define __UNALIGNED_UINT16_READ(addr) (((const struct T_UINT16_READ *)(const void *)(addr))->v) 241 | #endif 242 | #ifndef __UNALIGNED_UINT32_WRITE 243 | __PACKED_STRUCT T_UINT32_WRITE { uint32_t v; }; 244 | #define __UNALIGNED_UINT32_WRITE(addr, val) (void)((((struct T_UINT32_WRITE *)(void *)(addr))->v) = (val)) 245 | #endif 246 | #ifndef __UNALIGNED_UINT32_READ 247 | __PACKED_STRUCT T_UINT32_READ { uint32_t v; }; 248 | #define __UNALIGNED_UINT32_READ(addr) (((const struct T_UINT32_READ *)(const void *)(addr))->v) 249 | #endif 250 | #ifndef __ALIGNED 251 | #warning No compiler specific solution for __ALIGNED. __ALIGNED is ignored. 252 | #define __ALIGNED(x) 253 | #endif 254 | #ifndef __RESTRICT 255 | #warning No compiler specific solution for __RESTRICT. __RESTRICT is ignored. 256 | #define __RESTRICT 257 | #endif 258 | 259 | 260 | #else 261 | #error Unknown compiler. 262 | #endif 263 | 264 | 265 | #endif /* __CMSIS_COMPILER_H */ 266 | 267 | -------------------------------------------------------------------------------- /2.Software/Power_X/Drivers/CMSIS/Include/cmsis_version.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************//** 2 | * @file cmsis_version.h 3 | * @brief CMSIS Core(M) Version definitions 4 | * @version V5.0.2 5 | * @date 19. April 2017 6 | ******************************************************************************/ 7 | /* 8 | * Copyright (c) 2009-2017 ARM Limited. All rights reserved. 9 | * 10 | * SPDX-License-Identifier: Apache-2.0 11 | * 12 | * Licensed under the Apache License, Version 2.0 (the License); you may 13 | * not use this file except in compliance with the License. 14 | * You may obtain a copy of the License at 15 | * 16 | * www.apache.org/licenses/LICENSE-2.0 17 | * 18 | * Unless required by applicable law or agreed to in writing, software 19 | * distributed under the License is distributed on an AS IS BASIS, WITHOUT 20 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 21 | * See the License for the specific language governing permissions and 22 | * limitations under the License. 23 | */ 24 | 25 | #if defined ( __ICCARM__ ) 26 | #pragma system_include /* treat file as system include file for MISRA check */ 27 | #elif defined (__clang__) 28 | #pragma clang system_header /* treat file as system include file */ 29 | #endif 30 | 31 | #ifndef __CMSIS_VERSION_H 32 | #define __CMSIS_VERSION_H 33 | 34 | /* CMSIS Version definitions */ 35 | #define __CM_CMSIS_VERSION_MAIN ( 5U) /*!< [31:16] CMSIS Core(M) main version */ 36 | #define __CM_CMSIS_VERSION_SUB ( 1U) /*!< [15:0] CMSIS Core(M) sub version */ 37 | #define __CM_CMSIS_VERSION ((__CM_CMSIS_VERSION_MAIN << 16U) | \ 38 | __CM_CMSIS_VERSION_SUB ) /*!< CMSIS Core(M) version number */ 39 | #endif 40 | -------------------------------------------------------------------------------- /2.Software/Power_X/Drivers/CMSIS/Include/tz_context.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * @file tz_context.h 3 | * @brief Context Management for Armv8-M TrustZone 4 | * @version V1.0.1 5 | * @date 10. January 2018 6 | ******************************************************************************/ 7 | /* 8 | * Copyright (c) 2017-2018 Arm Limited. All rights reserved. 9 | * 10 | * SPDX-License-Identifier: Apache-2.0 11 | * 12 | * Licensed under the Apache License, Version 2.0 (the License); you may 13 | * not use this file except in compliance with the License. 14 | * You may obtain a copy of the License at 15 | * 16 | * www.apache.org/licenses/LICENSE-2.0 17 | * 18 | * Unless required by applicable law or agreed to in writing, software 19 | * distributed under the License is distributed on an AS IS BASIS, WITHOUT 20 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 21 | * See the License for the specific language governing permissions and 22 | * limitations under the License. 23 | */ 24 | 25 | #if defined ( __ICCARM__ ) 26 | #pragma system_include /* treat file as system include file for MISRA check */ 27 | #elif defined (__clang__) 28 | #pragma clang system_header /* treat file as system include file */ 29 | #endif 30 | 31 | #ifndef TZ_CONTEXT_H 32 | #define TZ_CONTEXT_H 33 | 34 | #include 35 | 36 | #ifndef TZ_MODULEID_T 37 | #define TZ_MODULEID_T 38 | /// \details Data type that identifies secure software modules called by a process. 39 | typedef uint32_t TZ_ModuleId_t; 40 | #endif 41 | 42 | /// \details TZ Memory ID identifies an allocated memory slot. 43 | typedef uint32_t TZ_MemoryId_t; 44 | 45 | /// Initialize secure context memory system 46 | /// \return execution status (1: success, 0: error) 47 | uint32_t TZ_InitContextSystem_S (void); 48 | 49 | /// Allocate context memory for calling secure software modules in TrustZone 50 | /// \param[in] module identifies software modules called from non-secure mode 51 | /// \return value != 0 id TrustZone memory slot identifier 52 | /// \return value 0 no memory available or internal error 53 | TZ_MemoryId_t TZ_AllocModuleContext_S (TZ_ModuleId_t module); 54 | 55 | /// Free context memory that was previously allocated with \ref TZ_AllocModuleContext_S 56 | /// \param[in] id TrustZone memory slot identifier 57 | /// \return execution status (1: success, 0: error) 58 | uint32_t TZ_FreeModuleContext_S (TZ_MemoryId_t id); 59 | 60 | /// Load secure context (called on RTOS thread context switch) 61 | /// \param[in] id TrustZone memory slot identifier 62 | /// \return execution status (1: success, 0: error) 63 | uint32_t TZ_LoadContext_S (TZ_MemoryId_t id); 64 | 65 | /// Store secure context (called on RTOS thread context switch) 66 | /// \param[in] id TrustZone memory slot identifier 67 | /// \return execution status (1: success, 0: error) 68 | uint32_t TZ_StoreContext_S (TZ_MemoryId_t id); 69 | 70 | #endif // TZ_CONTEXT_H 71 | -------------------------------------------------------------------------------- /2.Software/Power_X/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_def.h: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * @file stm32f1xx_hal_def.h 4 | * @author MCD Application Team 5 | * @brief This file contains HAL common defines, enumeration, macros and 6 | * structures definitions. 7 | ****************************************************************************** 8 | * @attention 9 | * 10 | *

© Copyright (c) 2017 STMicroelectronics. 11 | * All rights reserved.

12 | * 13 | * This software component is licensed by ST under BSD 3-Clause license, 14 | * the "License"; You may not use this file except in compliance with the 15 | * License. You may obtain a copy of the License at: 16 | * opensource.org/licenses/BSD-3-Clause 17 | * 18 | ****************************************************************************** 19 | */ 20 | 21 | /* Define to prevent recursive inclusion -------------------------------------*/ 22 | #ifndef __STM32F1xx_HAL_DEF 23 | #define __STM32F1xx_HAL_DEF 24 | 25 | #ifdef __cplusplus 26 | extern "C" { 27 | #endif 28 | 29 | /* Includes ------------------------------------------------------------------*/ 30 | #include "stm32f1xx.h" 31 | #include "Legacy/stm32_hal_legacy.h" 32 | #include 33 | 34 | /* Exported types ------------------------------------------------------------*/ 35 | 36 | /** 37 | * @brief HAL Status structures definition 38 | */ 39 | typedef enum 40 | { 41 | HAL_OK = 0x00U, 42 | HAL_ERROR = 0x01U, 43 | HAL_BUSY = 0x02U, 44 | HAL_TIMEOUT = 0x03U 45 | } HAL_StatusTypeDef; 46 | 47 | /** 48 | * @brief HAL Lock structures definition 49 | */ 50 | typedef enum 51 | { 52 | HAL_UNLOCKED = 0x00U, 53 | HAL_LOCKED = 0x01U 54 | } HAL_LockTypeDef; 55 | 56 | /* Exported macro ------------------------------------------------------------*/ 57 | #define HAL_MAX_DELAY 0xFFFFFFFFU 58 | 59 | #define HAL_IS_BIT_SET(REG, BIT) (((REG) & (BIT)) != 0U) 60 | #define HAL_IS_BIT_CLR(REG, BIT) (((REG) & (BIT)) == 0U) 61 | 62 | #define __HAL_LINKDMA(__HANDLE__, __PPP_DMA_FIELD__, __DMA_HANDLE__) \ 63 | do{ \ 64 | (__HANDLE__)->__PPP_DMA_FIELD__ = &(__DMA_HANDLE__); \ 65 | (__DMA_HANDLE__).Parent = (__HANDLE__); \ 66 | } while(0U) 67 | 68 | #define UNUSED(X) (void)X /* To avoid gcc/g++ warnings */ 69 | 70 | /** @brief Reset the Handle's State field. 71 | * @param __HANDLE__ specifies the Peripheral Handle. 72 | * @note This macro can be used for the following purpose: 73 | * - When the Handle is declared as local variable; before passing it as parameter 74 | * to HAL_PPP_Init() for the first time, it is mandatory to use this macro 75 | * to set to 0 the Handle's "State" field. 76 | * Otherwise, "State" field may have any random value and the first time the function 77 | * HAL_PPP_Init() is called, the low level hardware initialization will be missed 78 | * (i.e. HAL_PPP_MspInit() will not be executed). 79 | * - When there is a need to reconfigure the low level hardware: instead of calling 80 | * HAL_PPP_DeInit() then HAL_PPP_Init(), user can make a call to this macro then HAL_PPP_Init(). 81 | * In this later function, when the Handle's "State" field is set to 0, it will execute the function 82 | * HAL_PPP_MspInit() which will reconfigure the low level hardware. 83 | * @retval None 84 | */ 85 | #define __HAL_RESET_HANDLE_STATE(__HANDLE__) ((__HANDLE__)->State = 0U) 86 | 87 | #if (USE_RTOS == 1U) 88 | /* Reserved for future use */ 89 | #error "USE_RTOS should be 0 in the current HAL release" 90 | #else 91 | #define __HAL_LOCK(__HANDLE__) \ 92 | do{ \ 93 | if((__HANDLE__)->Lock == HAL_LOCKED) \ 94 | { \ 95 | return HAL_BUSY; \ 96 | } \ 97 | else \ 98 | { \ 99 | (__HANDLE__)->Lock = HAL_LOCKED; \ 100 | } \ 101 | }while (0U) 102 | 103 | #define __HAL_UNLOCK(__HANDLE__) \ 104 | do{ \ 105 | (__HANDLE__)->Lock = HAL_UNLOCKED; \ 106 | }while (0U) 107 | #endif /* USE_RTOS */ 108 | 109 | #if defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050) /* ARM Compiler V6 */ 110 | #ifndef __weak 111 | #define __weak __attribute__((weak)) 112 | #endif 113 | #ifndef __packed 114 | #define __packed __attribute__((packed)) 115 | #endif 116 | #elif defined ( __GNUC__ ) && !defined (__CC_ARM) /* GNU Compiler */ 117 | #ifndef __weak 118 | #define __weak __attribute__((weak)) 119 | #endif /* __weak */ 120 | #ifndef __packed 121 | #define __packed __attribute__((__packed__)) 122 | #endif /* __packed */ 123 | #endif /* __GNUC__ */ 124 | 125 | 126 | /* Macro to get variable aligned on 4-bytes, for __ICCARM__ the directive "#pragma data_alignment=4" must be used instead */ 127 | #if defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050) /* ARM Compiler V6 */ 128 | #ifndef __ALIGN_BEGIN 129 | #define __ALIGN_BEGIN 130 | #endif 131 | #ifndef __ALIGN_END 132 | #define __ALIGN_END __attribute__ ((aligned (4))) 133 | #endif 134 | #elif defined ( __GNUC__ ) && !defined (__CC_ARM) /* GNU Compiler */ 135 | #ifndef __ALIGN_END 136 | #define __ALIGN_END __attribute__ ((aligned (4))) 137 | #endif /* __ALIGN_END */ 138 | #ifndef __ALIGN_BEGIN 139 | #define __ALIGN_BEGIN 140 | #endif /* __ALIGN_BEGIN */ 141 | #else 142 | #ifndef __ALIGN_END 143 | #define __ALIGN_END 144 | #endif /* __ALIGN_END */ 145 | #ifndef __ALIGN_BEGIN 146 | #if defined (__CC_ARM) /* ARM Compiler V5*/ 147 | #define __ALIGN_BEGIN __align(4) 148 | #elif defined (__ICCARM__) /* IAR Compiler */ 149 | #define __ALIGN_BEGIN 150 | #endif /* __CC_ARM */ 151 | #endif /* __ALIGN_BEGIN */ 152 | #endif /* __GNUC__ */ 153 | 154 | 155 | /** 156 | * @brief __RAM_FUNC definition 157 | */ 158 | #if defined ( __CC_ARM ) || (defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)) 159 | /* ARM Compiler V4/V5 and V6 160 | -------------------------- 161 | RAM functions are defined using the toolchain options. 162 | Functions that are executed in RAM should reside in a separate source module. 163 | Using the 'Options for File' dialog you can simply change the 'Code / Const' 164 | area of a module to a memory space in physical RAM. 165 | Available memory areas are declared in the 'Target' tab of the 'Options for Target' 166 | dialog. 167 | */ 168 | #define __RAM_FUNC 169 | 170 | #elif defined ( __ICCARM__ ) 171 | /* ICCARM Compiler 172 | --------------- 173 | RAM functions are defined using a specific toolchain keyword "__ramfunc". 174 | */ 175 | #define __RAM_FUNC __ramfunc 176 | 177 | #elif defined ( __GNUC__ ) 178 | /* GNU Compiler 179 | ------------ 180 | RAM functions are defined using a specific toolchain attribute 181 | "__attribute__((section(".RamFunc")))". 182 | */ 183 | #define __RAM_FUNC __attribute__((section(".RamFunc"))) 184 | 185 | #endif 186 | 187 | /** 188 | * @brief __NOINLINE definition 189 | */ 190 | #if defined ( __CC_ARM ) || (defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)) || defined ( __GNUC__ ) 191 | /* ARM V4/V5 and V6 & GNU Compiler 192 | ------------------------------- 193 | */ 194 | #define __NOINLINE __attribute__ ( (noinline) ) 195 | 196 | #elif defined ( __ICCARM__ ) 197 | /* ICCARM Compiler 198 | --------------- 199 | */ 200 | #define __NOINLINE _Pragma("optimize = no_inline") 201 | 202 | #endif 203 | 204 | #ifdef __cplusplus 205 | } 206 | #endif 207 | 208 | #endif /* ___STM32F1xx_HAL_DEF */ 209 | 210 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 211 | -------------------------------------------------------------------------------- /2.Software/Power_X/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash.h: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * @file stm32f1xx_hal_flash.h 4 | * @author MCD Application Team 5 | * @brief Header file of Flash HAL module. 6 | ****************************************************************************** 7 | * @attention 8 | * 9 | *

© Copyright (c) 2016 STMicroelectronics. 10 | * All rights reserved.

11 | * 12 | * This software component is licensed by ST under BSD 3-Clause license, 13 | * the "License"; You may not use this file except in compliance with the 14 | * License. You may obtain a copy of the License at: 15 | * opensource.org/licenses/BSD-3-Clause 16 | * 17 | ****************************************************************************** 18 | */ 19 | 20 | /* Define to prevent recursive inclusion -------------------------------------*/ 21 | #ifndef __STM32F1xx_HAL_FLASH_H 22 | #define __STM32F1xx_HAL_FLASH_H 23 | 24 | #ifdef __cplusplus 25 | extern "C" { 26 | #endif 27 | 28 | /* Includes ------------------------------------------------------------------*/ 29 | #include "stm32f1xx_hal_def.h" 30 | 31 | /** @addtogroup STM32F1xx_HAL_Driver 32 | * @{ 33 | */ 34 | 35 | /** @addtogroup FLASH 36 | * @{ 37 | */ 38 | 39 | /** @addtogroup FLASH_Private_Constants 40 | * @{ 41 | */ 42 | #define FLASH_TIMEOUT_VALUE 50000U /* 50 s */ 43 | /** 44 | * @} 45 | */ 46 | 47 | /** @addtogroup FLASH_Private_Macros 48 | * @{ 49 | */ 50 | 51 | #define IS_FLASH_TYPEPROGRAM(VALUE) (((VALUE) == FLASH_TYPEPROGRAM_HALFWORD) || \ 52 | ((VALUE) == FLASH_TYPEPROGRAM_WORD) || \ 53 | ((VALUE) == FLASH_TYPEPROGRAM_DOUBLEWORD)) 54 | 55 | #if defined(FLASH_ACR_LATENCY) 56 | #define IS_FLASH_LATENCY(__LATENCY__) (((__LATENCY__) == FLASH_LATENCY_0) || \ 57 | ((__LATENCY__) == FLASH_LATENCY_1) || \ 58 | ((__LATENCY__) == FLASH_LATENCY_2)) 59 | 60 | #else 61 | #define IS_FLASH_LATENCY(__LATENCY__) ((__LATENCY__) == FLASH_LATENCY_0) 62 | #endif /* FLASH_ACR_LATENCY */ 63 | /** 64 | * @} 65 | */ 66 | 67 | /* Exported types ------------------------------------------------------------*/ 68 | /** @defgroup FLASH_Exported_Types FLASH Exported Types 69 | * @{ 70 | */ 71 | 72 | /** 73 | * @brief FLASH Procedure structure definition 74 | */ 75 | typedef enum 76 | { 77 | FLASH_PROC_NONE = 0U, 78 | FLASH_PROC_PAGEERASE = 1U, 79 | FLASH_PROC_MASSERASE = 2U, 80 | FLASH_PROC_PROGRAMHALFWORD = 3U, 81 | FLASH_PROC_PROGRAMWORD = 4U, 82 | FLASH_PROC_PROGRAMDOUBLEWORD = 5U 83 | } FLASH_ProcedureTypeDef; 84 | 85 | /** 86 | * @brief FLASH handle Structure definition 87 | */ 88 | typedef struct 89 | { 90 | __IO FLASH_ProcedureTypeDef ProcedureOnGoing; /*!< Internal variable to indicate which procedure is ongoing or not in IT context */ 91 | 92 | __IO uint32_t DataRemaining; /*!< Internal variable to save the remaining pages to erase or half-word to program in IT context */ 93 | 94 | __IO uint32_t Address; /*!< Internal variable to save address selected for program or erase */ 95 | 96 | __IO uint64_t Data; /*!< Internal variable to save data to be programmed */ 97 | 98 | HAL_LockTypeDef Lock; /*!< FLASH locking object */ 99 | 100 | __IO uint32_t ErrorCode; /*!< FLASH error code 101 | This parameter can be a value of @ref FLASH_Error_Codes */ 102 | } FLASH_ProcessTypeDef; 103 | 104 | /** 105 | * @} 106 | */ 107 | 108 | /* Exported constants --------------------------------------------------------*/ 109 | /** @defgroup FLASH_Exported_Constants FLASH Exported Constants 110 | * @{ 111 | */ 112 | 113 | /** @defgroup FLASH_Error_Codes FLASH Error Codes 114 | * @{ 115 | */ 116 | 117 | #define HAL_FLASH_ERROR_NONE 0x00U /*!< No error */ 118 | #define HAL_FLASH_ERROR_PROG 0x01U /*!< Programming error */ 119 | #define HAL_FLASH_ERROR_WRP 0x02U /*!< Write protection error */ 120 | #define HAL_FLASH_ERROR_OPTV 0x04U /*!< Option validity error */ 121 | 122 | /** 123 | * @} 124 | */ 125 | 126 | /** @defgroup FLASH_Type_Program FLASH Type Program 127 | * @{ 128 | */ 129 | #define FLASH_TYPEPROGRAM_HALFWORD 0x01U /*!ACR |= FLASH_ACR_HLFCYA) 183 | 184 | /** 185 | * @brief Disable the FLASH half cycle access. 186 | * @note half cycle access can only be used with a low-frequency clock of less than 187 | 8 MHz that can be obtained with the use of HSI or HSE but not of PLL. 188 | * @retval None 189 | */ 190 | #define __HAL_FLASH_HALF_CYCLE_ACCESS_DISABLE() (FLASH->ACR &= (~FLASH_ACR_HLFCYA)) 191 | 192 | /** 193 | * @} 194 | */ 195 | 196 | #if defined(FLASH_ACR_LATENCY) 197 | /** @defgroup FLASH_EM_Latency FLASH Latency 198 | * @brief macros to handle FLASH Latency 199 | * @{ 200 | */ 201 | 202 | /** 203 | * @brief Set the FLASH Latency. 204 | * @param __LATENCY__ FLASH Latency 205 | * The value of this parameter depend on device used within the same series 206 | * @retval None 207 | */ 208 | #define __HAL_FLASH_SET_LATENCY(__LATENCY__) (FLASH->ACR = (FLASH->ACR&(~FLASH_ACR_LATENCY)) | (__LATENCY__)) 209 | 210 | 211 | /** 212 | * @brief Get the FLASH Latency. 213 | * @retval FLASH Latency 214 | * The value of this parameter depend on device used within the same series 215 | */ 216 | #define __HAL_FLASH_GET_LATENCY() (READ_BIT((FLASH->ACR), FLASH_ACR_LATENCY)) 217 | 218 | /** 219 | * @} 220 | */ 221 | 222 | #endif /* FLASH_ACR_LATENCY */ 223 | /** @defgroup FLASH_Prefetch FLASH Prefetch 224 | * @brief macros to handle FLASH Prefetch buffer 225 | * @{ 226 | */ 227 | /** 228 | * @brief Enable the FLASH prefetch buffer. 229 | * @retval None 230 | */ 231 | #define __HAL_FLASH_PREFETCH_BUFFER_ENABLE() (FLASH->ACR |= FLASH_ACR_PRFTBE) 232 | 233 | /** 234 | * @brief Disable the FLASH prefetch buffer. 235 | * @retval None 236 | */ 237 | #define __HAL_FLASH_PREFETCH_BUFFER_DISABLE() (FLASH->ACR &= (~FLASH_ACR_PRFTBE)) 238 | 239 | /** 240 | * @} 241 | */ 242 | 243 | /** 244 | * @} 245 | */ 246 | 247 | /* Include FLASH HAL Extended module */ 248 | #include "stm32f1xx_hal_flash_ex.h" 249 | 250 | /* Exported functions --------------------------------------------------------*/ 251 | /** @addtogroup FLASH_Exported_Functions 252 | * @{ 253 | */ 254 | 255 | /** @addtogroup FLASH_Exported_Functions_Group1 256 | * @{ 257 | */ 258 | /* IO operation functions *****************************************************/ 259 | HAL_StatusTypeDef HAL_FLASH_Program(uint32_t TypeProgram, uint32_t Address, uint64_t Data); 260 | HAL_StatusTypeDef HAL_FLASH_Program_IT(uint32_t TypeProgram, uint32_t Address, uint64_t Data); 261 | 262 | /* FLASH IRQ handler function */ 263 | void HAL_FLASH_IRQHandler(void); 264 | /* Callbacks in non blocking modes */ 265 | void HAL_FLASH_EndOfOperationCallback(uint32_t ReturnValue); 266 | void HAL_FLASH_OperationErrorCallback(uint32_t ReturnValue); 267 | 268 | /** 269 | * @} 270 | */ 271 | 272 | /** @addtogroup FLASH_Exported_Functions_Group2 273 | * @{ 274 | */ 275 | /* Peripheral Control functions ***********************************************/ 276 | HAL_StatusTypeDef HAL_FLASH_Unlock(void); 277 | HAL_StatusTypeDef HAL_FLASH_Lock(void); 278 | HAL_StatusTypeDef HAL_FLASH_OB_Unlock(void); 279 | HAL_StatusTypeDef HAL_FLASH_OB_Lock(void); 280 | void HAL_FLASH_OB_Launch(void); 281 | 282 | /** 283 | * @} 284 | */ 285 | 286 | /** @addtogroup FLASH_Exported_Functions_Group3 287 | * @{ 288 | */ 289 | /* Peripheral State and Error functions ***************************************/ 290 | uint32_t HAL_FLASH_GetError(void); 291 | 292 | /** 293 | * @} 294 | */ 295 | 296 | /** 297 | * @} 298 | */ 299 | 300 | /* Private function -------------------------------------------------*/ 301 | /** @addtogroup FLASH_Private_Functions 302 | * @{ 303 | */ 304 | HAL_StatusTypeDef FLASH_WaitForLastOperation(uint32_t Timeout); 305 | #if defined(FLASH_BANK2_END) 306 | HAL_StatusTypeDef FLASH_WaitForLastOperationBank2(uint32_t Timeout); 307 | #endif /* FLASH_BANK2_END */ 308 | 309 | /** 310 | * @} 311 | */ 312 | 313 | /** 314 | * @} 315 | */ 316 | 317 | /** 318 | * @} 319 | */ 320 | 321 | #ifdef __cplusplus 322 | } 323 | #endif 324 | 325 | #endif /* __STM32F1xx_HAL_FLASH_H */ 326 | 327 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 328 | 329 | -------------------------------------------------------------------------------- /2.Software/Power_X/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * @file stm32f1xx_hal_tim_ex.h 4 | * @author MCD Application Team 5 | * @brief Header file of TIM HAL Extended module. 6 | ****************************************************************************** 7 | * @attention 8 | * 9 | *

© Copyright (c) 2016 STMicroelectronics. 10 | * All rights reserved.

11 | * 12 | * This software component is licensed by ST under BSD 3-Clause license, 13 | * the "License"; You may not use this file except in compliance with the 14 | * License. You may obtain a copy of the License at: 15 | * opensource.org/licenses/BSD-3-Clause 16 | * 17 | ****************************************************************************** 18 | */ 19 | 20 | /* Define to prevent recursive inclusion -------------------------------------*/ 21 | #ifndef STM32F1xx_HAL_TIM_EX_H 22 | #define STM32F1xx_HAL_TIM_EX_H 23 | 24 | #ifdef __cplusplus 25 | extern "C" { 26 | #endif 27 | 28 | /* Includes ------------------------------------------------------------------*/ 29 | #include "stm32f1xx_hal_def.h" 30 | 31 | /** @addtogroup STM32F1xx_HAL_Driver 32 | * @{ 33 | */ 34 | 35 | /** @addtogroup TIMEx 36 | * @{ 37 | */ 38 | 39 | /* Exported types ------------------------------------------------------------*/ 40 | /** @defgroup TIMEx_Exported_Types TIM Extended Exported Types 41 | * @{ 42 | */ 43 | 44 | /** 45 | * @brief TIM Hall sensor Configuration Structure definition 46 | */ 47 | 48 | typedef struct 49 | { 50 | uint32_t IC1Polarity; /*!< Specifies the active edge of the input signal. 51 | This parameter can be a value of @ref TIM_Input_Capture_Polarity */ 52 | 53 | uint32_t IC1Prescaler; /*!< Specifies the Input Capture Prescaler. 54 | This parameter can be a value of @ref TIM_Input_Capture_Prescaler */ 55 | 56 | uint32_t IC1Filter; /*!< Specifies the input capture filter. 57 | This parameter can be a number between Min_Data = 0x0 and Max_Data = 0xF */ 58 | 59 | uint32_t Commutation_Delay; /*!< Specifies the pulse value to be loaded into the Capture Compare Register. 60 | This parameter can be a number between Min_Data = 0x0000 and Max_Data = 0xFFFF */ 61 | } TIM_HallSensor_InitTypeDef; 62 | /** 63 | * @} 64 | */ 65 | /* End of exported types -----------------------------------------------------*/ 66 | 67 | /* Exported constants --------------------------------------------------------*/ 68 | /** @defgroup TIMEx_Exported_Constants TIM Extended Exported Constants 69 | * @{ 70 | */ 71 | 72 | /** @defgroup TIMEx_Remap TIM Extended Remapping 73 | * @{ 74 | */ 75 | /** 76 | * @} 77 | */ 78 | 79 | /** 80 | * @} 81 | */ 82 | /* End of exported constants -------------------------------------------------*/ 83 | 84 | /* Exported macro ------------------------------------------------------------*/ 85 | /** @defgroup TIMEx_Exported_Macros TIM Extended Exported Macros 86 | * @{ 87 | */ 88 | 89 | /** 90 | * @} 91 | */ 92 | /* End of exported macro -----------------------------------------------------*/ 93 | 94 | /* Private macro -------------------------------------------------------------*/ 95 | /** @defgroup TIMEx_Private_Macros TIM Extended Private Macros 96 | * @{ 97 | */ 98 | 99 | /** 100 | * @} 101 | */ 102 | /* End of private macro ------------------------------------------------------*/ 103 | 104 | /* Exported functions --------------------------------------------------------*/ 105 | /** @addtogroup TIMEx_Exported_Functions TIM Extended Exported Functions 106 | * @{ 107 | */ 108 | 109 | /** @addtogroup TIMEx_Exported_Functions_Group1 Extended Timer Hall Sensor functions 110 | * @brief Timer Hall Sensor functions 111 | * @{ 112 | */ 113 | /* Timer Hall Sensor functions **********************************************/ 114 | HAL_StatusTypeDef HAL_TIMEx_HallSensor_Init(TIM_HandleTypeDef *htim, TIM_HallSensor_InitTypeDef *sConfig); 115 | HAL_StatusTypeDef HAL_TIMEx_HallSensor_DeInit(TIM_HandleTypeDef *htim); 116 | 117 | void HAL_TIMEx_HallSensor_MspInit(TIM_HandleTypeDef *htim); 118 | void HAL_TIMEx_HallSensor_MspDeInit(TIM_HandleTypeDef *htim); 119 | 120 | /* Blocking mode: Polling */ 121 | HAL_StatusTypeDef HAL_TIMEx_HallSensor_Start(TIM_HandleTypeDef *htim); 122 | HAL_StatusTypeDef HAL_TIMEx_HallSensor_Stop(TIM_HandleTypeDef *htim); 123 | /* Non-Blocking mode: Interrupt */ 124 | HAL_StatusTypeDef HAL_TIMEx_HallSensor_Start_IT(TIM_HandleTypeDef *htim); 125 | HAL_StatusTypeDef HAL_TIMEx_HallSensor_Stop_IT(TIM_HandleTypeDef *htim); 126 | /* Non-Blocking mode: DMA */ 127 | HAL_StatusTypeDef HAL_TIMEx_HallSensor_Start_DMA(TIM_HandleTypeDef *htim, uint32_t *pData, uint16_t Length); 128 | HAL_StatusTypeDef HAL_TIMEx_HallSensor_Stop_DMA(TIM_HandleTypeDef *htim); 129 | /** 130 | * @} 131 | */ 132 | 133 | /** @addtogroup TIMEx_Exported_Functions_Group2 Extended Timer Complementary Output Compare functions 134 | * @brief Timer Complementary Output Compare functions 135 | * @{ 136 | */ 137 | /* Timer Complementary Output Compare functions *****************************/ 138 | /* Blocking mode: Polling */ 139 | HAL_StatusTypeDef HAL_TIMEx_OCN_Start(TIM_HandleTypeDef *htim, uint32_t Channel); 140 | HAL_StatusTypeDef HAL_TIMEx_OCN_Stop(TIM_HandleTypeDef *htim, uint32_t Channel); 141 | 142 | /* Non-Blocking mode: Interrupt */ 143 | HAL_StatusTypeDef HAL_TIMEx_OCN_Start_IT(TIM_HandleTypeDef *htim, uint32_t Channel); 144 | HAL_StatusTypeDef HAL_TIMEx_OCN_Stop_IT(TIM_HandleTypeDef *htim, uint32_t Channel); 145 | 146 | /* Non-Blocking mode: DMA */ 147 | HAL_StatusTypeDef HAL_TIMEx_OCN_Start_DMA(TIM_HandleTypeDef *htim, uint32_t Channel, uint32_t *pData, uint16_t Length); 148 | HAL_StatusTypeDef HAL_TIMEx_OCN_Stop_DMA(TIM_HandleTypeDef *htim, uint32_t Channel); 149 | /** 150 | * @} 151 | */ 152 | 153 | /** @addtogroup TIMEx_Exported_Functions_Group3 Extended Timer Complementary PWM functions 154 | * @brief Timer Complementary PWM functions 155 | * @{ 156 | */ 157 | /* Timer Complementary PWM functions ****************************************/ 158 | /* Blocking mode: Polling */ 159 | HAL_StatusTypeDef HAL_TIMEx_PWMN_Start(TIM_HandleTypeDef *htim, uint32_t Channel); 160 | HAL_StatusTypeDef HAL_TIMEx_PWMN_Stop(TIM_HandleTypeDef *htim, uint32_t Channel); 161 | 162 | /* Non-Blocking mode: Interrupt */ 163 | HAL_StatusTypeDef HAL_TIMEx_PWMN_Start_IT(TIM_HandleTypeDef *htim, uint32_t Channel); 164 | HAL_StatusTypeDef HAL_TIMEx_PWMN_Stop_IT(TIM_HandleTypeDef *htim, uint32_t Channel); 165 | /* Non-Blocking mode: DMA */ 166 | HAL_StatusTypeDef HAL_TIMEx_PWMN_Start_DMA(TIM_HandleTypeDef *htim, uint32_t Channel, uint32_t *pData, uint16_t Length); 167 | HAL_StatusTypeDef HAL_TIMEx_PWMN_Stop_DMA(TIM_HandleTypeDef *htim, uint32_t Channel); 168 | /** 169 | * @} 170 | */ 171 | 172 | /** @addtogroup TIMEx_Exported_Functions_Group4 Extended Timer Complementary One Pulse functions 173 | * @brief Timer Complementary One Pulse functions 174 | * @{ 175 | */ 176 | /* Timer Complementary One Pulse functions **********************************/ 177 | /* Blocking mode: Polling */ 178 | HAL_StatusTypeDef HAL_TIMEx_OnePulseN_Start(TIM_HandleTypeDef *htim, uint32_t OutputChannel); 179 | HAL_StatusTypeDef HAL_TIMEx_OnePulseN_Stop(TIM_HandleTypeDef *htim, uint32_t OutputChannel); 180 | 181 | /* Non-Blocking mode: Interrupt */ 182 | HAL_StatusTypeDef HAL_TIMEx_OnePulseN_Start_IT(TIM_HandleTypeDef *htim, uint32_t OutputChannel); 183 | HAL_StatusTypeDef HAL_TIMEx_OnePulseN_Stop_IT(TIM_HandleTypeDef *htim, uint32_t OutputChannel); 184 | /** 185 | * @} 186 | */ 187 | 188 | /** @addtogroup TIMEx_Exported_Functions_Group5 Extended Peripheral Control functions 189 | * @brief Peripheral Control functions 190 | * @{ 191 | */ 192 | /* Extended Control functions ************************************************/ 193 | HAL_StatusTypeDef HAL_TIMEx_ConfigCommutEvent(TIM_HandleTypeDef *htim, uint32_t InputTrigger, 194 | uint32_t CommutationSource); 195 | HAL_StatusTypeDef HAL_TIMEx_ConfigCommutEvent_IT(TIM_HandleTypeDef *htim, uint32_t InputTrigger, 196 | uint32_t CommutationSource); 197 | HAL_StatusTypeDef HAL_TIMEx_ConfigCommutEvent_DMA(TIM_HandleTypeDef *htim, uint32_t InputTrigger, 198 | uint32_t CommutationSource); 199 | HAL_StatusTypeDef HAL_TIMEx_MasterConfigSynchronization(TIM_HandleTypeDef *htim, 200 | TIM_MasterConfigTypeDef *sMasterConfig); 201 | HAL_StatusTypeDef HAL_TIMEx_ConfigBreakDeadTime(TIM_HandleTypeDef *htim, 202 | TIM_BreakDeadTimeConfigTypeDef *sBreakDeadTimeConfig); 203 | HAL_StatusTypeDef HAL_TIMEx_RemapConfig(TIM_HandleTypeDef *htim, uint32_t Remap); 204 | /** 205 | * @} 206 | */ 207 | 208 | /** @addtogroup TIMEx_Exported_Functions_Group6 Extended Callbacks functions 209 | * @brief Extended Callbacks functions 210 | * @{ 211 | */ 212 | /* Extended Callback **********************************************************/ 213 | void HAL_TIMEx_CommutCallback(TIM_HandleTypeDef *htim); 214 | void HAL_TIMEx_CommutHalfCpltCallback(TIM_HandleTypeDef *htim); 215 | void HAL_TIMEx_BreakCallback(TIM_HandleTypeDef *htim); 216 | /** 217 | * @} 218 | */ 219 | 220 | /** @addtogroup TIMEx_Exported_Functions_Group7 Extended Peripheral State functions 221 | * @brief Extended Peripheral State functions 222 | * @{ 223 | */ 224 | /* Extended Peripheral State functions ***************************************/ 225 | HAL_TIM_StateTypeDef HAL_TIMEx_HallSensor_GetState(TIM_HandleTypeDef *htim); 226 | HAL_TIM_ChannelStateTypeDef HAL_TIMEx_GetChannelNState(TIM_HandleTypeDef *htim, uint32_t ChannelN); 227 | /** 228 | * @} 229 | */ 230 | 231 | /** 232 | * @} 233 | */ 234 | /* End of exported functions -------------------------------------------------*/ 235 | 236 | /* Private functions----------------------------------------------------------*/ 237 | /** @addtogroup TIMEx_Private_Functions TIMEx Private Functions 238 | * @{ 239 | */ 240 | void TIMEx_DMACommutationCplt(DMA_HandleTypeDef *hdma); 241 | void TIMEx_DMACommutationHalfCplt(DMA_HandleTypeDef *hdma); 242 | /** 243 | * @} 244 | */ 245 | /* End of private functions --------------------------------------------------*/ 246 | 247 | /** 248 | * @} 249 | */ 250 | 251 | /** 252 | * @} 253 | */ 254 | 255 | #ifdef __cplusplus 256 | } 257 | #endif 258 | 259 | 260 | #endif /* STM32F1xx_HAL_TIM_EX_H */ 261 | 262 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 263 | -------------------------------------------------------------------------------- /2.Software/Power_X/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_gpio_ex.c: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * @file stm32f1xx_hal_gpio_ex.c 4 | * @author MCD Application Team 5 | * @brief GPIO Extension HAL module driver. 6 | * This file provides firmware functions to manage the following 7 | * functionalities of the General Purpose Input/Output (GPIO) extension peripheral. 8 | * + Extended features functions 9 | * 10 | @verbatim 11 | ============================================================================== 12 | ##### GPIO Peripheral extension features ##### 13 | ============================================================================== 14 | [..] GPIO module on STM32F1 family, manage also the AFIO register: 15 | (+) Possibility to use the EVENTOUT Cortex feature 16 | 17 | ##### How to use this driver ##### 18 | ============================================================================== 19 | [..] This driver provides functions to use EVENTOUT Cortex feature 20 | (#) Configure EVENTOUT Cortex feature using the function HAL_GPIOEx_ConfigEventout() 21 | (#) Activate EVENTOUT Cortex feature using the HAL_GPIOEx_EnableEventout() 22 | (#) Deactivate EVENTOUT Cortex feature using the HAL_GPIOEx_DisableEventout() 23 | 24 | @endverbatim 25 | ****************************************************************************** 26 | * @attention 27 | * 28 | *

© Copyright (c) 2016 STMicroelectronics. 29 | * All rights reserved.

30 | * 31 | * This software component is licensed by ST under BSD 3-Clause license, 32 | * the "License"; You may not use this file except in compliance with the 33 | * License. You may obtain a copy of the License at: 34 | * opensource.org/licenses/BSD-3-Clause 35 | * 36 | ****************************************************************************** 37 | */ 38 | 39 | /* Includes ------------------------------------------------------------------*/ 40 | #include "stm32f1xx_hal.h" 41 | 42 | /** @addtogroup STM32F1xx_HAL_Driver 43 | * @{ 44 | */ 45 | 46 | /** @defgroup GPIOEx GPIOEx 47 | * @brief GPIO HAL module driver 48 | * @{ 49 | */ 50 | 51 | #ifdef HAL_GPIO_MODULE_ENABLED 52 | 53 | /** @defgroup GPIOEx_Exported_Functions GPIOEx Exported Functions 54 | * @{ 55 | */ 56 | 57 | /** @defgroup GPIOEx_Exported_Functions_Group1 Extended features functions 58 | * @brief Extended features functions 59 | * 60 | @verbatim 61 | ============================================================================== 62 | ##### Extended features functions ##### 63 | ============================================================================== 64 | [..] This section provides functions allowing to: 65 | (+) Configure EVENTOUT Cortex feature using the function HAL_GPIOEx_ConfigEventout() 66 | (+) Activate EVENTOUT Cortex feature using the HAL_GPIOEx_EnableEventout() 67 | (+) Deactivate EVENTOUT Cortex feature using the HAL_GPIOEx_DisableEventout() 68 | 69 | @endverbatim 70 | * @{ 71 | */ 72 | 73 | /** 74 | * @brief Configures the port and pin on which the EVENTOUT Cortex signal will be connected. 75 | * @param GPIO_PortSource Select the port used to output the Cortex EVENTOUT signal. 76 | * This parameter can be a value of @ref GPIOEx_EVENTOUT_PORT. 77 | * @param GPIO_PinSource Select the pin used to output the Cortex EVENTOUT signal. 78 | * This parameter can be a value of @ref GPIOEx_EVENTOUT_PIN. 79 | * @retval None 80 | */ 81 | void HAL_GPIOEx_ConfigEventout(uint32_t GPIO_PortSource, uint32_t GPIO_PinSource) 82 | { 83 | /* Verify the parameters */ 84 | assert_param(IS_AFIO_EVENTOUT_PORT(GPIO_PortSource)); 85 | assert_param(IS_AFIO_EVENTOUT_PIN(GPIO_PinSource)); 86 | 87 | /* Apply the new configuration */ 88 | MODIFY_REG(AFIO->EVCR, (AFIO_EVCR_PORT) | (AFIO_EVCR_PIN), (GPIO_PortSource) | (GPIO_PinSource)); 89 | } 90 | 91 | /** 92 | * @brief Enables the Event Output. 93 | * @retval None 94 | */ 95 | void HAL_GPIOEx_EnableEventout(void) 96 | { 97 | SET_BIT(AFIO->EVCR, AFIO_EVCR_EVOE); 98 | } 99 | 100 | /** 101 | * @brief Disables the Event Output. 102 | * @retval None 103 | */ 104 | void HAL_GPIOEx_DisableEventout(void) 105 | { 106 | CLEAR_BIT(AFIO->EVCR, AFIO_EVCR_EVOE); 107 | } 108 | 109 | /** 110 | * @} 111 | */ 112 | 113 | /** 114 | * @} 115 | */ 116 | 117 | #endif /* HAL_GPIO_MODULE_ENABLED */ 118 | 119 | /** 120 | * @} 121 | */ 122 | 123 | /** 124 | * @} 125 | */ 126 | 127 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 128 | -------------------------------------------------------------------------------- /2.Software/Power_X/Makefile: -------------------------------------------------------------------------------- 1 | ########################################################################################################################## 2 | # File automatically-generated by tool: [projectgenerator] version: [3.11.2] date: [Fri Feb 26 09:15:50 CST 2021] 3 | ########################################################################################################################## 4 | 5 | # ------------------------------------------------ 6 | # Generic Makefile (based on gcc) 7 | # 8 | # ChangeLog : 9 | # 2017-02-10 - Several enhancements + project update mode 10 | # 2015-07-22 - first version 11 | # ------------------------------------------------ 12 | 13 | ###################################### 14 | # target 15 | ###################################### 16 | TARGET = Power_X 17 | 18 | 19 | ###################################### 20 | # building variables 21 | ###################################### 22 | # debug build? 23 | DEBUG = 1 24 | # optimization 25 | OPT = -Og 26 | 27 | 28 | ####################################### 29 | # paths 30 | ####################################### 31 | # Build path 32 | BUILD_DIR = build 33 | 34 | ###################################### 35 | # source 36 | ###################################### 37 | # C sources 38 | C_SOURCES = \ 39 | Core/Src/ina226.c \ 40 | Core/Src/oled.c \ 41 | Core/Src/main.c \ 42 | Core/Src/gpio.c \ 43 | Core/Src/stm32f1xx_it.c \ 44 | Core/Src/stm32f1xx_hal_msp.c \ 45 | Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_gpio_ex.c \ 46 | Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.c \ 47 | Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim_ex.c \ 48 | Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal.c \ 49 | Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rcc.c \ 50 | Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rcc_ex.c \ 51 | Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_gpio.c \ 52 | Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_dma.c \ 53 | Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_cortex.c \ 54 | Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_pwr.c \ 55 | Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c \ 56 | Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash_ex.c \ 57 | Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_exti.c \ 58 | Core/Src/system_stm32f1xx.c \ 59 | Core/Src/tim.c 60 | 61 | # ASM sources 62 | ASM_SOURCES = \ 63 | startup_stm32f103xb.s 64 | 65 | 66 | ####################################### 67 | # binaries 68 | ####################################### 69 | PREFIX = arm-none-eabi- 70 | # The gcc compiler bin path can be either defined in make command via GCC_PATH variable (> make GCC_PATH=xxx) 71 | # either it can be added to the PATH environment variable. 72 | ifdef GCC_PATH 73 | CC = $(GCC_PATH)/$(PREFIX)gcc 74 | AS = $(GCC_PATH)/$(PREFIX)gcc -x assembler-with-cpp 75 | CP = $(GCC_PATH)/$(PREFIX)objcopy 76 | SZ = $(GCC_PATH)/$(PREFIX)size 77 | else 78 | CC = $(PREFIX)gcc 79 | AS = $(PREFIX)gcc -x assembler-with-cpp 80 | CP = $(PREFIX)objcopy 81 | SZ = $(PREFIX)size 82 | endif 83 | HEX = $(CP) -O ihex 84 | BIN = $(CP) -O binary -S 85 | 86 | ####################################### 87 | # CFLAGS 88 | ####################################### 89 | # cpu 90 | CPU = -mcpu=cortex-m3 91 | 92 | # fpu 93 | # NONE for Cortex-M0/M0+/M3 94 | 95 | # float-abi 96 | 97 | 98 | # mcu 99 | MCU = $(CPU) -mthumb $(FPU) $(FLOAT-ABI) 100 | 101 | # macros for gcc 102 | # AS defines 103 | AS_DEFS = 104 | 105 | # C defines 106 | C_DEFS = \ 107 | -DUSE_HAL_DRIVER \ 108 | -DSTM32F103xB 109 | 110 | 111 | # AS includes 112 | AS_INCLUDES = 113 | 114 | # C includes 115 | C_INCLUDES = \ 116 | -ICore/Inc \ 117 | -IDrivers/STM32F1xx_HAL_Driver/Inc \ 118 | -IDrivers/STM32F1xx_HAL_Driver/Inc/Legacy \ 119 | -IDrivers/CMSIS/Device/ST/STM32F1xx/Include \ 120 | -IDrivers/CMSIS/Include 121 | 122 | # compile gcc flags 123 | ASFLAGS = $(MCU) $(AS_DEFS) $(AS_INCLUDES) $(OPT) -Wall -fdata-sections -ffunction-sections 124 | 125 | CFLAGS = $(MCU) $(C_DEFS) $(C_INCLUDES) $(OPT) -Wall -fdata-sections -ffunction-sections 126 | 127 | ifeq ($(DEBUG), 1) 128 | CFLAGS += -g -gdwarf-2 129 | endif 130 | 131 | 132 | # Generate dependency information 133 | CFLAGS += -MMD -MP -MF"$(@:%.o=%.d)" 134 | 135 | 136 | ####################################### 137 | # LDFLAGS 138 | ####################################### 139 | # link script 140 | LDSCRIPT = STM32F103C8Tx_FLASH.ld 141 | 142 | # libraries 143 | LIBS = -lc -lm -lnosys 144 | LIBDIR = 145 | LDFLAGS = $(MCU) -specs=nano.specs -T$(LDSCRIPT) $(LIBDIR) $(LIBS) -Wl,-Map=$(BUILD_DIR)/$(TARGET).map,--cref -Wl,--gc-sections 146 | 147 | # default action: build all 148 | all: $(BUILD_DIR)/$(TARGET).elf $(BUILD_DIR)/$(TARGET).hex $(BUILD_DIR)/$(TARGET).bin 149 | 150 | 151 | ####################################### 152 | # build the application 153 | ####################################### 154 | # list of objects 155 | OBJECTS = $(addprefix $(BUILD_DIR)/,$(notdir $(C_SOURCES:.c=.o))) 156 | vpath %.c $(sort $(dir $(C_SOURCES))) 157 | # list of ASM program objects 158 | OBJECTS += $(addprefix $(BUILD_DIR)/,$(notdir $(ASM_SOURCES:.s=.o))) 159 | vpath %.s $(sort $(dir $(ASM_SOURCES))) 160 | 161 | $(BUILD_DIR)/%.o: %.c Makefile | $(BUILD_DIR) 162 | $(CC) -c $(CFLAGS) -Wa,-a,-ad,-alms=$(BUILD_DIR)/$(notdir $(<:.c=.lst)) $< -o $@ 163 | 164 | $(BUILD_DIR)/%.o: %.s Makefile | $(BUILD_DIR) 165 | $(AS) -c $(CFLAGS) $< -o $@ 166 | 167 | $(BUILD_DIR)/$(TARGET).elf: $(OBJECTS) Makefile 168 | $(CC) $(OBJECTS) $(LDFLAGS) -o $@ 169 | $(SZ) $@ 170 | 171 | $(BUILD_DIR)/%.hex: $(BUILD_DIR)/%.elf | $(BUILD_DIR) 172 | $(HEX) $< $@ 173 | 174 | $(BUILD_DIR)/%.bin: $(BUILD_DIR)/%.elf | $(BUILD_DIR) 175 | $(BIN) $< $@ 176 | 177 | $(BUILD_DIR): 178 | mkdir $@ 179 | 180 | ####################################### 181 | # clean up 182 | ####################################### 183 | clean: 184 | -rm -fR $(BUILD_DIR) 185 | 186 | ####################################### 187 | # dependencies 188 | ####################################### 189 | -include $(wildcard $(BUILD_DIR)/*.d) 190 | 191 | # *** EOF *** 192 | -------------------------------------------------------------------------------- /2.Software/Power_X/Power_X.ioc: -------------------------------------------------------------------------------- 1 | #MicroXplorer Configuration settings - do not modify 2 | File.Version=6 3 | GPIO.groupedBy=Group By Peripherals 4 | KeepUserPlacement=false 5 | Mcu.Family=STM32F1 6 | Mcu.IP0=NVIC 7 | Mcu.IP1=RCC 8 | Mcu.IP2=SYS 9 | Mcu.IP3=TIM1 10 | Mcu.IPNb=4 11 | Mcu.Name=STM32F103C(8-B)Tx 12 | Mcu.Package=LQFP48 13 | Mcu.Pin0=PC14-OSC32_IN 14 | Mcu.Pin1=PC15-OSC32_OUT 15 | Mcu.Pin10=PB6 16 | Mcu.Pin11=PB7 17 | Mcu.Pin12=VP_SYS_VS_Systick 18 | Mcu.Pin13=VP_TIM1_VS_ClockSourceINT 19 | Mcu.Pin2=PD0-OSC_IN 20 | Mcu.Pin3=PD1-OSC_OUT 21 | Mcu.Pin4=PA1 22 | Mcu.Pin5=PA2 23 | Mcu.Pin6=PA3 24 | Mcu.Pin7=PB12 25 | Mcu.Pin8=PA13 26 | Mcu.Pin9=PA14 27 | Mcu.PinsNb=14 28 | Mcu.ThirdPartyNb=0 29 | Mcu.UserConstants= 30 | Mcu.UserName=STM32F103C8Tx 31 | MxCube.Version=6.1.1 32 | MxDb.Version=DB.6.0.10 33 | NVIC.BusFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false 34 | NVIC.DebugMonitor_IRQn=true\:0\:0\:false\:false\:true\:false\:false 35 | NVIC.EXTI1_IRQn=true\:1\:1\:true\:false\:true\:true\:true 36 | NVIC.EXTI2_IRQn=true\:1\:1\:true\:false\:true\:true\:true 37 | NVIC.EXTI3_IRQn=true\:1\:1\:true\:false\:true\:true\:true 38 | NVIC.ForceEnableDMAVector=true 39 | NVIC.HardFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false 40 | NVIC.MemoryManagement_IRQn=true\:0\:0\:false\:false\:true\:false\:false 41 | NVIC.NonMaskableInt_IRQn=true\:0\:0\:false\:false\:true\:false\:false 42 | NVIC.PendSV_IRQn=true\:0\:0\:false\:false\:true\:false\:false 43 | NVIC.PriorityGroup=NVIC_PRIORITYGROUP_2 44 | NVIC.SVCall_IRQn=true\:0\:0\:false\:false\:true\:false\:false 45 | NVIC.SysTick_IRQn=true\:0\:0\:false\:false\:true\:false\:true 46 | NVIC.TIM1_UP_IRQn=true\:2\:1\:true\:false\:true\:true\:true 47 | NVIC.UsageFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false 48 | PA1.GPIOParameters=GPIO_PuPd,GPIO_Label,GPIO_ModeDefaultEXTI 49 | PA1.GPIO_Label=KEY1 50 | PA1.GPIO_ModeDefaultEXTI=GPIO_MODE_IT_FALLING 51 | PA1.GPIO_PuPd=GPIO_PULLUP 52 | PA1.Locked=true 53 | PA1.Signal=GPXTI1 54 | PA13.Mode=Serial_Wire 55 | PA13.Signal=SYS_JTMS-SWDIO 56 | PA14.Mode=Serial_Wire 57 | PA14.Signal=SYS_JTCK-SWCLK 58 | PA2.GPIOParameters=GPIO_PuPd,GPIO_Label,GPIO_ModeDefaultEXTI 59 | PA2.GPIO_Label=KEY2 60 | PA2.GPIO_ModeDefaultEXTI=GPIO_MODE_IT_FALLING 61 | PA2.GPIO_PuPd=GPIO_PULLUP 62 | PA2.Locked=true 63 | PA2.Signal=GPXTI2 64 | PA3.GPIOParameters=GPIO_PuPd,GPIO_Label,GPIO_ModeDefaultEXTI 65 | PA3.GPIO_Label=KEY3 66 | PA3.GPIO_ModeDefaultEXTI=GPIO_MODE_IT_FALLING 67 | PA3.GPIO_PuPd=GPIO_PULLUP 68 | PA3.Locked=true 69 | PA3.Signal=GPXTI3 70 | PB12.GPIOParameters=GPIO_Speed,PinState,GPIO_Label 71 | PB12.GPIO_Label=LED 72 | PB12.GPIO_Speed=GPIO_SPEED_FREQ_HIGH 73 | PB12.Locked=true 74 | PB12.PinState=GPIO_PIN_SET 75 | PB12.Signal=GPIO_Output 76 | PB6.GPIOParameters=GPIO_Speed,PinState,GPIO_Label 77 | PB6.GPIO_Label=I2C_CLK 78 | PB6.GPIO_Speed=GPIO_SPEED_FREQ_HIGH 79 | PB6.Locked=true 80 | PB6.PinState=GPIO_PIN_SET 81 | PB6.Signal=GPIO_Output 82 | PB7.GPIOParameters=GPIO_Speed,PinState,GPIO_Label 83 | PB7.GPIO_Label=I2C_SDA 84 | PB7.GPIO_Speed=GPIO_SPEED_FREQ_HIGH 85 | PB7.Locked=true 86 | PB7.PinState=GPIO_PIN_SET 87 | PB7.Signal=GPIO_Output 88 | PC14-OSC32_IN.Mode=LSE-External-Oscillator 89 | PC14-OSC32_IN.Signal=RCC_OSC32_IN 90 | PC15-OSC32_OUT.Mode=LSE-External-Oscillator 91 | PC15-OSC32_OUT.Signal=RCC_OSC32_OUT 92 | PD0-OSC_IN.Mode=HSE-External-Oscillator 93 | PD0-OSC_IN.Signal=RCC_OSC_IN 94 | PD1-OSC_OUT.Mode=HSE-External-Oscillator 95 | PD1-OSC_OUT.Signal=RCC_OSC_OUT 96 | PinOutPanel.RotationAngle=0 97 | ProjectManager.AskForMigrate=true 98 | ProjectManager.BackupPrevious=false 99 | ProjectManager.CompilerOptimize=6 100 | ProjectManager.ComputerToolchain=false 101 | ProjectManager.CoupleFile=true 102 | ProjectManager.CustomerFirmwarePackage= 103 | ProjectManager.DefaultFWLocation=true 104 | ProjectManager.DeletePrevious=true 105 | ProjectManager.DeviceId=STM32F103C8Tx 106 | ProjectManager.FirmwarePackage=STM32Cube FW_F1 V1.8.3 107 | ProjectManager.FreePins=false 108 | ProjectManager.HalAssertFull=false 109 | ProjectManager.HeapSize=0x200 110 | ProjectManager.KeepUserCode=true 111 | ProjectManager.LastFirmware=true 112 | ProjectManager.LibraryCopy=1 113 | ProjectManager.MainLocation=Core/Src 114 | ProjectManager.NoMain=false 115 | ProjectManager.PreviousToolchain= 116 | ProjectManager.ProjectBuild=false 117 | ProjectManager.ProjectFileName=Power_X.ioc 118 | ProjectManager.ProjectName=Power_X 119 | ProjectManager.RegisterCallBack= 120 | ProjectManager.StackSize=0x400 121 | ProjectManager.TargetToolchain=Makefile 122 | ProjectManager.ToolChainLocation= 123 | ProjectManager.UnderRoot=false 124 | ProjectManager.functionlistsort=1-MX_GPIO_Init-GPIO-false-HAL-true,2-SystemClock_Config-RCC-false-HAL-false,3-MX_TIM1_Init-TIM1-false-HAL-true 125 | RCC.ADCFreqValue=36000000 126 | RCC.AHBFreq_Value=72000000 127 | RCC.APB1CLKDivider=RCC_HCLK_DIV2 128 | RCC.APB1Freq_Value=36000000 129 | RCC.APB1TimFreq_Value=72000000 130 | RCC.APB2Freq_Value=72000000 131 | RCC.APB2TimFreq_Value=72000000 132 | RCC.FCLKCortexFreq_Value=72000000 133 | RCC.FamilyName=M 134 | RCC.HCLKFreq_Value=72000000 135 | RCC.IPParameters=ADCFreqValue,AHBFreq_Value,APB1CLKDivider,APB1Freq_Value,APB1TimFreq_Value,APB2Freq_Value,APB2TimFreq_Value,FCLKCortexFreq_Value,FamilyName,HCLKFreq_Value,MCOFreq_Value,PLLCLKFreq_Value,PLLMCOFreq_Value,PLLMUL,PLLSourceVirtual,SYSCLKFreq_VALUE,SYSCLKSource,TimSysFreq_Value,USBFreq_Value,VCOOutput2Freq_Value 136 | RCC.MCOFreq_Value=72000000 137 | RCC.PLLCLKFreq_Value=72000000 138 | RCC.PLLMCOFreq_Value=36000000 139 | RCC.PLLMUL=RCC_PLL_MUL9 140 | RCC.PLLSourceVirtual=RCC_PLLSOURCE_HSE 141 | RCC.SYSCLKFreq_VALUE=72000000 142 | RCC.SYSCLKSource=RCC_SYSCLKSOURCE_PLLCLK 143 | RCC.TimSysFreq_Value=72000000 144 | RCC.USBFreq_Value=72000000 145 | RCC.VCOOutput2Freq_Value=8000000 146 | SH.GPXTI1.0=GPIO_EXTI1 147 | SH.GPXTI1.ConfNb=1 148 | SH.GPXTI2.0=GPIO_EXTI2 149 | SH.GPXTI2.ConfNb=1 150 | SH.GPXTI3.0=GPIO_EXTI3 151 | SH.GPXTI3.ConfNb=1 152 | TIM1.AutoReloadPreload=TIM_AUTORELOAD_PRELOAD_ENABLE 153 | TIM1.IPParameters=Prescaler,Period,AutoReloadPreload 154 | TIM1.Period=1000-1 155 | TIM1.Prescaler=720-1 156 | VP_SYS_VS_Systick.Mode=SysTick 157 | VP_SYS_VS_Systick.Signal=SYS_VS_Systick 158 | VP_TIM1_VS_ClockSourceINT.Mode=Internal 159 | VP_TIM1_VS_ClockSourceINT.Signal=TIM1_VS_ClockSourceINT 160 | board=custom 161 | -------------------------------------------------------------------------------- /2.Software/Power_X/STM32F103C8Tx_FLASH.ld: -------------------------------------------------------------------------------- 1 | /* 2 | ****************************************************************************** 3 | ** 4 | 5 | ** File : LinkerScript.ld 6 | ** 7 | ** Author : Auto-generated by System Workbench for STM32 8 | ** 9 | ** Abstract : Linker script for STM32F103C8Tx series 10 | ** 64Kbytes FLASH and 20Kbytes RAM 11 | ** 12 | ** Set heap size, stack size and stack location according 13 | ** to application requirements. 14 | ** 15 | ** Set memory bank area and size if external memory is used. 16 | ** 17 | ** Target : STMicroelectronics STM32 18 | ** 19 | ** Distribution: The file is distributed “as is,” without any warranty 20 | ** of any kind. 21 | ** 22 | ***************************************************************************** 23 | ** @attention 24 | ** 25 | **

© COPYRIGHT(c) 2019 STMicroelectronics

26 | ** 27 | ** Redistribution and use in source and binary forms, with or without modification, 28 | ** are permitted provided that the following conditions are met: 29 | ** 1. Redistributions of source code must retain the above copyright notice, 30 | ** this list of conditions and the following disclaimer. 31 | ** 2. Redistributions in binary form must reproduce the above copyright notice, 32 | ** this list of conditions and the following disclaimer in the documentation 33 | ** and/or other materials provided with the distribution. 34 | ** 3. Neither the name of STMicroelectronics nor the names of its contributors 35 | ** may be used to endorse or promote products derived from this software 36 | ** without specific prior written permission. 37 | ** 38 | ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 39 | ** AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 40 | ** IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 41 | ** DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 42 | ** FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 43 | ** DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 44 | ** SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 45 | ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 46 | ** OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 47 | ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 48 | ** 49 | ***************************************************************************** 50 | */ 51 | 52 | /* Entry Point */ 53 | ENTRY(Reset_Handler) 54 | 55 | /* Highest address of the user mode stack */ 56 | _estack = 0x20005000; /* end of RAM */ 57 | /* Generate a link error if heap and stack don't fit into RAM */ 58 | _Min_Heap_Size = 0x200; /* required amount of heap */ 59 | _Min_Stack_Size = 0x400; /* required amount of stack */ 60 | 61 | /* Specify the memory areas */ 62 | MEMORY 63 | { 64 | RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 20K 65 | FLASH (rx) : ORIGIN = 0x8000000, LENGTH = 64K 66 | } 67 | 68 | /* Define output sections */ 69 | SECTIONS 70 | { 71 | /* The startup code goes first into FLASH */ 72 | .isr_vector : 73 | { 74 | . = ALIGN(4); 75 | KEEP(*(.isr_vector)) /* Startup code */ 76 | . = ALIGN(4); 77 | } >FLASH 78 | 79 | /* The program code and other data goes into FLASH */ 80 | .text : 81 | { 82 | . = ALIGN(4); 83 | *(.text) /* .text sections (code) */ 84 | *(.text*) /* .text* sections (code) */ 85 | *(.glue_7) /* glue arm to thumb code */ 86 | *(.glue_7t) /* glue thumb to arm code */ 87 | *(.eh_frame) 88 | 89 | KEEP (*(.init)) 90 | KEEP (*(.fini)) 91 | 92 | . = ALIGN(4); 93 | _etext = .; /* define a global symbols at end of code */ 94 | } >FLASH 95 | 96 | /* Constant data goes into FLASH */ 97 | .rodata : 98 | { 99 | . = ALIGN(4); 100 | *(.rodata) /* .rodata sections (constants, strings, etc.) */ 101 | *(.rodata*) /* .rodata* sections (constants, strings, etc.) */ 102 | . = ALIGN(4); 103 | } >FLASH 104 | 105 | .ARM.extab : { *(.ARM.extab* .gnu.linkonce.armextab.*) } >FLASH 106 | .ARM : { 107 | __exidx_start = .; 108 | *(.ARM.exidx*) 109 | __exidx_end = .; 110 | } >FLASH 111 | 112 | .preinit_array : 113 | { 114 | PROVIDE_HIDDEN (__preinit_array_start = .); 115 | KEEP (*(.preinit_array*)) 116 | PROVIDE_HIDDEN (__preinit_array_end = .); 117 | } >FLASH 118 | .init_array : 119 | { 120 | PROVIDE_HIDDEN (__init_array_start = .); 121 | KEEP (*(SORT(.init_array.*))) 122 | KEEP (*(.init_array*)) 123 | PROVIDE_HIDDEN (__init_array_end = .); 124 | } >FLASH 125 | .fini_array : 126 | { 127 | PROVIDE_HIDDEN (__fini_array_start = .); 128 | KEEP (*(SORT(.fini_array.*))) 129 | KEEP (*(.fini_array*)) 130 | PROVIDE_HIDDEN (__fini_array_end = .); 131 | } >FLASH 132 | 133 | /* used by the startup to initialize data */ 134 | _sidata = LOADADDR(.data); 135 | 136 | /* Initialized data sections goes into RAM, load LMA copy after code */ 137 | .data : 138 | { 139 | . = ALIGN(4); 140 | _sdata = .; /* create a global symbol at data start */ 141 | *(.data) /* .data sections */ 142 | *(.data*) /* .data* sections */ 143 | 144 | . = ALIGN(4); 145 | _edata = .; /* define a global symbol at data end */ 146 | } >RAM AT> FLASH 147 | 148 | 149 | /* Uninitialized data section */ 150 | . = ALIGN(4); 151 | .bss : 152 | { 153 | /* This is used by the startup in order to initialize the .bss secion */ 154 | _sbss = .; /* define a global symbol at bss start */ 155 | __bss_start__ = _sbss; 156 | *(.bss) 157 | *(.bss*) 158 | *(COMMON) 159 | 160 | . = ALIGN(4); 161 | _ebss = .; /* define a global symbol at bss end */ 162 | __bss_end__ = _ebss; 163 | } >RAM 164 | 165 | /* User_heap_stack section, used to check that there is enough RAM left */ 166 | ._user_heap_stack : 167 | { 168 | . = ALIGN(8); 169 | PROVIDE ( end = . ); 170 | PROVIDE ( _end = . ); 171 | . = . + _Min_Heap_Size; 172 | . = . + _Min_Stack_Size; 173 | . = ALIGN(8); 174 | } >RAM 175 | 176 | 177 | 178 | /* Remove information from the standard libraries */ 179 | /DISCARD/ : 180 | { 181 | libc.a ( * ) 182 | libm.a ( * ) 183 | libgcc.a ( * ) 184 | } 185 | 186 | .ARM.attributes 0 : { *(.ARM.attributes) } 187 | } 188 | 189 | 190 | -------------------------------------------------------------------------------- /2.Software/Power_X/build/Power_X.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheng-inkor/Power_X/35a9ca20c014c2595a8f86b764cd9c75585b9506/2.Software/Power_X/build/Power_X.bin -------------------------------------------------------------------------------- /2.Software/Power_X/build/Power_X.elf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheng-inkor/Power_X/35a9ca20c014c2595a8f86b764cd9c75585b9506/2.Software/Power_X/build/Power_X.elf -------------------------------------------------------------------------------- /2.Software/Power_X/build/gpio.d: -------------------------------------------------------------------------------- 1 | build/gpio.o: Core/Src/gpio.c Core/Inc/gpio.h Core/Inc/main.h \ 2 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal.h \ 3 | Core/Inc/stm32f1xx_hal_conf.h \ 4 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc.h \ 5 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_def.h \ 6 | Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f1xx.h \ 7 | Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f103xb.h \ 8 | Drivers/CMSIS/Include/core_cm3.h Drivers/CMSIS/Include/cmsis_version.h \ 9 | Drivers/CMSIS/Include/cmsis_compiler.h Drivers/CMSIS/Include/cmsis_gcc.h \ 10 | Drivers/CMSIS/Device/ST/STM32F1xx/Include/system_stm32f1xx.h \ 11 | Drivers/STM32F1xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h \ 12 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc_ex.h \ 13 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio.h \ 14 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio_ex.h \ 15 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_exti.h \ 16 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma.h \ 17 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma_ex.h \ 18 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_cortex.h \ 19 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash.h \ 20 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash_ex.h \ 21 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h \ 22 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h \ 23 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h 24 | 25 | Core/Inc/gpio.h: 26 | 27 | Core/Inc/main.h: 28 | 29 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal.h: 30 | 31 | Core/Inc/stm32f1xx_hal_conf.h: 32 | 33 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc.h: 34 | 35 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_def.h: 36 | 37 | Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f1xx.h: 38 | 39 | Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f103xb.h: 40 | 41 | Drivers/CMSIS/Include/core_cm3.h: 42 | 43 | Drivers/CMSIS/Include/cmsis_version.h: 44 | 45 | Drivers/CMSIS/Include/cmsis_compiler.h: 46 | 47 | Drivers/CMSIS/Include/cmsis_gcc.h: 48 | 49 | Drivers/CMSIS/Device/ST/STM32F1xx/Include/system_stm32f1xx.h: 50 | 51 | Drivers/STM32F1xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h: 52 | 53 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc_ex.h: 54 | 55 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio.h: 56 | 57 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio_ex.h: 58 | 59 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_exti.h: 60 | 61 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma.h: 62 | 63 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma_ex.h: 64 | 65 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_cortex.h: 66 | 67 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash.h: 68 | 69 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash_ex.h: 70 | 71 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h: 72 | 73 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h: 74 | 75 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h: 76 | -------------------------------------------------------------------------------- /2.Software/Power_X/build/gpio.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheng-inkor/Power_X/35a9ca20c014c2595a8f86b764cd9c75585b9506/2.Software/Power_X/build/gpio.o -------------------------------------------------------------------------------- /2.Software/Power_X/build/ina226.d: -------------------------------------------------------------------------------- 1 | build/ina226.o: Core/Src/ina226.c Core/Inc/ina226.h \ 2 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal.h \ 3 | Core/Inc/stm32f1xx_hal_conf.h \ 4 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc.h \ 5 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_def.h \ 6 | Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f1xx.h \ 7 | Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f103xb.h \ 8 | Drivers/CMSIS/Include/core_cm3.h Drivers/CMSIS/Include/cmsis_version.h \ 9 | Drivers/CMSIS/Include/cmsis_compiler.h Drivers/CMSIS/Include/cmsis_gcc.h \ 10 | Drivers/CMSIS/Device/ST/STM32F1xx/Include/system_stm32f1xx.h \ 11 | Drivers/STM32F1xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h \ 12 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc_ex.h \ 13 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio.h \ 14 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio_ex.h \ 15 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_exti.h \ 16 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma.h \ 17 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma_ex.h \ 18 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_cortex.h \ 19 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash.h \ 20 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash_ex.h \ 21 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h \ 22 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h \ 23 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h 24 | 25 | Core/Inc/ina226.h: 26 | 27 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal.h: 28 | 29 | Core/Inc/stm32f1xx_hal_conf.h: 30 | 31 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc.h: 32 | 33 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_def.h: 34 | 35 | Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f1xx.h: 36 | 37 | Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f103xb.h: 38 | 39 | Drivers/CMSIS/Include/core_cm3.h: 40 | 41 | Drivers/CMSIS/Include/cmsis_version.h: 42 | 43 | Drivers/CMSIS/Include/cmsis_compiler.h: 44 | 45 | Drivers/CMSIS/Include/cmsis_gcc.h: 46 | 47 | Drivers/CMSIS/Device/ST/STM32F1xx/Include/system_stm32f1xx.h: 48 | 49 | Drivers/STM32F1xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h: 50 | 51 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc_ex.h: 52 | 53 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio.h: 54 | 55 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio_ex.h: 56 | 57 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_exti.h: 58 | 59 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma.h: 60 | 61 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma_ex.h: 62 | 63 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_cortex.h: 64 | 65 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash.h: 66 | 67 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash_ex.h: 68 | 69 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h: 70 | 71 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h: 72 | 73 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h: 74 | -------------------------------------------------------------------------------- /2.Software/Power_X/build/ina226.lst: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheng-inkor/Power_X/35a9ca20c014c2595a8f86b764cd9c75585b9506/2.Software/Power_X/build/ina226.lst -------------------------------------------------------------------------------- /2.Software/Power_X/build/ina226.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheng-inkor/Power_X/35a9ca20c014c2595a8f86b764cd9c75585b9506/2.Software/Power_X/build/ina226.o -------------------------------------------------------------------------------- /2.Software/Power_X/build/main.d: -------------------------------------------------------------------------------- 1 | build/main.o: Core/Src/main.c Core/Inc/main.h \ 2 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal.h \ 3 | Core/Inc/stm32f1xx_hal_conf.h \ 4 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc.h \ 5 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_def.h \ 6 | Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f1xx.h \ 7 | Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f103xb.h \ 8 | Drivers/CMSIS/Include/core_cm3.h Drivers/CMSIS/Include/cmsis_version.h \ 9 | Drivers/CMSIS/Include/cmsis_compiler.h Drivers/CMSIS/Include/cmsis_gcc.h \ 10 | Drivers/CMSIS/Device/ST/STM32F1xx/Include/system_stm32f1xx.h \ 11 | Drivers/STM32F1xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h \ 12 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc_ex.h \ 13 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio.h \ 14 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio_ex.h \ 15 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_exti.h \ 16 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma.h \ 17 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma_ex.h \ 18 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_cortex.h \ 19 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash.h \ 20 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash_ex.h \ 21 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h \ 22 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h \ 23 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h Core/Inc/tim.h \ 24 | Core/Inc/main.h Core/Inc/gpio.h 25 | 26 | Core/Inc/main.h: 27 | 28 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal.h: 29 | 30 | Core/Inc/stm32f1xx_hal_conf.h: 31 | 32 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc.h: 33 | 34 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_def.h: 35 | 36 | Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f1xx.h: 37 | 38 | Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f103xb.h: 39 | 40 | Drivers/CMSIS/Include/core_cm3.h: 41 | 42 | Drivers/CMSIS/Include/cmsis_version.h: 43 | 44 | Drivers/CMSIS/Include/cmsis_compiler.h: 45 | 46 | Drivers/CMSIS/Include/cmsis_gcc.h: 47 | 48 | Drivers/CMSIS/Device/ST/STM32F1xx/Include/system_stm32f1xx.h: 49 | 50 | Drivers/STM32F1xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h: 51 | 52 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc_ex.h: 53 | 54 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio.h: 55 | 56 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio_ex.h: 57 | 58 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_exti.h: 59 | 60 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma.h: 61 | 62 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma_ex.h: 63 | 64 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_cortex.h: 65 | 66 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash.h: 67 | 68 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash_ex.h: 69 | 70 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h: 71 | 72 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h: 73 | 74 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h: 75 | 76 | Core/Inc/tim.h: 77 | 78 | Core/Inc/main.h: 79 | 80 | Core/Inc/gpio.h: 81 | -------------------------------------------------------------------------------- /2.Software/Power_X/build/main.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheng-inkor/Power_X/35a9ca20c014c2595a8f86b764cd9c75585b9506/2.Software/Power_X/build/main.o -------------------------------------------------------------------------------- /2.Software/Power_X/build/oled.d: -------------------------------------------------------------------------------- 1 | build/oled.o: Core/Src/oled.c Core/Inc/oled.h \ 2 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal.h \ 3 | Core/Inc/stm32f1xx_hal_conf.h \ 4 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc.h \ 5 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_def.h \ 6 | Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f1xx.h \ 7 | Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f103xb.h \ 8 | Drivers/CMSIS/Include/core_cm3.h Drivers/CMSIS/Include/cmsis_version.h \ 9 | Drivers/CMSIS/Include/cmsis_compiler.h Drivers/CMSIS/Include/cmsis_gcc.h \ 10 | Drivers/CMSIS/Device/ST/STM32F1xx/Include/system_stm32f1xx.h \ 11 | Drivers/STM32F1xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h \ 12 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc_ex.h \ 13 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio.h \ 14 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio_ex.h \ 15 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_exti.h \ 16 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma.h \ 17 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma_ex.h \ 18 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_cortex.h \ 19 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash.h \ 20 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash_ex.h \ 21 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h \ 22 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h \ 23 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h \ 24 | Core/Inc/oledfont.h 25 | 26 | Core/Inc/oled.h: 27 | 28 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal.h: 29 | 30 | Core/Inc/stm32f1xx_hal_conf.h: 31 | 32 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc.h: 33 | 34 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_def.h: 35 | 36 | Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f1xx.h: 37 | 38 | Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f103xb.h: 39 | 40 | Drivers/CMSIS/Include/core_cm3.h: 41 | 42 | Drivers/CMSIS/Include/cmsis_version.h: 43 | 44 | Drivers/CMSIS/Include/cmsis_compiler.h: 45 | 46 | Drivers/CMSIS/Include/cmsis_gcc.h: 47 | 48 | Drivers/CMSIS/Device/ST/STM32F1xx/Include/system_stm32f1xx.h: 49 | 50 | Drivers/STM32F1xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h: 51 | 52 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc_ex.h: 53 | 54 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio.h: 55 | 56 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio_ex.h: 57 | 58 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_exti.h: 59 | 60 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma.h: 61 | 62 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma_ex.h: 63 | 64 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_cortex.h: 65 | 66 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash.h: 67 | 68 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash_ex.h: 69 | 70 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h: 71 | 72 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h: 73 | 74 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h: 75 | 76 | Core/Inc/oledfont.h: 77 | -------------------------------------------------------------------------------- /2.Software/Power_X/build/oled.lst: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheng-inkor/Power_X/35a9ca20c014c2595a8f86b764cd9c75585b9506/2.Software/Power_X/build/oled.lst -------------------------------------------------------------------------------- /2.Software/Power_X/build/oled.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheng-inkor/Power_X/35a9ca20c014c2595a8f86b764cd9c75585b9506/2.Software/Power_X/build/oled.o -------------------------------------------------------------------------------- /2.Software/Power_X/build/startup_stm32f103xb.d: -------------------------------------------------------------------------------- 1 | build/startup_stm32f103xb.o: startup_stm32f103xb.s 2 | -------------------------------------------------------------------------------- /2.Software/Power_X/build/startup_stm32f103xb.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheng-inkor/Power_X/35a9ca20c014c2595a8f86b764cd9c75585b9506/2.Software/Power_X/build/startup_stm32f103xb.o -------------------------------------------------------------------------------- /2.Software/Power_X/build/stm32f1xx_hal.d: -------------------------------------------------------------------------------- 1 | build/stm32f1xx_hal.o: Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal.c \ 2 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal.h \ 3 | Core/Inc/stm32f1xx_hal_conf.h \ 4 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc.h \ 5 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_def.h \ 6 | Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f1xx.h \ 7 | Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f103xb.h \ 8 | Drivers/CMSIS/Include/core_cm3.h Drivers/CMSIS/Include/cmsis_version.h \ 9 | Drivers/CMSIS/Include/cmsis_compiler.h Drivers/CMSIS/Include/cmsis_gcc.h \ 10 | Drivers/CMSIS/Device/ST/STM32F1xx/Include/system_stm32f1xx.h \ 11 | Drivers/STM32F1xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h \ 12 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc_ex.h \ 13 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio.h \ 14 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio_ex.h \ 15 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_exti.h \ 16 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma.h \ 17 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma_ex.h \ 18 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_cortex.h \ 19 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash.h \ 20 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash_ex.h \ 21 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h \ 22 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h \ 23 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h 24 | 25 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal.h: 26 | 27 | Core/Inc/stm32f1xx_hal_conf.h: 28 | 29 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc.h: 30 | 31 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_def.h: 32 | 33 | Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f1xx.h: 34 | 35 | Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f103xb.h: 36 | 37 | Drivers/CMSIS/Include/core_cm3.h: 38 | 39 | Drivers/CMSIS/Include/cmsis_version.h: 40 | 41 | Drivers/CMSIS/Include/cmsis_compiler.h: 42 | 43 | Drivers/CMSIS/Include/cmsis_gcc.h: 44 | 45 | Drivers/CMSIS/Device/ST/STM32F1xx/Include/system_stm32f1xx.h: 46 | 47 | Drivers/STM32F1xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h: 48 | 49 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc_ex.h: 50 | 51 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio.h: 52 | 53 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio_ex.h: 54 | 55 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_exti.h: 56 | 57 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma.h: 58 | 59 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma_ex.h: 60 | 61 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_cortex.h: 62 | 63 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash.h: 64 | 65 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash_ex.h: 66 | 67 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h: 68 | 69 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h: 70 | 71 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h: 72 | -------------------------------------------------------------------------------- /2.Software/Power_X/build/stm32f1xx_hal.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheng-inkor/Power_X/35a9ca20c014c2595a8f86b764cd9c75585b9506/2.Software/Power_X/build/stm32f1xx_hal.o -------------------------------------------------------------------------------- /2.Software/Power_X/build/stm32f1xx_hal_cortex.d: -------------------------------------------------------------------------------- 1 | build/stm32f1xx_hal_cortex.o: \ 2 | Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_cortex.c \ 3 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal.h \ 4 | Core/Inc/stm32f1xx_hal_conf.h \ 5 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc.h \ 6 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_def.h \ 7 | Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f1xx.h \ 8 | Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f103xb.h \ 9 | Drivers/CMSIS/Include/core_cm3.h Drivers/CMSIS/Include/cmsis_version.h \ 10 | Drivers/CMSIS/Include/cmsis_compiler.h Drivers/CMSIS/Include/cmsis_gcc.h \ 11 | Drivers/CMSIS/Device/ST/STM32F1xx/Include/system_stm32f1xx.h \ 12 | Drivers/STM32F1xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h \ 13 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc_ex.h \ 14 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio.h \ 15 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio_ex.h \ 16 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_exti.h \ 17 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma.h \ 18 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma_ex.h \ 19 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_cortex.h \ 20 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash.h \ 21 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash_ex.h \ 22 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h \ 23 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h \ 24 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h 25 | 26 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal.h: 27 | 28 | Core/Inc/stm32f1xx_hal_conf.h: 29 | 30 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc.h: 31 | 32 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_def.h: 33 | 34 | Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f1xx.h: 35 | 36 | Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f103xb.h: 37 | 38 | Drivers/CMSIS/Include/core_cm3.h: 39 | 40 | Drivers/CMSIS/Include/cmsis_version.h: 41 | 42 | Drivers/CMSIS/Include/cmsis_compiler.h: 43 | 44 | Drivers/CMSIS/Include/cmsis_gcc.h: 45 | 46 | Drivers/CMSIS/Device/ST/STM32F1xx/Include/system_stm32f1xx.h: 47 | 48 | Drivers/STM32F1xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h: 49 | 50 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc_ex.h: 51 | 52 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio.h: 53 | 54 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio_ex.h: 55 | 56 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_exti.h: 57 | 58 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma.h: 59 | 60 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma_ex.h: 61 | 62 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_cortex.h: 63 | 64 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash.h: 65 | 66 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash_ex.h: 67 | 68 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h: 69 | 70 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h: 71 | 72 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h: 73 | -------------------------------------------------------------------------------- /2.Software/Power_X/build/stm32f1xx_hal_cortex.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheng-inkor/Power_X/35a9ca20c014c2595a8f86b764cd9c75585b9506/2.Software/Power_X/build/stm32f1xx_hal_cortex.o -------------------------------------------------------------------------------- /2.Software/Power_X/build/stm32f1xx_hal_dma.d: -------------------------------------------------------------------------------- 1 | build/stm32f1xx_hal_dma.o: \ 2 | Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_dma.c \ 3 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal.h \ 4 | Core/Inc/stm32f1xx_hal_conf.h \ 5 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc.h \ 6 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_def.h \ 7 | Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f1xx.h \ 8 | Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f103xb.h \ 9 | Drivers/CMSIS/Include/core_cm3.h Drivers/CMSIS/Include/cmsis_version.h \ 10 | Drivers/CMSIS/Include/cmsis_compiler.h Drivers/CMSIS/Include/cmsis_gcc.h \ 11 | Drivers/CMSIS/Device/ST/STM32F1xx/Include/system_stm32f1xx.h \ 12 | Drivers/STM32F1xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h \ 13 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc_ex.h \ 14 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio.h \ 15 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio_ex.h \ 16 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_exti.h \ 17 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma.h \ 18 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma_ex.h \ 19 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_cortex.h \ 20 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash.h \ 21 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash_ex.h \ 22 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h \ 23 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h \ 24 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h 25 | 26 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal.h: 27 | 28 | Core/Inc/stm32f1xx_hal_conf.h: 29 | 30 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc.h: 31 | 32 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_def.h: 33 | 34 | Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f1xx.h: 35 | 36 | Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f103xb.h: 37 | 38 | Drivers/CMSIS/Include/core_cm3.h: 39 | 40 | Drivers/CMSIS/Include/cmsis_version.h: 41 | 42 | Drivers/CMSIS/Include/cmsis_compiler.h: 43 | 44 | Drivers/CMSIS/Include/cmsis_gcc.h: 45 | 46 | Drivers/CMSIS/Device/ST/STM32F1xx/Include/system_stm32f1xx.h: 47 | 48 | Drivers/STM32F1xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h: 49 | 50 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc_ex.h: 51 | 52 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio.h: 53 | 54 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio_ex.h: 55 | 56 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_exti.h: 57 | 58 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma.h: 59 | 60 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma_ex.h: 61 | 62 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_cortex.h: 63 | 64 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash.h: 65 | 66 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash_ex.h: 67 | 68 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h: 69 | 70 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h: 71 | 72 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h: 73 | -------------------------------------------------------------------------------- /2.Software/Power_X/build/stm32f1xx_hal_dma.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheng-inkor/Power_X/35a9ca20c014c2595a8f86b764cd9c75585b9506/2.Software/Power_X/build/stm32f1xx_hal_dma.o -------------------------------------------------------------------------------- /2.Software/Power_X/build/stm32f1xx_hal_exti.d: -------------------------------------------------------------------------------- 1 | build/stm32f1xx_hal_exti.o: \ 2 | Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_exti.c \ 3 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal.h \ 4 | Core/Inc/stm32f1xx_hal_conf.h \ 5 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc.h \ 6 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_def.h \ 7 | Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f1xx.h \ 8 | Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f103xb.h \ 9 | Drivers/CMSIS/Include/core_cm3.h Drivers/CMSIS/Include/cmsis_version.h \ 10 | Drivers/CMSIS/Include/cmsis_compiler.h Drivers/CMSIS/Include/cmsis_gcc.h \ 11 | Drivers/CMSIS/Device/ST/STM32F1xx/Include/system_stm32f1xx.h \ 12 | Drivers/STM32F1xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h \ 13 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc_ex.h \ 14 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio.h \ 15 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio_ex.h \ 16 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_exti.h \ 17 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma.h \ 18 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma_ex.h \ 19 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_cortex.h \ 20 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash.h \ 21 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash_ex.h \ 22 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h \ 23 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h \ 24 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h 25 | 26 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal.h: 27 | 28 | Core/Inc/stm32f1xx_hal_conf.h: 29 | 30 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc.h: 31 | 32 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_def.h: 33 | 34 | Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f1xx.h: 35 | 36 | Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f103xb.h: 37 | 38 | Drivers/CMSIS/Include/core_cm3.h: 39 | 40 | Drivers/CMSIS/Include/cmsis_version.h: 41 | 42 | Drivers/CMSIS/Include/cmsis_compiler.h: 43 | 44 | Drivers/CMSIS/Include/cmsis_gcc.h: 45 | 46 | Drivers/CMSIS/Device/ST/STM32F1xx/Include/system_stm32f1xx.h: 47 | 48 | Drivers/STM32F1xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h: 49 | 50 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc_ex.h: 51 | 52 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio.h: 53 | 54 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio_ex.h: 55 | 56 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_exti.h: 57 | 58 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma.h: 59 | 60 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma_ex.h: 61 | 62 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_cortex.h: 63 | 64 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash.h: 65 | 66 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash_ex.h: 67 | 68 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h: 69 | 70 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h: 71 | 72 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h: 73 | -------------------------------------------------------------------------------- /2.Software/Power_X/build/stm32f1xx_hal_exti.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheng-inkor/Power_X/35a9ca20c014c2595a8f86b764cd9c75585b9506/2.Software/Power_X/build/stm32f1xx_hal_exti.o -------------------------------------------------------------------------------- /2.Software/Power_X/build/stm32f1xx_hal_flash.d: -------------------------------------------------------------------------------- 1 | build/stm32f1xx_hal_flash.o: \ 2 | Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c \ 3 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal.h \ 4 | Core/Inc/stm32f1xx_hal_conf.h \ 5 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc.h \ 6 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_def.h \ 7 | Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f1xx.h \ 8 | Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f103xb.h \ 9 | Drivers/CMSIS/Include/core_cm3.h Drivers/CMSIS/Include/cmsis_version.h \ 10 | Drivers/CMSIS/Include/cmsis_compiler.h Drivers/CMSIS/Include/cmsis_gcc.h \ 11 | Drivers/CMSIS/Device/ST/STM32F1xx/Include/system_stm32f1xx.h \ 12 | Drivers/STM32F1xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h \ 13 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc_ex.h \ 14 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio.h \ 15 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio_ex.h \ 16 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_exti.h \ 17 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma.h \ 18 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma_ex.h \ 19 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_cortex.h \ 20 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash.h \ 21 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash_ex.h \ 22 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h \ 23 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h \ 24 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h 25 | 26 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal.h: 27 | 28 | Core/Inc/stm32f1xx_hal_conf.h: 29 | 30 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc.h: 31 | 32 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_def.h: 33 | 34 | Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f1xx.h: 35 | 36 | Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f103xb.h: 37 | 38 | Drivers/CMSIS/Include/core_cm3.h: 39 | 40 | Drivers/CMSIS/Include/cmsis_version.h: 41 | 42 | Drivers/CMSIS/Include/cmsis_compiler.h: 43 | 44 | Drivers/CMSIS/Include/cmsis_gcc.h: 45 | 46 | Drivers/CMSIS/Device/ST/STM32F1xx/Include/system_stm32f1xx.h: 47 | 48 | Drivers/STM32F1xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h: 49 | 50 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc_ex.h: 51 | 52 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio.h: 53 | 54 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio_ex.h: 55 | 56 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_exti.h: 57 | 58 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma.h: 59 | 60 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma_ex.h: 61 | 62 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_cortex.h: 63 | 64 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash.h: 65 | 66 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash_ex.h: 67 | 68 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h: 69 | 70 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h: 71 | 72 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h: 73 | -------------------------------------------------------------------------------- /2.Software/Power_X/build/stm32f1xx_hal_flash.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheng-inkor/Power_X/35a9ca20c014c2595a8f86b764cd9c75585b9506/2.Software/Power_X/build/stm32f1xx_hal_flash.o -------------------------------------------------------------------------------- /2.Software/Power_X/build/stm32f1xx_hal_flash_ex.d: -------------------------------------------------------------------------------- 1 | build/stm32f1xx_hal_flash_ex.o: \ 2 | Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash_ex.c \ 3 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal.h \ 4 | Core/Inc/stm32f1xx_hal_conf.h \ 5 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc.h \ 6 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_def.h \ 7 | Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f1xx.h \ 8 | Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f103xb.h \ 9 | Drivers/CMSIS/Include/core_cm3.h Drivers/CMSIS/Include/cmsis_version.h \ 10 | Drivers/CMSIS/Include/cmsis_compiler.h Drivers/CMSIS/Include/cmsis_gcc.h \ 11 | Drivers/CMSIS/Device/ST/STM32F1xx/Include/system_stm32f1xx.h \ 12 | Drivers/STM32F1xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h \ 13 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc_ex.h \ 14 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio.h \ 15 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio_ex.h \ 16 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_exti.h \ 17 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma.h \ 18 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma_ex.h \ 19 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_cortex.h \ 20 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash.h \ 21 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash_ex.h \ 22 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h \ 23 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h \ 24 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h 25 | 26 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal.h: 27 | 28 | Core/Inc/stm32f1xx_hal_conf.h: 29 | 30 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc.h: 31 | 32 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_def.h: 33 | 34 | Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f1xx.h: 35 | 36 | Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f103xb.h: 37 | 38 | Drivers/CMSIS/Include/core_cm3.h: 39 | 40 | Drivers/CMSIS/Include/cmsis_version.h: 41 | 42 | Drivers/CMSIS/Include/cmsis_compiler.h: 43 | 44 | Drivers/CMSIS/Include/cmsis_gcc.h: 45 | 46 | Drivers/CMSIS/Device/ST/STM32F1xx/Include/system_stm32f1xx.h: 47 | 48 | Drivers/STM32F1xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h: 49 | 50 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc_ex.h: 51 | 52 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio.h: 53 | 54 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio_ex.h: 55 | 56 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_exti.h: 57 | 58 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma.h: 59 | 60 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma_ex.h: 61 | 62 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_cortex.h: 63 | 64 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash.h: 65 | 66 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash_ex.h: 67 | 68 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h: 69 | 70 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h: 71 | 72 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h: 73 | -------------------------------------------------------------------------------- /2.Software/Power_X/build/stm32f1xx_hal_flash_ex.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheng-inkor/Power_X/35a9ca20c014c2595a8f86b764cd9c75585b9506/2.Software/Power_X/build/stm32f1xx_hal_flash_ex.o -------------------------------------------------------------------------------- /2.Software/Power_X/build/stm32f1xx_hal_gpio.d: -------------------------------------------------------------------------------- 1 | build/stm32f1xx_hal_gpio.o: \ 2 | Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_gpio.c \ 3 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal.h \ 4 | Core/Inc/stm32f1xx_hal_conf.h \ 5 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc.h \ 6 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_def.h \ 7 | Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f1xx.h \ 8 | Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f103xb.h \ 9 | Drivers/CMSIS/Include/core_cm3.h Drivers/CMSIS/Include/cmsis_version.h \ 10 | Drivers/CMSIS/Include/cmsis_compiler.h Drivers/CMSIS/Include/cmsis_gcc.h \ 11 | Drivers/CMSIS/Device/ST/STM32F1xx/Include/system_stm32f1xx.h \ 12 | Drivers/STM32F1xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h \ 13 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc_ex.h \ 14 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio.h \ 15 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio_ex.h \ 16 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_exti.h \ 17 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma.h \ 18 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma_ex.h \ 19 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_cortex.h \ 20 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash.h \ 21 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash_ex.h \ 22 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h \ 23 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h \ 24 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h 25 | 26 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal.h: 27 | 28 | Core/Inc/stm32f1xx_hal_conf.h: 29 | 30 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc.h: 31 | 32 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_def.h: 33 | 34 | Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f1xx.h: 35 | 36 | Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f103xb.h: 37 | 38 | Drivers/CMSIS/Include/core_cm3.h: 39 | 40 | Drivers/CMSIS/Include/cmsis_version.h: 41 | 42 | Drivers/CMSIS/Include/cmsis_compiler.h: 43 | 44 | Drivers/CMSIS/Include/cmsis_gcc.h: 45 | 46 | Drivers/CMSIS/Device/ST/STM32F1xx/Include/system_stm32f1xx.h: 47 | 48 | Drivers/STM32F1xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h: 49 | 50 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc_ex.h: 51 | 52 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio.h: 53 | 54 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio_ex.h: 55 | 56 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_exti.h: 57 | 58 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma.h: 59 | 60 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma_ex.h: 61 | 62 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_cortex.h: 63 | 64 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash.h: 65 | 66 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash_ex.h: 67 | 68 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h: 69 | 70 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h: 71 | 72 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h: 73 | -------------------------------------------------------------------------------- /2.Software/Power_X/build/stm32f1xx_hal_gpio.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheng-inkor/Power_X/35a9ca20c014c2595a8f86b764cd9c75585b9506/2.Software/Power_X/build/stm32f1xx_hal_gpio.o -------------------------------------------------------------------------------- /2.Software/Power_X/build/stm32f1xx_hal_gpio_ex.d: -------------------------------------------------------------------------------- 1 | build/stm32f1xx_hal_gpio_ex.o: \ 2 | Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_gpio_ex.c \ 3 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal.h \ 4 | Core/Inc/stm32f1xx_hal_conf.h \ 5 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc.h \ 6 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_def.h \ 7 | Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f1xx.h \ 8 | Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f103xb.h \ 9 | Drivers/CMSIS/Include/core_cm3.h Drivers/CMSIS/Include/cmsis_version.h \ 10 | Drivers/CMSIS/Include/cmsis_compiler.h Drivers/CMSIS/Include/cmsis_gcc.h \ 11 | Drivers/CMSIS/Device/ST/STM32F1xx/Include/system_stm32f1xx.h \ 12 | Drivers/STM32F1xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h \ 13 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc_ex.h \ 14 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio.h \ 15 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio_ex.h \ 16 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_exti.h \ 17 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma.h \ 18 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma_ex.h \ 19 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_cortex.h \ 20 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash.h \ 21 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash_ex.h \ 22 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h \ 23 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h \ 24 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h 25 | 26 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal.h: 27 | 28 | Core/Inc/stm32f1xx_hal_conf.h: 29 | 30 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc.h: 31 | 32 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_def.h: 33 | 34 | Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f1xx.h: 35 | 36 | Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f103xb.h: 37 | 38 | Drivers/CMSIS/Include/core_cm3.h: 39 | 40 | Drivers/CMSIS/Include/cmsis_version.h: 41 | 42 | Drivers/CMSIS/Include/cmsis_compiler.h: 43 | 44 | Drivers/CMSIS/Include/cmsis_gcc.h: 45 | 46 | Drivers/CMSIS/Device/ST/STM32F1xx/Include/system_stm32f1xx.h: 47 | 48 | Drivers/STM32F1xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h: 49 | 50 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc_ex.h: 51 | 52 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio.h: 53 | 54 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio_ex.h: 55 | 56 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_exti.h: 57 | 58 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma.h: 59 | 60 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma_ex.h: 61 | 62 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_cortex.h: 63 | 64 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash.h: 65 | 66 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash_ex.h: 67 | 68 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h: 69 | 70 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h: 71 | 72 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h: 73 | -------------------------------------------------------------------------------- /2.Software/Power_X/build/stm32f1xx_hal_gpio_ex.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheng-inkor/Power_X/35a9ca20c014c2595a8f86b764cd9c75585b9506/2.Software/Power_X/build/stm32f1xx_hal_gpio_ex.o -------------------------------------------------------------------------------- /2.Software/Power_X/build/stm32f1xx_hal_msp.d: -------------------------------------------------------------------------------- 1 | build/stm32f1xx_hal_msp.o: Core/Src/stm32f1xx_hal_msp.c Core/Inc/main.h \ 2 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal.h \ 3 | Core/Inc/stm32f1xx_hal_conf.h \ 4 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc.h \ 5 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_def.h \ 6 | Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f1xx.h \ 7 | Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f103xb.h \ 8 | Drivers/CMSIS/Include/core_cm3.h Drivers/CMSIS/Include/cmsis_version.h \ 9 | Drivers/CMSIS/Include/cmsis_compiler.h Drivers/CMSIS/Include/cmsis_gcc.h \ 10 | Drivers/CMSIS/Device/ST/STM32F1xx/Include/system_stm32f1xx.h \ 11 | Drivers/STM32F1xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h \ 12 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc_ex.h \ 13 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio.h \ 14 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio_ex.h \ 15 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_exti.h \ 16 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma.h \ 17 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma_ex.h \ 18 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_cortex.h \ 19 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash.h \ 20 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash_ex.h \ 21 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h \ 22 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h \ 23 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h 24 | 25 | Core/Inc/main.h: 26 | 27 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal.h: 28 | 29 | Core/Inc/stm32f1xx_hal_conf.h: 30 | 31 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc.h: 32 | 33 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_def.h: 34 | 35 | Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f1xx.h: 36 | 37 | Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f103xb.h: 38 | 39 | Drivers/CMSIS/Include/core_cm3.h: 40 | 41 | Drivers/CMSIS/Include/cmsis_version.h: 42 | 43 | Drivers/CMSIS/Include/cmsis_compiler.h: 44 | 45 | Drivers/CMSIS/Include/cmsis_gcc.h: 46 | 47 | Drivers/CMSIS/Device/ST/STM32F1xx/Include/system_stm32f1xx.h: 48 | 49 | Drivers/STM32F1xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h: 50 | 51 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc_ex.h: 52 | 53 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio.h: 54 | 55 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio_ex.h: 56 | 57 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_exti.h: 58 | 59 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma.h: 60 | 61 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma_ex.h: 62 | 63 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_cortex.h: 64 | 65 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash.h: 66 | 67 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash_ex.h: 68 | 69 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h: 70 | 71 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h: 72 | 73 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h: 74 | -------------------------------------------------------------------------------- /2.Software/Power_X/build/stm32f1xx_hal_msp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheng-inkor/Power_X/35a9ca20c014c2595a8f86b764cd9c75585b9506/2.Software/Power_X/build/stm32f1xx_hal_msp.o -------------------------------------------------------------------------------- /2.Software/Power_X/build/stm32f1xx_hal_pwr.d: -------------------------------------------------------------------------------- 1 | build/stm32f1xx_hal_pwr.o: \ 2 | Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_pwr.c \ 3 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal.h \ 4 | Core/Inc/stm32f1xx_hal_conf.h \ 5 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc.h \ 6 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_def.h \ 7 | Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f1xx.h \ 8 | Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f103xb.h \ 9 | Drivers/CMSIS/Include/core_cm3.h Drivers/CMSIS/Include/cmsis_version.h \ 10 | Drivers/CMSIS/Include/cmsis_compiler.h Drivers/CMSIS/Include/cmsis_gcc.h \ 11 | Drivers/CMSIS/Device/ST/STM32F1xx/Include/system_stm32f1xx.h \ 12 | Drivers/STM32F1xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h \ 13 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc_ex.h \ 14 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio.h \ 15 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio_ex.h \ 16 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_exti.h \ 17 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma.h \ 18 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma_ex.h \ 19 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_cortex.h \ 20 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash.h \ 21 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash_ex.h \ 22 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h \ 23 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h \ 24 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h 25 | 26 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal.h: 27 | 28 | Core/Inc/stm32f1xx_hal_conf.h: 29 | 30 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc.h: 31 | 32 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_def.h: 33 | 34 | Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f1xx.h: 35 | 36 | Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f103xb.h: 37 | 38 | Drivers/CMSIS/Include/core_cm3.h: 39 | 40 | Drivers/CMSIS/Include/cmsis_version.h: 41 | 42 | Drivers/CMSIS/Include/cmsis_compiler.h: 43 | 44 | Drivers/CMSIS/Include/cmsis_gcc.h: 45 | 46 | Drivers/CMSIS/Device/ST/STM32F1xx/Include/system_stm32f1xx.h: 47 | 48 | Drivers/STM32F1xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h: 49 | 50 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc_ex.h: 51 | 52 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio.h: 53 | 54 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio_ex.h: 55 | 56 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_exti.h: 57 | 58 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma.h: 59 | 60 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma_ex.h: 61 | 62 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_cortex.h: 63 | 64 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash.h: 65 | 66 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash_ex.h: 67 | 68 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h: 69 | 70 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h: 71 | 72 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h: 73 | -------------------------------------------------------------------------------- /2.Software/Power_X/build/stm32f1xx_hal_pwr.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheng-inkor/Power_X/35a9ca20c014c2595a8f86b764cd9c75585b9506/2.Software/Power_X/build/stm32f1xx_hal_pwr.o -------------------------------------------------------------------------------- /2.Software/Power_X/build/stm32f1xx_hal_rcc.d: -------------------------------------------------------------------------------- 1 | build/stm32f1xx_hal_rcc.o: \ 2 | Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rcc.c \ 3 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal.h \ 4 | Core/Inc/stm32f1xx_hal_conf.h \ 5 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc.h \ 6 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_def.h \ 7 | Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f1xx.h \ 8 | Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f103xb.h \ 9 | Drivers/CMSIS/Include/core_cm3.h Drivers/CMSIS/Include/cmsis_version.h \ 10 | Drivers/CMSIS/Include/cmsis_compiler.h Drivers/CMSIS/Include/cmsis_gcc.h \ 11 | Drivers/CMSIS/Device/ST/STM32F1xx/Include/system_stm32f1xx.h \ 12 | Drivers/STM32F1xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h \ 13 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc_ex.h \ 14 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio.h \ 15 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio_ex.h \ 16 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_exti.h \ 17 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma.h \ 18 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma_ex.h \ 19 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_cortex.h \ 20 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash.h \ 21 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash_ex.h \ 22 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h \ 23 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h \ 24 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h 25 | 26 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal.h: 27 | 28 | Core/Inc/stm32f1xx_hal_conf.h: 29 | 30 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc.h: 31 | 32 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_def.h: 33 | 34 | Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f1xx.h: 35 | 36 | Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f103xb.h: 37 | 38 | Drivers/CMSIS/Include/core_cm3.h: 39 | 40 | Drivers/CMSIS/Include/cmsis_version.h: 41 | 42 | Drivers/CMSIS/Include/cmsis_compiler.h: 43 | 44 | Drivers/CMSIS/Include/cmsis_gcc.h: 45 | 46 | Drivers/CMSIS/Device/ST/STM32F1xx/Include/system_stm32f1xx.h: 47 | 48 | Drivers/STM32F1xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h: 49 | 50 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc_ex.h: 51 | 52 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio.h: 53 | 54 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio_ex.h: 55 | 56 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_exti.h: 57 | 58 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma.h: 59 | 60 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma_ex.h: 61 | 62 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_cortex.h: 63 | 64 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash.h: 65 | 66 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash_ex.h: 67 | 68 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h: 69 | 70 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h: 71 | 72 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h: 73 | -------------------------------------------------------------------------------- /2.Software/Power_X/build/stm32f1xx_hal_rcc.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheng-inkor/Power_X/35a9ca20c014c2595a8f86b764cd9c75585b9506/2.Software/Power_X/build/stm32f1xx_hal_rcc.o -------------------------------------------------------------------------------- /2.Software/Power_X/build/stm32f1xx_hal_rcc_ex.d: -------------------------------------------------------------------------------- 1 | build/stm32f1xx_hal_rcc_ex.o: \ 2 | Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rcc_ex.c \ 3 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal.h \ 4 | Core/Inc/stm32f1xx_hal_conf.h \ 5 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc.h \ 6 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_def.h \ 7 | Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f1xx.h \ 8 | Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f103xb.h \ 9 | Drivers/CMSIS/Include/core_cm3.h Drivers/CMSIS/Include/cmsis_version.h \ 10 | Drivers/CMSIS/Include/cmsis_compiler.h Drivers/CMSIS/Include/cmsis_gcc.h \ 11 | Drivers/CMSIS/Device/ST/STM32F1xx/Include/system_stm32f1xx.h \ 12 | Drivers/STM32F1xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h \ 13 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc_ex.h \ 14 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio.h \ 15 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio_ex.h \ 16 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_exti.h \ 17 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma.h \ 18 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma_ex.h \ 19 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_cortex.h \ 20 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash.h \ 21 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash_ex.h \ 22 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h \ 23 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h \ 24 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h 25 | 26 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal.h: 27 | 28 | Core/Inc/stm32f1xx_hal_conf.h: 29 | 30 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc.h: 31 | 32 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_def.h: 33 | 34 | Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f1xx.h: 35 | 36 | Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f103xb.h: 37 | 38 | Drivers/CMSIS/Include/core_cm3.h: 39 | 40 | Drivers/CMSIS/Include/cmsis_version.h: 41 | 42 | Drivers/CMSIS/Include/cmsis_compiler.h: 43 | 44 | Drivers/CMSIS/Include/cmsis_gcc.h: 45 | 46 | Drivers/CMSIS/Device/ST/STM32F1xx/Include/system_stm32f1xx.h: 47 | 48 | Drivers/STM32F1xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h: 49 | 50 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc_ex.h: 51 | 52 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio.h: 53 | 54 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio_ex.h: 55 | 56 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_exti.h: 57 | 58 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma.h: 59 | 60 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma_ex.h: 61 | 62 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_cortex.h: 63 | 64 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash.h: 65 | 66 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash_ex.h: 67 | 68 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h: 69 | 70 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h: 71 | 72 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h: 73 | -------------------------------------------------------------------------------- /2.Software/Power_X/build/stm32f1xx_hal_rcc_ex.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheng-inkor/Power_X/35a9ca20c014c2595a8f86b764cd9c75585b9506/2.Software/Power_X/build/stm32f1xx_hal_rcc_ex.o -------------------------------------------------------------------------------- /2.Software/Power_X/build/stm32f1xx_hal_tim.d: -------------------------------------------------------------------------------- 1 | build/stm32f1xx_hal_tim.o: \ 2 | Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.c \ 3 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal.h \ 4 | Core/Inc/stm32f1xx_hal_conf.h \ 5 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc.h \ 6 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_def.h \ 7 | Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f1xx.h \ 8 | Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f103xb.h \ 9 | Drivers/CMSIS/Include/core_cm3.h Drivers/CMSIS/Include/cmsis_version.h \ 10 | Drivers/CMSIS/Include/cmsis_compiler.h Drivers/CMSIS/Include/cmsis_gcc.h \ 11 | Drivers/CMSIS/Device/ST/STM32F1xx/Include/system_stm32f1xx.h \ 12 | Drivers/STM32F1xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h \ 13 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc_ex.h \ 14 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio.h \ 15 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio_ex.h \ 16 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_exti.h \ 17 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma.h \ 18 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma_ex.h \ 19 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_cortex.h \ 20 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash.h \ 21 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash_ex.h \ 22 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h \ 23 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h \ 24 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h 25 | 26 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal.h: 27 | 28 | Core/Inc/stm32f1xx_hal_conf.h: 29 | 30 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc.h: 31 | 32 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_def.h: 33 | 34 | Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f1xx.h: 35 | 36 | Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f103xb.h: 37 | 38 | Drivers/CMSIS/Include/core_cm3.h: 39 | 40 | Drivers/CMSIS/Include/cmsis_version.h: 41 | 42 | Drivers/CMSIS/Include/cmsis_compiler.h: 43 | 44 | Drivers/CMSIS/Include/cmsis_gcc.h: 45 | 46 | Drivers/CMSIS/Device/ST/STM32F1xx/Include/system_stm32f1xx.h: 47 | 48 | Drivers/STM32F1xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h: 49 | 50 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc_ex.h: 51 | 52 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio.h: 53 | 54 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio_ex.h: 55 | 56 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_exti.h: 57 | 58 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma.h: 59 | 60 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma_ex.h: 61 | 62 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_cortex.h: 63 | 64 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash.h: 65 | 66 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash_ex.h: 67 | 68 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h: 69 | 70 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h: 71 | 72 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h: 73 | -------------------------------------------------------------------------------- /2.Software/Power_X/build/stm32f1xx_hal_tim.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheng-inkor/Power_X/35a9ca20c014c2595a8f86b764cd9c75585b9506/2.Software/Power_X/build/stm32f1xx_hal_tim.o -------------------------------------------------------------------------------- /2.Software/Power_X/build/stm32f1xx_hal_tim_ex.d: -------------------------------------------------------------------------------- 1 | build/stm32f1xx_hal_tim_ex.o: \ 2 | Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim_ex.c \ 3 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal.h \ 4 | Core/Inc/stm32f1xx_hal_conf.h \ 5 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc.h \ 6 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_def.h \ 7 | Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f1xx.h \ 8 | Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f103xb.h \ 9 | Drivers/CMSIS/Include/core_cm3.h Drivers/CMSIS/Include/cmsis_version.h \ 10 | Drivers/CMSIS/Include/cmsis_compiler.h Drivers/CMSIS/Include/cmsis_gcc.h \ 11 | Drivers/CMSIS/Device/ST/STM32F1xx/Include/system_stm32f1xx.h \ 12 | Drivers/STM32F1xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h \ 13 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc_ex.h \ 14 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio.h \ 15 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio_ex.h \ 16 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_exti.h \ 17 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma.h \ 18 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma_ex.h \ 19 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_cortex.h \ 20 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash.h \ 21 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash_ex.h \ 22 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h \ 23 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h \ 24 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h 25 | 26 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal.h: 27 | 28 | Core/Inc/stm32f1xx_hal_conf.h: 29 | 30 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc.h: 31 | 32 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_def.h: 33 | 34 | Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f1xx.h: 35 | 36 | Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f103xb.h: 37 | 38 | Drivers/CMSIS/Include/core_cm3.h: 39 | 40 | Drivers/CMSIS/Include/cmsis_version.h: 41 | 42 | Drivers/CMSIS/Include/cmsis_compiler.h: 43 | 44 | Drivers/CMSIS/Include/cmsis_gcc.h: 45 | 46 | Drivers/CMSIS/Device/ST/STM32F1xx/Include/system_stm32f1xx.h: 47 | 48 | Drivers/STM32F1xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h: 49 | 50 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc_ex.h: 51 | 52 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio.h: 53 | 54 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio_ex.h: 55 | 56 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_exti.h: 57 | 58 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma.h: 59 | 60 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma_ex.h: 61 | 62 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_cortex.h: 63 | 64 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash.h: 65 | 66 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash_ex.h: 67 | 68 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h: 69 | 70 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h: 71 | 72 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h: 73 | -------------------------------------------------------------------------------- /2.Software/Power_X/build/stm32f1xx_hal_tim_ex.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheng-inkor/Power_X/35a9ca20c014c2595a8f86b764cd9c75585b9506/2.Software/Power_X/build/stm32f1xx_hal_tim_ex.o -------------------------------------------------------------------------------- /2.Software/Power_X/build/stm32f1xx_it.d: -------------------------------------------------------------------------------- 1 | build/stm32f1xx_it.o: Core/Src/stm32f1xx_it.c Core/Inc/main.h \ 2 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal.h \ 3 | Core/Inc/stm32f1xx_hal_conf.h \ 4 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc.h \ 5 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_def.h \ 6 | Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f1xx.h \ 7 | Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f103xb.h \ 8 | Drivers/CMSIS/Include/core_cm3.h Drivers/CMSIS/Include/cmsis_version.h \ 9 | Drivers/CMSIS/Include/cmsis_compiler.h Drivers/CMSIS/Include/cmsis_gcc.h \ 10 | Drivers/CMSIS/Device/ST/STM32F1xx/Include/system_stm32f1xx.h \ 11 | Drivers/STM32F1xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h \ 12 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc_ex.h \ 13 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio.h \ 14 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio_ex.h \ 15 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_exti.h \ 16 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma.h \ 17 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma_ex.h \ 18 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_cortex.h \ 19 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash.h \ 20 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash_ex.h \ 21 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h \ 22 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h \ 23 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h \ 24 | Core/Inc/stm32f1xx_it.h 25 | 26 | Core/Inc/main.h: 27 | 28 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal.h: 29 | 30 | Core/Inc/stm32f1xx_hal_conf.h: 31 | 32 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc.h: 33 | 34 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_def.h: 35 | 36 | Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f1xx.h: 37 | 38 | Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f103xb.h: 39 | 40 | Drivers/CMSIS/Include/core_cm3.h: 41 | 42 | Drivers/CMSIS/Include/cmsis_version.h: 43 | 44 | Drivers/CMSIS/Include/cmsis_compiler.h: 45 | 46 | Drivers/CMSIS/Include/cmsis_gcc.h: 47 | 48 | Drivers/CMSIS/Device/ST/STM32F1xx/Include/system_stm32f1xx.h: 49 | 50 | Drivers/STM32F1xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h: 51 | 52 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc_ex.h: 53 | 54 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio.h: 55 | 56 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio_ex.h: 57 | 58 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_exti.h: 59 | 60 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma.h: 61 | 62 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma_ex.h: 63 | 64 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_cortex.h: 65 | 66 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash.h: 67 | 68 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash_ex.h: 69 | 70 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h: 71 | 72 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h: 73 | 74 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h: 75 | 76 | Core/Inc/stm32f1xx_it.h: 77 | -------------------------------------------------------------------------------- /2.Software/Power_X/build/stm32f1xx_it.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheng-inkor/Power_X/35a9ca20c014c2595a8f86b764cd9c75585b9506/2.Software/Power_X/build/stm32f1xx_it.o -------------------------------------------------------------------------------- /2.Software/Power_X/build/system_stm32f1xx.d: -------------------------------------------------------------------------------- 1 | build/system_stm32f1xx.o: Core/Src/system_stm32f1xx.c \ 2 | Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f1xx.h \ 3 | Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f103xb.h \ 4 | Drivers/CMSIS/Include/core_cm3.h Drivers/CMSIS/Include/cmsis_version.h \ 5 | Drivers/CMSIS/Include/cmsis_compiler.h Drivers/CMSIS/Include/cmsis_gcc.h \ 6 | Drivers/CMSIS/Device/ST/STM32F1xx/Include/system_stm32f1xx.h \ 7 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal.h \ 8 | Core/Inc/stm32f1xx_hal_conf.h \ 9 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc.h \ 10 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_def.h \ 11 | Drivers/STM32F1xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h \ 12 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc_ex.h \ 13 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio.h \ 14 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio_ex.h \ 15 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_exti.h \ 16 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma.h \ 17 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma_ex.h \ 18 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_cortex.h \ 19 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash.h \ 20 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash_ex.h \ 21 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h \ 22 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h \ 23 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h 24 | 25 | Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f1xx.h: 26 | 27 | Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f103xb.h: 28 | 29 | Drivers/CMSIS/Include/core_cm3.h: 30 | 31 | Drivers/CMSIS/Include/cmsis_version.h: 32 | 33 | Drivers/CMSIS/Include/cmsis_compiler.h: 34 | 35 | Drivers/CMSIS/Include/cmsis_gcc.h: 36 | 37 | Drivers/CMSIS/Device/ST/STM32F1xx/Include/system_stm32f1xx.h: 38 | 39 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal.h: 40 | 41 | Core/Inc/stm32f1xx_hal_conf.h: 42 | 43 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc.h: 44 | 45 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_def.h: 46 | 47 | Drivers/STM32F1xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h: 48 | 49 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc_ex.h: 50 | 51 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio.h: 52 | 53 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio_ex.h: 54 | 55 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_exti.h: 56 | 57 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma.h: 58 | 59 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma_ex.h: 60 | 61 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_cortex.h: 62 | 63 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash.h: 64 | 65 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash_ex.h: 66 | 67 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h: 68 | 69 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h: 70 | 71 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h: 72 | -------------------------------------------------------------------------------- /2.Software/Power_X/build/system_stm32f1xx.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheng-inkor/Power_X/35a9ca20c014c2595a8f86b764cd9c75585b9506/2.Software/Power_X/build/system_stm32f1xx.o -------------------------------------------------------------------------------- /2.Software/Power_X/build/tim.d: -------------------------------------------------------------------------------- 1 | build/tim.o: Core/Src/tim.c Core/Inc/tim.h Core/Inc/main.h \ 2 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal.h \ 3 | Core/Inc/stm32f1xx_hal_conf.h \ 4 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc.h \ 5 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_def.h \ 6 | Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f1xx.h \ 7 | Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f103xb.h \ 8 | Drivers/CMSIS/Include/core_cm3.h Drivers/CMSIS/Include/cmsis_version.h \ 9 | Drivers/CMSIS/Include/cmsis_compiler.h Drivers/CMSIS/Include/cmsis_gcc.h \ 10 | Drivers/CMSIS/Device/ST/STM32F1xx/Include/system_stm32f1xx.h \ 11 | Drivers/STM32F1xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h \ 12 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc_ex.h \ 13 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio.h \ 14 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio_ex.h \ 15 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_exti.h \ 16 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma.h \ 17 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma_ex.h \ 18 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_cortex.h \ 19 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash.h \ 20 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash_ex.h \ 21 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h \ 22 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h \ 23 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h Core/Inc/bmp.h \ 24 | Core/Inc/oled.h Core/Inc/ina226.h 25 | 26 | Core/Inc/tim.h: 27 | 28 | Core/Inc/main.h: 29 | 30 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal.h: 31 | 32 | Core/Inc/stm32f1xx_hal_conf.h: 33 | 34 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc.h: 35 | 36 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_def.h: 37 | 38 | Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f1xx.h: 39 | 40 | Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f103xb.h: 41 | 42 | Drivers/CMSIS/Include/core_cm3.h: 43 | 44 | Drivers/CMSIS/Include/cmsis_version.h: 45 | 46 | Drivers/CMSIS/Include/cmsis_compiler.h: 47 | 48 | Drivers/CMSIS/Include/cmsis_gcc.h: 49 | 50 | Drivers/CMSIS/Device/ST/STM32F1xx/Include/system_stm32f1xx.h: 51 | 52 | Drivers/STM32F1xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h: 53 | 54 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc_ex.h: 55 | 56 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio.h: 57 | 58 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio_ex.h: 59 | 60 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_exti.h: 61 | 62 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma.h: 63 | 64 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma_ex.h: 65 | 66 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_cortex.h: 67 | 68 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash.h: 69 | 70 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash_ex.h: 71 | 72 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h: 73 | 74 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h: 75 | 76 | Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h: 77 | 78 | Core/Inc/bmp.h: 79 | 80 | Core/Inc/oled.h: 81 | 82 | Core/Inc/ina226.h: 83 | -------------------------------------------------------------------------------- /2.Software/Power_X/build/tim.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheng-inkor/Power_X/35a9ca20c014c2595a8f86b764cd9c75585b9506/2.Software/Power_X/build/tim.o -------------------------------------------------------------------------------- /2.Software/Power_X/startup_stm32f103xb.s: -------------------------------------------------------------------------------- 1 | /** 2 | *************** (C) COPYRIGHT 2017 STMicroelectronics ************************ 3 | * @file startup_stm32f103xb.s 4 | * @author MCD Application Team 5 | * @brief STM32F103xB Devices vector table for Atollic toolchain. 6 | * This module performs: 7 | * - Set the initial SP 8 | * - Set the initial PC == Reset_Handler, 9 | * - Set the vector table entries with the exceptions ISR address 10 | * - Configure the clock system 11 | * - Branches to main in the C library (which eventually 12 | * calls main()). 13 | * After Reset the Cortex-M3 processor is in Thread mode, 14 | * priority is Privileged, and the Stack is set to Main. 15 | ****************************************************************************** 16 | * @attention 17 | * 18 | *

© Copyright (c) 2017 STMicroelectronics. 19 | * All rights reserved.

20 | * 21 | * This software component is licensed by ST under BSD 3-Clause license, 22 | * the "License"; You may not use this file except in compliance with the 23 | * License. You may obtain a copy of the License at: 24 | * opensource.org/licenses/BSD-3-Clause 25 | * 26 | ****************************************************************************** 27 | */ 28 | 29 | .syntax unified 30 | .cpu cortex-m3 31 | .fpu softvfp 32 | .thumb 33 | 34 | .global g_pfnVectors 35 | .global Default_Handler 36 | 37 | /* start address for the initialization values of the .data section. 38 | defined in linker script */ 39 | .word _sidata 40 | /* start address for the .data section. defined in linker script */ 41 | .word _sdata 42 | /* end address for the .data section. defined in linker script */ 43 | .word _edata 44 | /* start address for the .bss section. defined in linker script */ 45 | .word _sbss 46 | /* end address for the .bss section. defined in linker script */ 47 | .word _ebss 48 | 49 | .equ BootRAM, 0xF108F85F 50 | /** 51 | * @brief This is the code that gets called when the processor first 52 | * starts execution following a reset event. Only the absolutely 53 | * necessary set is performed, after which the application 54 | * supplied main() routine is called. 55 | * @param None 56 | * @retval : None 57 | */ 58 | 59 | .section .text.Reset_Handler 60 | .weak Reset_Handler 61 | .type Reset_Handler, %function 62 | Reset_Handler: 63 | 64 | /* Copy the data segment initializers from flash to SRAM */ 65 | movs r1, #0 66 | b LoopCopyDataInit 67 | 68 | CopyDataInit: 69 | ldr r3, =_sidata 70 | ldr r3, [r3, r1] 71 | str r3, [r0, r1] 72 | adds r1, r1, #4 73 | 74 | LoopCopyDataInit: 75 | ldr r0, =_sdata 76 | ldr r3, =_edata 77 | adds r2, r0, r1 78 | cmp r2, r3 79 | bcc CopyDataInit 80 | ldr r2, =_sbss 81 | b LoopFillZerobss 82 | /* Zero fill the bss segment. */ 83 | FillZerobss: 84 | movs r3, #0 85 | str r3, [r2], #4 86 | 87 | LoopFillZerobss: 88 | ldr r3, = _ebss 89 | cmp r2, r3 90 | bcc FillZerobss 91 | 92 | /* Call the clock system intitialization function.*/ 93 | bl SystemInit 94 | /* Call static constructors */ 95 | bl __libc_init_array 96 | /* Call the application's entry point.*/ 97 | bl main 98 | bx lr 99 | .size Reset_Handler, .-Reset_Handler 100 | 101 | /** 102 | * @brief This is the code that gets called when the processor receives an 103 | * unexpected interrupt. This simply enters an infinite loop, preserving 104 | * the system state for examination by a debugger. 105 | * 106 | * @param None 107 | * @retval : None 108 | */ 109 | .section .text.Default_Handler,"ax",%progbits 110 | Default_Handler: 111 | Infinite_Loop: 112 | b Infinite_Loop 113 | .size Default_Handler, .-Default_Handler 114 | /****************************************************************************** 115 | * 116 | * The minimal vector table for a Cortex M3. Note that the proper constructs 117 | * must be placed on this to ensure that it ends up at physical address 118 | * 0x0000.0000. 119 | * 120 | ******************************************************************************/ 121 | .section .isr_vector,"a",%progbits 122 | .type g_pfnVectors, %object 123 | .size g_pfnVectors, .-g_pfnVectors 124 | 125 | 126 | g_pfnVectors: 127 | 128 | .word _estack 129 | .word Reset_Handler 130 | .word NMI_Handler 131 | .word HardFault_Handler 132 | .word MemManage_Handler 133 | .word BusFault_Handler 134 | .word UsageFault_Handler 135 | .word 0 136 | .word 0 137 | .word 0 138 | .word 0 139 | .word SVC_Handler 140 | .word DebugMon_Handler 141 | .word 0 142 | .word PendSV_Handler 143 | .word SysTick_Handler 144 | .word WWDG_IRQHandler 145 | .word PVD_IRQHandler 146 | .word TAMPER_IRQHandler 147 | .word RTC_IRQHandler 148 | .word FLASH_IRQHandler 149 | .word RCC_IRQHandler 150 | .word EXTI0_IRQHandler 151 | .word EXTI1_IRQHandler 152 | .word EXTI2_IRQHandler 153 | .word EXTI3_IRQHandler 154 | .word EXTI4_IRQHandler 155 | .word DMA1_Channel1_IRQHandler 156 | .word DMA1_Channel2_IRQHandler 157 | .word DMA1_Channel3_IRQHandler 158 | .word DMA1_Channel4_IRQHandler 159 | .word DMA1_Channel5_IRQHandler 160 | .word DMA1_Channel6_IRQHandler 161 | .word DMA1_Channel7_IRQHandler 162 | .word ADC1_2_IRQHandler 163 | .word USB_HP_CAN1_TX_IRQHandler 164 | .word USB_LP_CAN1_RX0_IRQHandler 165 | .word CAN1_RX1_IRQHandler 166 | .word CAN1_SCE_IRQHandler 167 | .word EXTI9_5_IRQHandler 168 | .word TIM1_BRK_IRQHandler 169 | .word TIM1_UP_IRQHandler 170 | .word TIM1_TRG_COM_IRQHandler 171 | .word TIM1_CC_IRQHandler 172 | .word TIM2_IRQHandler 173 | .word TIM3_IRQHandler 174 | .word TIM4_IRQHandler 175 | .word I2C1_EV_IRQHandler 176 | .word I2C1_ER_IRQHandler 177 | .word I2C2_EV_IRQHandler 178 | .word I2C2_ER_IRQHandler 179 | .word SPI1_IRQHandler 180 | .word SPI2_IRQHandler 181 | .word USART1_IRQHandler 182 | .word USART2_IRQHandler 183 | .word USART3_IRQHandler 184 | .word EXTI15_10_IRQHandler 185 | .word RTC_Alarm_IRQHandler 186 | .word USBWakeUp_IRQHandler 187 | .word 0 188 | .word 0 189 | .word 0 190 | .word 0 191 | .word 0 192 | .word 0 193 | .word 0 194 | .word BootRAM /* @0x108. This is for boot in RAM mode for 195 | STM32F10x Medium Density devices. */ 196 | 197 | /******************************************************************************* 198 | * 199 | * Provide weak aliases for each Exception handler to the Default_Handler. 200 | * As they are weak aliases, any function with the same name will override 201 | * this definition. 202 | * 203 | *******************************************************************************/ 204 | 205 | .weak NMI_Handler 206 | .thumb_set NMI_Handler,Default_Handler 207 | 208 | .weak HardFault_Handler 209 | .thumb_set HardFault_Handler,Default_Handler 210 | 211 | .weak MemManage_Handler 212 | .thumb_set MemManage_Handler,Default_Handler 213 | 214 | .weak BusFault_Handler 215 | .thumb_set BusFault_Handler,Default_Handler 216 | 217 | .weak UsageFault_Handler 218 | .thumb_set UsageFault_Handler,Default_Handler 219 | 220 | .weak SVC_Handler 221 | .thumb_set SVC_Handler,Default_Handler 222 | 223 | .weak DebugMon_Handler 224 | .thumb_set DebugMon_Handler,Default_Handler 225 | 226 | .weak PendSV_Handler 227 | .thumb_set PendSV_Handler,Default_Handler 228 | 229 | .weak SysTick_Handler 230 | .thumb_set SysTick_Handler,Default_Handler 231 | 232 | .weak WWDG_IRQHandler 233 | .thumb_set WWDG_IRQHandler,Default_Handler 234 | 235 | .weak PVD_IRQHandler 236 | .thumb_set PVD_IRQHandler,Default_Handler 237 | 238 | .weak TAMPER_IRQHandler 239 | .thumb_set TAMPER_IRQHandler,Default_Handler 240 | 241 | .weak RTC_IRQHandler 242 | .thumb_set RTC_IRQHandler,Default_Handler 243 | 244 | .weak FLASH_IRQHandler 245 | .thumb_set FLASH_IRQHandler,Default_Handler 246 | 247 | .weak RCC_IRQHandler 248 | .thumb_set RCC_IRQHandler,Default_Handler 249 | 250 | .weak EXTI0_IRQHandler 251 | .thumb_set EXTI0_IRQHandler,Default_Handler 252 | 253 | .weak EXTI1_IRQHandler 254 | .thumb_set EXTI1_IRQHandler,Default_Handler 255 | 256 | .weak EXTI2_IRQHandler 257 | .thumb_set EXTI2_IRQHandler,Default_Handler 258 | 259 | .weak EXTI3_IRQHandler 260 | .thumb_set EXTI3_IRQHandler,Default_Handler 261 | 262 | .weak EXTI4_IRQHandler 263 | .thumb_set EXTI4_IRQHandler,Default_Handler 264 | 265 | .weak DMA1_Channel1_IRQHandler 266 | .thumb_set DMA1_Channel1_IRQHandler,Default_Handler 267 | 268 | .weak DMA1_Channel2_IRQHandler 269 | .thumb_set DMA1_Channel2_IRQHandler,Default_Handler 270 | 271 | .weak DMA1_Channel3_IRQHandler 272 | .thumb_set DMA1_Channel3_IRQHandler,Default_Handler 273 | 274 | .weak DMA1_Channel4_IRQHandler 275 | .thumb_set DMA1_Channel4_IRQHandler,Default_Handler 276 | 277 | .weak DMA1_Channel5_IRQHandler 278 | .thumb_set DMA1_Channel5_IRQHandler,Default_Handler 279 | 280 | .weak DMA1_Channel6_IRQHandler 281 | .thumb_set DMA1_Channel6_IRQHandler,Default_Handler 282 | 283 | .weak DMA1_Channel7_IRQHandler 284 | .thumb_set DMA1_Channel7_IRQHandler,Default_Handler 285 | 286 | .weak ADC1_2_IRQHandler 287 | .thumb_set ADC1_2_IRQHandler,Default_Handler 288 | 289 | .weak USB_HP_CAN1_TX_IRQHandler 290 | .thumb_set USB_HP_CAN1_TX_IRQHandler,Default_Handler 291 | 292 | .weak USB_LP_CAN1_RX0_IRQHandler 293 | .thumb_set USB_LP_CAN1_RX0_IRQHandler,Default_Handler 294 | 295 | .weak CAN1_RX1_IRQHandler 296 | .thumb_set CAN1_RX1_IRQHandler,Default_Handler 297 | 298 | .weak CAN1_SCE_IRQHandler 299 | .thumb_set CAN1_SCE_IRQHandler,Default_Handler 300 | 301 | .weak EXTI9_5_IRQHandler 302 | .thumb_set EXTI9_5_IRQHandler,Default_Handler 303 | 304 | .weak TIM1_BRK_IRQHandler 305 | .thumb_set TIM1_BRK_IRQHandler,Default_Handler 306 | 307 | .weak TIM1_UP_IRQHandler 308 | .thumb_set TIM1_UP_IRQHandler,Default_Handler 309 | 310 | .weak TIM1_TRG_COM_IRQHandler 311 | .thumb_set TIM1_TRG_COM_IRQHandler,Default_Handler 312 | 313 | .weak TIM1_CC_IRQHandler 314 | .thumb_set TIM1_CC_IRQHandler,Default_Handler 315 | 316 | .weak TIM2_IRQHandler 317 | .thumb_set TIM2_IRQHandler,Default_Handler 318 | 319 | .weak TIM3_IRQHandler 320 | .thumb_set TIM3_IRQHandler,Default_Handler 321 | 322 | .weak TIM4_IRQHandler 323 | .thumb_set TIM4_IRQHandler,Default_Handler 324 | 325 | .weak I2C1_EV_IRQHandler 326 | .thumb_set I2C1_EV_IRQHandler,Default_Handler 327 | 328 | .weak I2C1_ER_IRQHandler 329 | .thumb_set I2C1_ER_IRQHandler,Default_Handler 330 | 331 | .weak I2C2_EV_IRQHandler 332 | .thumb_set I2C2_EV_IRQHandler,Default_Handler 333 | 334 | .weak I2C2_ER_IRQHandler 335 | .thumb_set I2C2_ER_IRQHandler,Default_Handler 336 | 337 | .weak SPI1_IRQHandler 338 | .thumb_set SPI1_IRQHandler,Default_Handler 339 | 340 | .weak SPI2_IRQHandler 341 | .thumb_set SPI2_IRQHandler,Default_Handler 342 | 343 | .weak USART1_IRQHandler 344 | .thumb_set USART1_IRQHandler,Default_Handler 345 | 346 | .weak USART2_IRQHandler 347 | .thumb_set USART2_IRQHandler,Default_Handler 348 | 349 | .weak USART3_IRQHandler 350 | .thumb_set USART3_IRQHandler,Default_Handler 351 | 352 | .weak EXTI15_10_IRQHandler 353 | .thumb_set EXTI15_10_IRQHandler,Default_Handler 354 | 355 | .weak RTC_Alarm_IRQHandler 356 | .thumb_set RTC_Alarm_IRQHandler,Default_Handler 357 | 358 | .weak USBWakeUp_IRQHandler 359 | .thumb_set USBWakeUp_IRQHandler,Default_Handler 360 | 361 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 362 | 363 | -------------------------------------------------------------------------------- /2.Software/README.md: -------------------------------------------------------------------------------- 1 | # Power_X代码部分 2 | 3 | 本工程是在STM32cubuMX生成的GCC文件基础之上,再使用vscode进行代码编写,故此工程文件无法使用keil打开,如需下载直接烧录固件文件夹中的.hex或.bin文件即可 4 | 5 | 6 | 7 | 此代码目前功能仅为读取并显示电压电流功率数 -------------------------------------------------------------------------------- /2.Software/固件/Power_X.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheng-inkor/Power_X/35a9ca20c014c2595a8f86b764cd9c75585b9506/2.Software/固件/Power_X.bin -------------------------------------------------------------------------------- /3.Image/1.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheng-inkor/Power_X/35a9ca20c014c2595a8f86b764cd9c75585b9506/3.Image/1.JPG -------------------------------------------------------------------------------- /3.Image/2.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheng-inkor/Power_X/35a9ca20c014c2595a8f86b764cd9c75585b9506/3.Image/2.JPG -------------------------------------------------------------------------------- /3.Image/3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheng-inkor/Power_X/35a9ca20c014c2595a8f86b764cd9c75585b9506/3.Image/3.jpg -------------------------------------------------------------------------------- /3.Image/Render.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheng-inkor/Power_X/35a9ca20c014c2595a8f86b764cd9c75585b9506/3.Image/Render.jpg -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Power_X 2 | 3 | 请遵守开源协议,切勿私自商用 4 | 5 | —————————————————————————— 6 | 7 | V1.0版本电路图仅供参考,有一些布线不合理 8 | --------------------------------------------------------------------------------