|
main()
{
IIC_test();
SRAM_test();//FSMC
PCL_Test();//FSMC
}这样会死掉,
但是这样:
main()
{
printf("\nI2C Read-Write test: \n");
if(I2C_FRAM_BufferWrite(u8Test_data,Start_addr_Test,Test_buflen)==TRUE)
printf(" I2C Write OK: \n");
else
printf(" I2C Write EEROR: \n");
if(I2C_FRAM_BufferRead(u8readdata,Start_addr_Test,Test_buflen)==TRUE)
{
for(j=0;j
{
printf("i2c_write:%x , i2c_read:%x ",u8Test_data[j],u8readdata[j]);
if(u8Test_data[j]==u8readdata[j])
printf("OK \n");
else
printf("ERROR \n");
}
}
else
printf(" I2C Read ERROR: \n");
SRAM_test();//FSMC
PCL_Test();//FSMC
}这样把IIC那部分函数拷贝过来运行就没问题 |
|