【E1692】STM32串口IAP升级方法 IAP-Bootloader V1.0程序源码

2021-10-22 17:29:20      索炜达电子      793     

项目编号:E1692

文件大小:332K

源码说明:带中文注释

开发环境:C编译器

简要概述:

硬件资源:
    1,DS0(连接在PB5)
    2,串口1(波特率:115200,PA9/PA10连接在板载USB转串口芯片CH340上面)
    3,ALIENTEK 2.8/3.5/4.3/7寸TFTLCD模块(通过FSMC驱动,FSMC_NE4接LCD片选/A10接RS)
    4,按键KEY0(PE4)/KEY1(PE3)/KEY2(PE2)/KEY_UP(PA0,也称之为WK_UP)
   
实验现象:
    本实验开机的时候先显示提示信息,然后等待串口输入接收APP程序(无校验,一次性接收),在串口接收
    到APP程序之后,即可执行IAP。如果是SRAM APP,通过按下KEY0即可执行这个收到的SRAM APP程序。如果
    是FLASH APP,则需要先按下KEY_UP按键,将串口接收到的APP程序存放到STM32的FLASH,之后再按KEY1即
    可以执行这个FLASH APP程序。通过KEY2按键,可以手动清除串口接收到的APP程序。

注意事项:
    1,4.3寸和7寸屏需要比较大电流,USB供电可能不足,请用外部电源适配器(推荐外接12V 1A电源).
    2,本例程在LCD_Init函数里面(在ILI93xx.c),用到了printf,如果不初始化串口1,将导致液晶无法显示!!
    3,本实验下载成功后,需用串口调试助手发送SRAM APP/FLASH APP等APP代码(.bin文件)验证IAP功能.

目录│文件列表:

 └ IAP-Bootloader V1.0

    │ keilkilll.bat

    │ README.TXT

    ├ CORE

    │  │ core_cm3.c

    │  │ core_cm3.h

    │  └ startup_stm32f10x_hd.s

    ├ HARDWARE

    │  ├ KEY

    │  │  │ key.c

    │  │  └ key.h

    │  ├ LCD

    │  │  │ font.h

    │  │  │ lcd.c

    │  │  └ lcd.h

    │  ├ LED

    │  │  │ led.c

    │  │  └ led.h

    │  └ STMFLASH

    │     │ stmflash.c

    │     └ stmflash.h

    ├ IAP

    │  │ iap.c

    │  └ iap.h

    ├ OBJ

    │  └ IAP.hex

    ├ STM32F10x_FWLib

    │  ├ inc

    │  │  │ misc.h

    │  │  │ stm32f10x_adc.h

    │  │  │ stm32f10x_bkp.h

    │  │  │ stm32f10x_can.h

    │  │  │ stm32f10x_cec.h

    │  │  │ stm32f10x_crc.h

    │  │  │ stm32f10x_dac.h

    │  │  │ stm32f10x_dbgmcu.h

    │  │  │ stm32f10x_dma.h

    │  │  │ stm32f10x_exti.h

    │  │  │ stm32f10x_flash.h

    │  │  │ stm32f10x_fsmc.h

    │  │  │ stm32f10x_gpio.h

    │  │  │ stm32f10x_i2c.h

    │  │  │ stm32f10x_iwdg.h

    │  │  │ stm32f10x_pwr.h

    │  │  │ stm32f10x_rcc.h

    │  │  │ stm32f10x_rtc.h

    │  │  │ stm32f10x_sdio.h

    │  │  │ stm32f10x_spi.h

    │  │  │ stm32f10x_tim.h

    │  │  │ stm32f10x_usart.h

    │  │  └ stm32f10x_wwdg.h

    │  └ src

    │     │ misc.c

    │     │ stm32f10x_adc.c

    │     │ stm32f10x_bkp.c

    │     │ stm32f10x_can.c

    │     │ stm32f10x_cec.c

    │     │ stm32f10x_crc.c

    │     │ stm32f10x_dac.c

    │     │ stm32f10x_dbgmcu.c

    │     │ stm32f10x_dma.c

    │     │ stm32f10x_exti.c

    │     │ stm32f10x_flash.c

    │     │ stm32f10x_fsmc.c

    │     │ stm32f10x_gpio.c

    │     │ stm32f10x_i2c.c

    │     │ stm32f10x_iwdg.c

    │     │ stm32f10x_pwr.c

    │     │ stm32f10x_rcc.c

    │     │ stm32f10x_rtc.c

    │     │ stm32f10x_sdio.c

    │     │ stm32f10x_spi.c

    │     │ stm32f10x_tim.c

    │     │ stm32f10x_usart.c

    │     └ stm32f10x_wwdg.c

    ├ SYSTEM

    │  ├ delay

    │  │  │ delay.c

    │  │  └ delay.h

    │  ├ sys

    │  │  │ sys.c

    │  │  └ sys.h

    │  └ usart

    │     │ usart.c

    │     └ usart.h

    └ USER

       │ IAP.uvguix.Administrator

       │ IAP.uvoptx

       │ IAP.uvprojx

       │ JLinkSettings.ini

       │ main.c

       │ stm32f10x.h

       │ stm32f10x_conf.h

       │ stm32f10x_it.c

       │ stm32f10x_it.h

       │ system_stm32f10x.c

       └ system_stm32f10x.h

TAGSTM32串口
  • 10 次
  • 1 分