mpc5634在对eeprom操作是无法写入
想对mpc5634的eeprom实现简单的读取写入,可是对相应寄存器配置后无法写入,不知道是寄存器配置错误还是有别的寄存器没有配置,或者还有什么时序。。。。。。求大神指点!!!#include "ee_emulation.h"
#define _C90FL_TYPES_H_ /* Just to avoid compiler warnings */
#undef NULL_CALLBACK /*Cancel the macro definition*/
#include "ssd_c90fl.h"
#include "ee_demo.h"
#include "mpc563m.h"
#define WRITE32(address, value) (*(VUINT32*)(address) = (value))
#define READ32(address) ((UINT32)(*(VUINT32*)(address)))
#define block1_data1 0x000E0008
#define block1_data2 0x000E0010
#define block1_data3 0x000E0020
#define block1_data4 0x000E0030
#define block1_data5 0x000E0040
#define c90flRegBase 0xC3FB0000
UINT32 suspendState;
UINT32 temp_MSR;
UINT32 enable_MSR;
UINT32 plat_status;
UINT32 plat_status_bk;
VUINT32 returnCode; /* return code*/
UINT32 main(void)
{
WRITE32(c3fb0008,0xB2B22222);
WRITE32(c3fb0008,0xB2B22200);
returnCode = READ32(block1_data2); //第一次读取block1_data2地址的eeprom内容
WRITE32(block1_data2,0x0001); //在地址为block1_data2的eeprom内写入0x0001
returnCode = READ32(block1_data2); //第二次读取block1_data2地址的eeprom内容
while(1);
}