How to access test flash memory in MPC5643L?

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

How to access test flash memory in MPC5643L?

760 次查看
rajakumaranazha
Contributor II

Hello,

Could anyone help me to access the test flash memory in MPC5643L?

I would like to configure the self test analog watchdog register for ADC for which the calibration values are available in test flash memory.

I have tried the macro "READ_FROM_TF" from the "MPC5643L.h" file with below code. But the macro has not executed successfully, instead the application goes to unknown location.

static uint32 ReadFromTestFlash(void)
{
uint32 RetVal, SysStatus1, SysStatus2;
SysStatus1 = *((uint32*)(0xC3FD8000UL ));
//Set TFE bit
*((uint32*)(0xC3FD8000UL + 0x0024UL)) |= 0x00000004UL;
SysStatus2 = *((uint32*)(0xC3FD8000UL + 0x0024UL));
READ_FROM_TF(&TestFalshBuf[0], RetVal);
//Reset TFE bit
*((uint32*)(0xC3FD8000UL + 0x0024UL)) &= ~0x00000004UL;
}

0 项奖励
1 回复

570 次查看
davidtosenovjan
NXP TechSupport
NXP TechSupport

If you see following example, in the main function you see how to access test flash

Example MPC5643L TSENS Temperature_calculation CW210

Access with READ_FROM_TF macro I have tried as well and I can give you a example if you want, but it is not recommended procedure.