stm8-----falsh ICP and IAP学习笔记

Medium density STM8L15x device block diagram



32Kbyte Flash program
1Kbyte data EEPROM '


ICP and IAP


The in-circuit programming (ICP) method is used to update the entire content of the memory,
using the SWIM interface to load the user application into the microcontroller. ICP offers
quick and efficient design iterations and eliminates unnecessary package handling or
socketing of devices. The SWIM interface (single wire interface module) uses the SWIM pin
to connect to the programming tool.


In contrast to the ICP method, in-application programming (IAP) can use any communication
interface supported by the microcontroller (I/Os, I2C, SPI, USART...) to download the data to
be programmed in the memory. IAP allows the Flash program memory content to be
reprogrammed during application execution. Nevertheless, part of the application must have
been previously programmed in the Flash program memory using ICP.
Refer to the STM8L Flash programming manual (PM0054) and STM8 SWIM protocol and
debug manual (UM0470) for more information on programming procedures.

IAP(In Application Programming)即在应用编程,IAP 是用户自己的程序在运行过程中对
User Flash 的部分区域进行烧写,目的是为了在产品发布后可以方便地通过预留的通信口对产
品中的固件程序进行更新升级。 通常实现IAP 功能时,即用户程序运行中作自身的更新操作,
需要在设计固件程序时编写两个项目代码,第一个项目程序不执行正常的功能操作,而只是通
过某种通信方式(如USB、USART)接收程序或数据,执行对第二部分代码的更新;第二个项目
代码才是真正的功能代码。这两部分项目代码都同时烧录在User Flash 中,当芯片上电后,首
先是第一个项目代码开始运行,它作如下操作:
1)检查是否需要对第二部分代码进行更新
2)如果不需要更新则转到4)
3)执行更新操作
4)跳转到第二部分代码执行



  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值