共5条
1/1 1 跳转至页
AVR,APP,boot AVR的APP和boot区的加密位编程了就不能清除吗?

问
为什么我设置成禁止其他区读写后,再想设置为允许就不成功呀?
用的是引导区程序设置的。
如果软件有问题那设置禁止其他区读写的时候也应该不成功对吧?
请大侠门帮忙!谢谢
答 1: 这是对的,看看这个The application and Boot Loader section CAN be protected on different levels. There are
four levels of protection for both sections. A short description of the modes follows.
Note that once programmed (cleared), it is impossible to unprogram the bits again without
using serial or parallel programming. For instance, to implement an application that
is to be updated once, set Boot Lock mode 1 on the Application section, and mode 4 on
the Boot Loader section. This prevents the application from accessing the Boot Loader,
while giving the Boot Loader full access to update the application section. Once
updated, the Boot Loader would set mode 3 on the Application section, thus blocking all
further access.
To program the Boot Lock bits, load the R0 Register with the correct bits, set the BLBSET
and SPMEN bits in the SPMCR Register and execute the SPM instruction within
four cycles. The contents of the Z-register are ignored.
Using the LPM instruction instead of the SPM instruction will read the bits.
Table 1. Boot Lock Modes
Mode Bits Description
Mode 1 11 Full read/write access
Mode 2 10 No write access
Mode 3 00 No write access and no read access (data or interrupt execution) from the
other section.
Mode 4 01 No read access (data or interrupt execution) from the other section.
用的是引导区程序设置的。
如果软件有问题那设置禁止其他区读写的时候也应该不成功对吧?
请大侠门帮忙!谢谢
答 1: 这是对的,看看这个The application and Boot Loader section CAN be protected on different levels. There are
four levels of protection for both sections. A short description of the modes follows.
Note that once programmed (cleared), it is impossible to unprogram the bits again without
using serial or parallel programming. For instance, to implement an application that
is to be updated once, set Boot Lock mode 1 on the Application section, and mode 4 on
the Boot Loader section. This prevents the application from accessing the Boot Loader,
while giving the Boot Loader full access to update the application section. Once
updated, the Boot Loader would set mode 3 on the Application section, thus blocking all
further access.
To program the Boot Lock bits, load the R0 Register with the correct bits, set the BLBSET
and SPMEN bits in the SPMCR Register and execute the SPM instruction within
four cycles. The contents of the Z-register are ignored.
Using the LPM instruction instead of the SPM instruction will read the bits.
Table 1. Boot Lock Modes
Mode Bits Description
Mode 1 11 Full read/write access
Mode 2 10 No write access
Mode 3 00 No write access and no read access (data or interrupt execution) from the
other section.
Mode 4 01 No read access (data or interrupt execution) from the other section.
共5条
1/1 1 跳转至页
回复
有奖活动 | |
---|---|
【有奖活动】分享技术经验,兑换京东卡 | |
话不多说,快进群! | |
请大声喊出:我要开发板! | |
【有奖活动】EEPW网站征稿正在进行时,欢迎踊跃投稿啦 | |
奖!发布技术笔记,技术评测贴换取您心仪的礼品 | |
打赏了!打赏了!打赏了! |
打赏帖 | |
---|---|
Buck电路工作在CCM模式下电感电流的计算公式是什么?被打赏5分 | |
buck电路工作原理被打赏5分 | |
基于MSPM0L1306的MODBUS-RTU协议通讯实验被打赏100分 | |
我想要一部加热台+多合一调试工具被打赏18分 | |
每周了解几个硬件知识+485硬件知识分享被打赏10分 | |
【换取手持数字示波器】树莓派PICO调试器官方固件本地化部署实践被打赏24分 | |
【换取手持数字示波器】分享一个KEIL无法识别CMSIS-DAP调试器的解决办法被打赏20分 | |
【换取手持数字示波器】分享一个自制的ArduinoNano扩展板底板被打赏23分 | |
【换取手持示波器】树莓派PICOW网页烟花被打赏18分 | |
【换取手持示波器】树莓派PICO逻辑分析仪被打赏16分 |