XEP100 flash的读写

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

XEP100 flash的读写

808 Views
kentsun
Contributor II

S912XEP100W1MAG无法读取P-flash:

 我这里直接读指针 ,读不出来,此cpu是特殊架构,不知道是怎么读的 ,这是16位 p-flash 地址已经超过寻址空间

1.bmp

 PFlashREAD(0x2C000);

XEP100的flash是不是不支持读写?能否帮忙提供下在XEP100上flash的读写函数。

0 Kudos
1 Reply

555 Views
dianabatrlova
NXP TechSupport
NXP TechSupport

Hi,

At first, I would like to point to you to the attached document about memory map of the S12XExx.

The Pflash contains 5 blocks. For example, the global address of the BLOCK3 0x70_0000 is related to logical address 0xC08000. I'm afraid your address is not related to any address in the Pflash blocks.

Also, please refer to the example code for the S12XEP100 (attached). There you can find the function for reading a word from global address.

//==============================================================================
//PFLASH_Read_Word_Global
//==============================================================================
unsigned int PFLASH_Read_Word(unsigned long int address)
{
unsigned int data16;
data16 = *(unsigned int *far)address;
return data16;
}

 

I believe it helps you.

Best Regards,

Diana

0 Kudos