
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

1. 对于外扩芯片,很难实现加密。除非用单独的加密芯片。
2. 如果用加密芯片,需要在BootLoader中进行解密。其实这也不是最安全的,因为BootLoader也是可能被绕过去的。
如果无法对程序进行加密的话,那使用28346进行系统设计则会很不安全。
其实C5000, C6000 只要是Flash不在片内的都存在相同的问题。
如果希望选择片内Flash,可以考虑F28335.
正是有些应用场合28335的150MHz主频不够,所以才考虑28346的,但是没想到会有这样的问题。
通过IIC写EEPROM,可以参考下面的代码历程:
Uint16 I2C_Self_Test(void)
{
Uint16 temp,devID,len;
Uint32 i,j,start_addr,num_page;
Uint16 status;
if (HAL_I2C_hnd.boardRev==BOARD_REV_PREV_D)
return HAL_I2C_ST_NO_EEPROM;
devID = I2C_AT24C1024B_CHIP_1; // first Chip
len = I2C_AT24C1024B_PAGE_SIZE; // number of bytes
num_page = I2C_AT24C1024B_CAPACITY/I2C_AT24C1024B_PAGE_SIZE;
start_addr = 0x0;
for (j=0;j<num_page;j++)
{
I2C_hnd.test_addr = start_addr;
//generate the ramp data pattern
for (i=0;i<len/2;i++)
{
temp = 2*i + ( (2*i +1)<<8);
i2c_test_data[i] = temp;
}
// write data to EEPROM
status = I2C_Write_DataBuf(devID,start_addr,len,i2c_test_data,0);
if (status!=HAL_I2C_ST_SUCCESS)
return status;
memset(i2c_test_data,0xFF,sizeof(i2c_test_data));
// read the data back
status = I2C_Read_DataBuf(devID,start_addr,len,i2c_test_data,0);
if (status!=HAL_I2C_ST_SUCCESS)
return status;
// verify the data
for (i=0;i<len/2;i++)
{
temp = 2*i + ( (2*i +1)<<8);
if (temp!=i2c_test_data[i])
return HAL_I2C_ST_WRITE_READ_FAIL;
}
start_addr +=len;
}
return HAL_I2C_ST_SUCCESS;
}