Quantcast
Channel: MSP 低功耗微控制器论坛 - 最近的话题
Viewing all articles
Browse latest Browse all 3634

5529 BSL升级代码

$
0
0
5529 BSL代码中发送密码的疑问,
如果第一次密码发送失败,就会擦除flash(密码也恢复到默认?),  然后再用默认密码(这个时候密码就对了?).
如果是这样,就可以轻易把密码绕过了
 // Send Password... Causes mass erase if password is wrong! 
  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);
 // Memory is blank now. Re-send blank password to access device.
 reply = BSL_RX_Password(blankPass);
    if(reply)
    {
      worker->ReportProgress(10,"Password FAILED!\r\n");
      e->Result = false;
      return false;
    }
  }

  worker->ReportProgress(10,"Password Sent Successfully\r\n");


Viewing all articles
Browse latest Browse all 3634

Trending Articles