【E667】基于STM32G0采用USB type-C的锂电池充电器

2021-08-26 11:57:23      索炜达电子      999     

项目编号:E667

文件大小:10M

源码说明:带中文注释

开发环境:C编译器

简要概述:

这是一个基于 STM32G0 采用 USB type-C 供电的锂电池充电器开源项目。

【E667】基于STM32G0采用USB type-C的锂电池充电器

功能特性

-STM32G071CBT6 微控制器,具有2路 type C 接口,内置 USB Power Delivery PHY。

-LiPow 使用 USB Type C 和 Power Delivery 为锂聚合物电池充电。它支持 2s-4s 包的充电和平衡。

-支持从 USB PD 电源或具有 PD 源功能的任何其他 USB C 端口(例如 Thinkpad X1 笔记本电脑)充电,高达 60W。

-随着设备温度的升高,自动降低充电功率。

【E667】基于STM32G0采用USB type-C的锂电池充电器

开发指南

-通过 SWD 或 UART 编程

-运行 FreeRTOS

-ST USB PD 中间件

-UART 命令行界面(921600 bps,8N1)

-基于 TrueStudio 使用 Makefile 进行构建

-如果通过 SWD 烧录程序,需要使用 JLINK 或 STLINK 编程器;如果通过 UART 烧录程序,需要使用 STM32CubeProg 或 STM32Flash 上位机软件。

【E667】基于STM32G0采用USB type-C的锂电池充电器

原理图:

【E667】基于STM32G0采用USB type-C的锂电池充电器

【E667】基于STM32G0采用USB type-C的锂电池充电器

【E667】基于STM32G0采用USB type-C的锂电池充电器

【E667】基于STM32G0采用USB type-C的锂电池充电器

电路板:

【E667】基于STM32G0采用USB type-C的锂电池充电器

