请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
器件型号:MSP430F5529 代码如下所示、如果发送失败的第一个密码、它将擦除闪存(密码也恢复为默认值?)、然后使用默认密码(这次在右侧?)。
如果是这种情况、您可以轻松地传递密码
// Send Password... Causes mass erase if password is wrong! |
|
1
2.
3.
4.
5.
6.
7.
8.
|
reply = BSL_RX_Password(pass); if(reply) { // Wrong password provided. // Memory is being mass erased. Setting a 1sec delay. *massErased = true; worker->ReportProgress(5,"Mass erase occured!\r\n"); Sleep(2000); |
|
1
|
// Memory is blank now. Re-send blank password to access device. |
|
1
2.
3.
4.
5.
6.
7.
8.
9.
10.
|
reply = BSL_RX_Password(blankPass); if(reply) { worker->ReportProgress(10,"Password FAILED!\r\n"); e->Result = false; returnfalse; } } worker->ReportProgress(10,"Password Sent Successfully\r\n"); |