新闻中心

EEPW首页 > 模拟技术 > 设计应用 > 在应用编程MAXQ微控制器中可分区擦除的程序和数

在应用编程MAXQ微控制器中可分区擦除的程序和数

作者: 时间:2012-03-19 来源:网络 收藏
程来刷新MAXQ。该方法要求主程序拷贝一个小的、可再定位的闪存编程例程到RAM中,然后再跳转到该例程。表7列出了从RAM中执行代码需要注意的几个限制。

表7. 从RAM中执行代码的限制

SC.UPA must be set to 0 before executing a RAM-based routine. This means that the application must jump to the RAM routine from the code segments P0 P1.
RAM cannot be accessed as data and program at the same time. This means that only the registers and hardware stack are available for data storage.
The Interrupt Vector must point to a RAM routine if interrupts are enabled. Typically interrupts are turned off and polling is used due to the simplicity of the RAM reflash routine.

闪存例程一般通过UART或者CAN接口来进行通信。为实现更可靠的错误恢复机制,最好是接收小的数据包,并发送某种类型的确认信息。图6给出了一个更新例程。记住,在掉电之前,如果没有成功完成重新编程,需要通过JTAG端口对重新编程。

在应用编程MAXQ微控制器中可分区擦除的程序和数
图6. 简化的RAM更新例程流程图


上一页 1 2 3 下一页

评论


相关推荐

技术专区

关闭