|
at88sc0104加密芯片里的一段代码,请高手指点啊
[复制链接]
这是初始化的一段代码,我初始化后,再往芯片发送随机数就不成功,我怀疑是初始化后熔断了熔丝造成的,
熔丝代码:
ucData[0]= (uchar)CM_FAB;
ucReturn = cm_BurnFuse(ucData[0]);
if (ucReturn != SUCCESS)
{
while(1);
}
printf("success \n");
ucData[0]= (uchar)CM_CMA;
ucReturn = cm_BurnFuse(ucData[0]);
if (ucReturn != SUCCESS)
{
while(1);
}
printf("success \n");
ucData[0]= (uchar)CM_PER;
ucReturn = cm_BurnFuse(ucData[0]);
if (ucReturn != SUCCESS)
{
while(1);
}
printf("success \n");
发送随机数代码:
// Send chalange
ucCM_InsBuff[0] = 0xb8;
ucCM_InsBuff[1] = ucCmd1;
ucCM_InsBuff[2] = 0x00;
ucCM_InsBuff[3] = 0x10;
if ((ucReturn = cm_WriteCommand(ucCM_InsBuff, ucCM_Q_Ch, 16)) != SUCCESS) return ucReturn;
|
|