目录│文件列表:

 └ 锂电池充电器

    ├ LiPow-Firmware

    │  │ .code_review_properties

    │  │ .cproject

    │  │ .mxproject

    │  │ .project

    │  │ LICENSE

    │  │ Lipow.ioc

    │  │ Makefile

    │  │ startup_stm32g071xx.s

    │  │ STM32G071CBTx_FLASH.ld

    │  │ syscalls.c

    │  ├ Drivers

    │  │  ├ CMSIS

    │  │  │  ├ Device

    │  │  │  │  └ ST

    │  │  │  │     └ STM32G0xx

    │  │  │  │        ├ Include

    │  │  │  │        │  │ stm32g071xx.h

    │  │  │  │        │  │ stm32g0xx.h

    │  │  │  │        │  └ system_stm32g0xx.h

    │  │  │  │        └ Source

    │  │  │  │           └ Templates

    │  │  │  │              └ system_stm32g0xx.c

    │  │  │  └ Include

    │  │  │     │ arm_common_tables.h

    │  │  │     │ arm_const_structs.h

    │  │  │     │ arm_math.h

    │  │  │     │ cmsis_armcc.h

    │  │  │     │ cmsis_armcc_V6.h

    │  │  │     │ cmsis_gcc.h

    │  │  │     │ core_cm0.h

    │  │  │     │ core_cm0plus.h

    │  │  │     │ core_cm3.h

    │  │  │     │ core_cm4.h

    │  │  │     │ core_cm7.h

    │  │  │     │ core_cmFunc.h

    │  │  │     │ core_cmInstr.h

    │  │  │     │ core_cmSimd.h

    │  │  │     │ core_sc000.h

    │  │  │     └ core_sc300.h

    │  │  └ STM32G0xx_HAL_Driver

    │  │     ├ Inc

    │  │     │  │ stm32g0xx_hal.h

    │  │     │  │ stm32g0xx_hal_adc.h

    │  │     │  │ stm32g0xx_hal_adc_ex.h

    │  │     │  │ stm32g0xx_hal_cortex.h

    │  │     │  │ stm32g0xx_hal_def.h

    │  │     │  │ stm32g0xx_hal_dma.h

    │  │     │  │ stm32g0xx_hal_dma_ex.h

    │  │     │  │ stm32g0xx_hal_exti.h

    │  │     │  │ stm32g0xx_hal_flash.h

    │  │     │  │ stm32g0xx_hal_flash_ex.h

    │  │     │  │ stm32g0xx_hal_gpio.h

    │  │     │  │ stm32g0xx_hal_gpio_ex.h

    │  │     │  │ stm32g0xx_hal_i2c.h

    │  │     │  │ stm32g0xx_hal_i2c_ex.h

    │  │     │  │ stm32g0xx_hal_pwr.h

    │  │     │  │ stm32g0xx_hal_pwr_ex.h

    │  │     │  │ stm32g0xx_hal_rcc.h

    │  │     │  │ stm32g0xx_hal_rcc_ex.h

    │  │     │  │ stm32g0xx_hal_tim.h

    │  │     │  │ stm32g0xx_hal_tim_ex.h

    │  │     │  │ stm32g0xx_hal_uart.h

    │  │     │  │ stm32g0xx_hal_uart_ex.h

    │  │     │  │ stm32g0xx_ll_adc.h

    │  │     │  │ stm32g0xx_ll_bus.h

    │  │     │  │ stm32g0xx_ll_cortex.h

    │  │     │  │ stm32g0xx_ll_dma.h

    │  │     │  │ stm32g0xx_ll_dmamux.h

    │  │     │  │ stm32g0xx_ll_exti.h

    │  │     │  │ stm32g0xx_ll_gpio.h

    │  │     │  │ stm32g0xx_ll_pwr.h

    │  │     │  │ stm32g0xx_ll_rcc.h

    │  │     │  │ stm32g0xx_ll_system.h

    │  │     │  │ stm32g0xx_ll_tim.h

    │  │     │  │ stm32g0xx_ll_ucpd.h

    │  │     │  │ stm32g0xx_ll_usart.h

    │  │     │  │ stm32g0xx_ll_utils.h

    │  │     │  └ Legacy

    │  │     │     └ stm32_hal_legacy.h

    │  │     └ Src

    │  │        │ stm32g0xx_hal.c

    │  │        │ stm32g0xx_hal_adc.c

    │  │        │ stm32g0xx_hal_adc_ex.c

    │  │        │ stm32g0xx_hal_cortex.c

    │  │        │ stm32g0xx_hal_dma.c

    │  │        │ stm32g0xx_hal_dma_ex.c

    │  │        │ stm32g0xx_hal_exti.c

    │  │        │ stm32g0xx_hal_flash.c

    │  │        │ stm32g0xx_hal_flash_ex.c

    │  │        │ stm32g0xx_hal_gpio.c

    │  │        │ stm32g0xx_hal_i2c.c

    │  │        │ stm32g0xx_hal_i2c_ex.c

    │  │        │ stm32g0xx_hal_pwr.c

    │  │        │ stm32g0xx_hal_pwr_ex.c

    │  │        │ stm32g0xx_hal_rcc.c

    │  │        │ stm32g0xx_hal_rcc_ex.c

    │  │        │ stm32g0xx_hal_tim.c

    │  │        │ stm32g0xx_hal_tim_ex.c

    │  │        │ stm32g0xx_hal_uart.c

    │  │        │ stm32g0xx_hal_uart_ex.c

    │  │        │ stm32g0xx_ll_adc.c

    │  │        │ stm32g0xx_ll_dma.c

    │  │        │ stm32g0xx_ll_exti.c

    │  │        │ stm32g0xx_ll_gpio.c

    │  │        │ stm32g0xx_ll_rcc.c

    │  │        │ stm32g0xx_ll_tim.c

    │  │        │ stm32g0xx_ll_ucpd.c

    │  │        └ stm32g0xx_ll_utils.c

    │  ├ Inc

    │  │  │ adc_interface.h

    │  │  │ battery.h

    │  │  │ bq25703a_regulator.h

    │  │  │ error.h

    │  │  │ FreeRTOSConfig.h

    │  │  │ main.h

    │  │  │ printf.h

    │  │  │ stm32g0xx_hal_conf.h

    │  │  │ stm32g0xx_it.h

    │  │  │ stm32_assert.h

    │  │  │ tracer_emb_conf.h

    │  │  │ usbpd.h

    │  │  │ usbpd_devices_conf.h

    │  │  │ usbpd_dpm_conf.h

    │  │  │ usbpd_dpm_core.h

    │  │  │ usbpd_dpm_user.h

    │  │  │ usbpd_gui_memmap.h

    │  │  │ usbpd_pdo_defs.h

    │  │  │ usbpd_pwr_if.h

    │  │  │ usbpd_pwr_user.h

    │  │  └ usbpd_vdm_user.h

    │  ├ Middlewares

    │  │  ├ ST

    │  │  │  └ STM32_USBPD_Library

    │  │  │     ├ Core

    │  │  │     │  ├ inc

    │  │  │     │  │  │ usbpd_core.h

    │  │  │     │  │  │ usbpd_def.h

    │  │  │     │  │  └ usbpd_trace.h

    │  │  │     │  ├ lib

    │  │  │     │  │  │ USBPDCORE_PD3_CONFIG_1_CM0PLUS_wc32.a

    │  │  │     │  │  │ USBPDCORE_PD3_CONFIG_2_CM0PLUS_wc32.a

    │  │  │     │  │  └ USBPDCORE_PD3_FULL_CM0PLUS_wc32.a

    │  │  │     │  └ src

    │  │  │     │     └ usbpd_trace.c

    │  │  │     └ Devices

    │  │  │        └ STM32G0XX

    │  │  │           ├ inc

    │  │  │           │  │ usbpd_cad_hw_if.h

    │  │  │           │  │ usbpd_hw.h

    │  │  │           │  │ usbpd_hw_if.h

    │  │  │           │  │ usbpd_phy.h

    │  │  │           │  └ usbpd_timersserver.h

    │  │  │           └ src

    │  │  │              │ usbpd_cad_hw_if.c

    │  │  │              │ usbpd_hw.c

    │  │  │              │ usbpd_hw_if_it.c

    │  │  │              │ usbpd_phy.c

    │  │  │              │ usbpd_phy_hw_if.c

    │  │  │              │ usbpd_pwr_hw_if.c

    │  │  │              └ usbpd_timersserver.c

    │  │  └ Third_Party

    │  │     ├ FreeRTOS

    │  │     │  └ Source

    │  │     │     │ croutine.c

    │  │     │     │ event_groups.c

    │  │     │     │ list.c

    │  │     │     │ queue.c

    │  │     │     │ stream_buffer.c

    │  │     │     │ tasks.c

    │  │     │     │ timers.c

    │  │     │     ├ CMSIS_RTOS

    │  │     │     │  │ cmsis_os.c

    │  │     │     │  └ cmsis_os.h

    │  │     │     ├ include

    │  │     │     │  │ croutine.h

    │  │     │     │  │ deprecated_definitions.h

    │  │     │     │  │ event_groups.h

    │  │     │     │  │ FreeRTOS.h

    │  │     │     │  │ list.h

    │  │     │     │  │ message_buffer.h

    │  │     │     │  │ mpu_prototypes.h

    │  │     │     │  │ mpu_wrappers.h

    │  │     │     │  │ portable.h

    │  │     │     │  │ projdefs.h

    │  │     │     │  │ queue.h

    │  │     │     │  │ semphr.h

    │  │     │     │  │ StackMacros.h

    │  │     │     │  │ stack_macros.h

    │  │     │     │  │ stream_buffer.h

    │  │     │     │  │ task.h

    │  │     │     │  └ timers.h

    │  │     │     └ portable

    │  │     │        ├ GCC

    │  │     │        │  └ ARM_CM0

    │  │     │        │     │ port.c

    │  │     │        │     └ portmacro.h

    │  │     │        └ MemMang

    │  │     │           └ heap_4.c

    │  │     └ FreeRTOS_CLI

    │  │        └ Source

    │  │           │ CLI-commands.c

    │  │           │ FreeRTOS_CLI.c

    │  │           │ UARTCommandConsole.c

    │  │           └ include

    │  │              │ FreeRTOS_CLI.h

    │  │              └ UARTCommandConsole.h

    │  ├ Releases

    │  │  │ LiPow_V1.0.hex

    │  │  │ LiPow_V1.2.hex

    │  │  │ LiPow_V1.3.bin

    │  │  └ LiPow_V1.3.hex

    │  ├ Src

    │  │  │ adc_interface.c

    │  │  │ app_freertos.c

    │  │  │ battery.c

    │  │  │ bq25703a_regulator.c

    │  │  │ error.c

    │  │  │ main.c

    │  │  │ printf.c

    │  │  │ stm32g0xx_hal_msp.c

    │  │  │ stm32g0xx_hal_timebase_tim.c

    │  │  │ stm32g0xx_it.c

    │  │  │ usbpd.c

    │  │  │ usbpd_dpm_core.c

    │  │  │ usbpd_dpm_user.c

    │  │  │ usbpd_pwr_if.c

    │  │  │ usbpd_pwr_user.c

    │  │  └ usbpd_vdm_user.c

    │  └ Utilities

    │     ├ GUI_INTERFACE

    │     │  │ bsp_gui.c

    │     │  │ bsp_gui.h

    │     │  │ data_struct_tlv.c

    │     │  │ data_struct_tlv.h

    │     │  │ gui_api.c

    │     │  └ gui_api.h

    │     └ TRACER_EMB

    │        │ tracer_emb.c

    │        │ tracer_emb.h

    │        │ tracer_emb_conf_template.h

    │        │ tracer_emb_hw.c

    │        └ tracer_emb_hw.h

    └ LiPow-Hardware

       └ LiPow-Hardware

          ├ 3d_Models

          │  ├ Revision 3

          │  │  │ LiPow_3D_Model_Rev_3.0.PDF

          │  │  └ LiPow_3D_Model_Rev_3.0.step

          │  └ Revision 4

          │     │ LiPow_3D_Model_Rev_4.0.PDF

          │     └ LiPow_3D_Model_Rev_4.0.step

          ├ BOM

          │  │ LiPow_BOM_Rev_3.0.xls

          │  └ LiPow_BOM_Rev_4.0.xls

          ├ Case

          │  ├ CNC Case

          │  │  │ Bottom Case CNC V1.0.step

          │  │  └ Top Case CNC V1.0.step

          │  ├ Fan Case

          │  │  │ Bottom Case Fan 1.0.stl

          │  │  └ Top Case Fan 1.0.stl

          │  └ Regular Case

          │     │ LiPow Bottom Case Rev 0.6.stl

          │     │ LiPow Top Case Rev 0.5 Debug.stl

          │     └ LiPow Top Case Rev 0.6.stl

          ├ PCB_Docs

          │  ├ Revision 3

          │  │  │ LiPow Rev 3.0 Bottom Paste Mask.GBP

          │  │  │ LiPow Rev 3.0 Top Paste Mask.GTP

          │  │  └ LiPow_PCB_Documentation_Rev_3.0.PDF

          │  └ Revision 4

          │     └ LiPow_PCB_Documentation_Rev_4.0.PDF

          └ Schematics

             │ LiPow_Schematic_Rev_1.0.PDF

             │ LiPow_Schematic_Rev_2.0.PDF

             │ LiPow_Schematic_Rev_3.0.PDF

             └ LiPow_Schematic_Rev_4.0.PDF

TAG锂电池充电器
  • 12 次
  • 2 分