stm32 flash读取问题
时间:10-02
整理:3721RD
点击:
nsigned short int Flash_Read_Double(void)
{
unsigned short int Date_Read;
unsigned short int Date_Store;
unsigned short int j;
for(j=0;j<100;j++)
{
Date_Read = *((unsigned short int*)(0x08000000+0x400*127+2*j));
}
// Date_Store = Date_Read;
return Date_Read;
}
刚开始使用32flash!这是flash读取函数。
发现把函数返回值类型从unsigned short int 改为double,读取就出问题。
求大神帮忙
{
unsigned short int Date_Read;
unsigned short int Date_Store;
unsigned short int j;
for(j=0;j<100;j++)
{
Date_Read = *((unsigned short int*)(0x08000000+0x400*127+2*j));
}
// Date_Store = Date_Read;
return Date_Read;
}
刚开始使用32flash!这是flash读取函数。
发现把函数返回值类型从unsigned short int 改为double,读取就出问题。
求大神帮忙
是不是因为int型和double型的编码不同,导致同一种二进制代码以int型输出时和double型输出时不一样了吧