【E1757】STM32 OTA升级

2021-10-25 21:18:35      索炜达电子      514     

项目编号:E1757

文件大小:22M

源码说明:带中文注释

开发环境:C编译器

简要概述:

Demo发射板使用用串口收固件,后通过NRF24L01对目标板发射固件。

串口指令: A,发送0x00, 系统提示等待执行指令; B,发送0xff,系统接收固件状态; C,发送0xfe,系统进入接收目标ID个数和ID状态; D,发送0xfd,系统进入发射固件状态。

固件发射机制: 将接收的固件按5KB分批发送,NRF单次最多发送32byte,前4个byte为发送数据包第N个标记,实则单次发送固件28byte。 丢包处理:NRF自动应答无效 -> 重新发送N次 -> 超过N次后自取消发送,提示发射失败,进行下一个目标板发射。

// 首次添加代码 // 接收端为STM32F103C8T6 // 发射端为STM32F103C8T6

目录│文件列表:

 └ OTA-STM32F103

    ├ RXD_9S

    │  │ .mxproject

    │  │ pro.ioc

    │  ├ BSP

    │  │  │ BSP_Main.c

    │  │  │ BSP_Main.h

    │  │  │ BSP_SYS.c

    │  │  │ BSP_SYS.h

    │  │  │ SYS.H

    │  │  ├ BSP_Drivers

    │  │  │  │ BSP_Flash.c

    │  │  │  └ BSP_Flash.h

    │  │  └ BSP_OTA

    │  │     │ BSP_24L01.c

    │  │     │ BSP_24L01.h

    │  │     │ BSP_OTA.C

    │  │     └ BSP_OTA.h

    │  ├ Drivers

    │  │  ├ CMSIS

    │  │  │  ├ Device

    │  │  │  │  └ ST

    │  │  │  │     └ STM32F1xx

    │  │  │  │        ├ Include

    │  │  │  │        │  │ stm32f100xb.h

    │  │  │  │        │  │ stm32f100xe.h

    │  │  │  │        │  │ stm32f101x6.h

    │  │  │  │        │  │ stm32f101xb.h

    │  │  │  │        │  │ stm32f101xe.h

    │  │  │  │        │  │ stm32f101xg.h

    │  │  │  │        │  │ stm32f102x6.h

    │  │  │  │        │  │ stm32f102xb.h

    │  │  │  │        │  │ stm32f103x6.h

    │  │  │  │        │  │ stm32f103xb.h

    │  │  │  │        │  │ stm32f103xe.h

    │  │  │  │        │  │ stm32f103xg.h

    │  │  │  │        │  │ stm32f105xc.h

    │  │  │  │        │  │ stm32f107xc.h

    │  │  │  │        │  │ stm32f1xx.h

    │  │  │  │        │  └ system_stm32f1xx.h

    │  │  │  │        └ Source

    │  │  │  │           └ Templates

    │  │  │  │              │ system_stm32f1xx.c

    │  │  │  │              ├ arm

    │  │  │  │              │  │ startup_stm32f100xb.s

    │  │  │  │              │  │ startup_stm32f100xe.s

    │  │  │  │              │  │ startup_stm32f101x6.s

    │  │  │  │              │  │ startup_stm32f101xb.s

    │  │  │  │              │  │ startup_stm32f101xe.s

    │  │  │  │              │  │ startup_stm32f101xg.s

    │  │  │  │              │  │ startup_stm32f102x6.s

    │  │  │  │              │  │ startup_stm32f102xb.s

    │  │  │  │              │  │ startup_stm32f103x6.s

    │  │  │  │              │  │ startup_stm32f103xb.s

    │  │  │  │              │  │ startup_stm32f103xe.s

    │  │  │  │              │  │ startup_stm32f103xg.s

    │  │  │  │              │  │ startup_stm32f105xc.s

    │  │  │  │              │  └ startup_stm32f107xc.s

    │  │  │  │              ├ gcc

    │  │  │  │              │  │ startup_stm32f100xb.s

    │  │  │  │              │  │ startup_stm32f100xe.s

    │  │  │  │              │  │ startup_stm32f101x6.s

    │  │  │  │              │  │ startup_stm32f101xb.s

    │  │  │  │              │  │ startup_stm32f101xe.s

    │  │  │  │              │  │ startup_stm32f101xg.s

    │  │  │  │              │  │ startup_stm32f102x6.s

    │  │  │  │              │  │ startup_stm32f102xb.s

    │  │  │  │              │  │ startup_stm32f103x6.s

    │  │  │  │              │  │ startup_stm32f103xb.s

    │  │  │  │              │  │ startup_stm32f103xe.s

    │  │  │  │              │  │ startup_stm32f103xg.s

    │  │  │  │              │  │ startup_stm32f105xc.s

    │  │  │  │              │  └ startup_stm32f107xc.s

    │  │  │  │              └ iar

    │  │  │  │                 │ startup_stm32f100xb.s

    │  │  │  │                 │ startup_stm32f100xe.s

    │  │  │  │                 │ startup_stm32f101x6.s

    │  │  │  │                 │ startup_stm32f101xb.s

    │  │  │  │                 │ startup_stm32f101xe.s

    │  │  │  │                 │ startup_stm32f101xg.s

    │  │  │  │                 │ startup_stm32f102x6.s

    │  │  │  │                 │ startup_stm32f102xb.s

    │  │  │  │                 │ startup_stm32f103x6.s

    │  │  │  │                 │ startup_stm32f103xb.s

    │  │  │  │                 │ startup_stm32f103xe.s

    │  │  │  │                 │ startup_stm32f103xg.s

    │  │  │  │                 │ startup_stm32f105xc.s

    │  │  │  │                 │ startup_stm32f107xc.s

    │  │  │  │                 └ linker

    │  │  │  │                    │ stm32f100xb_flash.icf

    │  │  │  │                    │ stm32f100xb_sram.icf

    │  │  │  │                    │ stm32f100xe_flash.icf

    │  │  │  │                    │ stm32f100xe_sram.icf

    │  │  │  │                    │ stm32f101x6_flash.icf

    │  │  │  │                    │ stm32f101x6_sram.icf

    │  │  │  │                    │ stm32f101xb_flash.icf

    │  │  │  │                    │ stm32f101xb_sram.icf

    │  │  │  │                    │ stm32f101xe_flash.icf

    │  │  │  │                    │ stm32f101xe_sram.icf

    │  │  │  │                    │ stm32f101xg_flash.icf

    │  │  │  │                    │ stm32f101xg_sram.icf

    │  │  │  │                    │ stm32f102x6_flash.icf

    │  │  │  │                    │ stm32f102x6_sram.icf

    │  │  │  │                    │ stm32f102xb_flash.icf

    │  │  │  │                    │ stm32f102xb_sram.icf

    │  │  │  │                    │ stm32f103x6_flash.icf

    │  │  │  │                    │ stm32f103x6_sram.icf

    │  │  │  │                    │ stm32f103xb_flash.icf

    │  │  │  │                    │ stm32f103xb_sram.icf

    │  │  │  │                    │ stm32f103xe_flash.icf

    │  │  │  │                    │ stm32f103xe_sram.icf

    │  │  │  │                    │ stm32f103xg_flash.icf

    │  │  │  │                    │ stm32f103xg_sram.icf

    │  │  │  │                    │ stm32f105xc_flash.icf

    │  │  │  │                    │ stm32f105xc_sram.icf

    │  │  │  │                    │ stm32f107xc_flash.icf

    │  │  │  │                    └ stm32f107xc_sram.icf

    │  │  │  ├ DSP_Lib

    │  │  │  │  └ Source

    │  │  │  │     ├ BasicMathFunctions

    │  │  │  │     │  │ arm_abs_f32.c

    │  │  │  │     │  │ arm_abs_q15.c

    │  │  │  │     │  │ arm_abs_q31.c

    │  │  │  │     │  │ arm_abs_q7.c

    │  │  │  │     │  │ arm_add_f32.c

    │  │  │  │     │  │ arm_add_q15.c

    │  │  │  │     │  │ arm_add_q31.c

    │  │  │  │     │  │ arm_add_q7.c

    │  │  │  │     │  │ arm_dot_prod_f32.c

    │  │  │  │     │  │ arm_dot_prod_q15.c

    │  │  │  │     │  │ arm_dot_prod_q31.c

    │  │  │  │     │  │ arm_dot_prod_q7.c

    │  │  │  │     │  │ arm_mult_f32.c

    │  │  │  │     │  │ arm_mult_q15.c

    │  │  │  │     │  │ arm_mult_q31.c

TAGOTA
  • 9 次
  • 1 分