Reading data from CFLASH (MPC5646C)

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

Reading data from CFLASH (MPC5646C)

跳至解决方案
2,611 次查看
ericg
Contributor II

I'm very new to Freescale and I have a Qorriva MPC5646C. I was able to include user data in a binary and flash it into CFLASH from address 0x00300000. I need to verify it and don't know how to do it. So, my question is:

 

1. How to read data from the address 0x00300000?

 

Thanks in advance.

标签 (1)
0 项奖励
回复
1 解答
2,458 次查看
ericg
Contributor II

Thanks for the helpful answer David. I've already solved it. The reason it wasn't working is that 0x00300000 is a reserved space and it was reading all 0xFF. After flashing user data in different sector and reading from different address space works. So, I'm not sure whether it is possible to use reserved space or not. Also, other ways of reading data from CFLASH solutions works just fine too. It is just like reading from any other memory. Here are the examples:

1. memcpy (test, (char*)(0x002E0000), sizeof(test));

2.  uint8_t *pointer;

     pointer = (uint8_t *) 0x002E0000;

     for(i = 0; i < sizeof(test); i++)

          test[i] = *pointer;

          pointer++;

     }



在原帖中查看解决方案

0 项奖励
回复
2 回复数
2,458 次查看
davidtosenovjan
NXP TechSupport
NXP TechSupport

vuint32_t read_data = 0;

read_data = *(vuint32_t*)(0x00300000);

2,459 次查看
ericg
Contributor II

Thanks for the helpful answer David. I've already solved it. The reason it wasn't working is that 0x00300000 is a reserved space and it was reading all 0xFF. After flashing user data in different sector and reading from different address space works. So, I'm not sure whether it is possible to use reserved space or not. Also, other ways of reading data from CFLASH solutions works just fine too. It is just like reading from any other memory. Here are the examples:

1. memcpy (test, (char*)(0x002E0000), sizeof(test));

2.  uint8_t *pointer;

     pointer = (uint8_t *) 0x002E0000;

     for(i = 0; i < sizeof(test); i++)

          test[i] = *pointer;

          pointer++;

     }



0 项奖励
回复