Cypress技术william hill官网
直播中

张一珠

7年用户 162经验值
私信 关注
[问答]

请问Flash是哪一块emaulated EEPROM

我知道在PSoC 4的Flash模拟EEPROM,Flash是哪一块emaulated EEPROM呢?
它是否像PSoC 1一样可配置?我想有EEPROM是emaulated EEPROM的最后一块。
谢谢,
-阿南德

以上来自于百度翻译


     以下为原文
  I know the flash in PSoC 4 is emulated as EEPROM, which block of Flash is emaulated as EEPROM?
    Is it is configurable as in PSoC 1 ? I would like to have the last block of EEPROM to be emaulated as EEPROM.
    Thanks,
    -Anandh

回帖(8)

王琳

2019-1-18 10:17:45
EEEPROM很容易使用:您只需在Flash中定义一个内存区域(使用“const”指令),并将该区域的地址和大小写入写入函数。仿真EEPROM用户模块没有可配置的参数,所有的操作都是通过API完成的。
鲍勃

以上来自于百度翻译


     以下为原文
  The EEEProm is quite easy to use: you just define an area of memory in flash (using the "const" directive) and give the address and size of the area to the write-function. The Emulated EEProm usermodule has no configurable parameters, everything is done via the APIs.
     
    Bob 
举报

杨军

2019-1-18 10:29:11
如果你想要绝对地址,我想鲍伯是对的。
对于EEPROM的位置,您必须只使用GCC指针。
将其数组化为绝对地址。
不同的ARM编译器有不同的处理方式。
www. kel.com /Sputp/DOCS/829HTM GCC,Realview
CyPur.com/Keil手臂
问候,Dana。

以上来自于百度翻译


     以下为原文
  Bob is correct I think, if you want an absolute address
    location for EEPROM you would have to use pointer only for GCC
    on to effect array it to an absolute address.
     
    Different ARM compilers handle this differently.
     
    www.keil.com/support/docs/2829.htm     GCC, Realview
     
    www.cypress.com/      Keil ARM
     
    Regards, Dana.
举报

杨军

2019-1-18 10:36:54
鲍伯的问题。
使用指针方法,编译得足够智能,以保持跟踪。
在所有的绝对地址使用?知道有多少内存
留出EEPROM的使用,以及它在哪里,所以它不映射
在EEPROM上用其他东西?
我现在不太确定,只要使用指针就行了。我仍然认为
仍然需要保留一个绝对指令所需的内存。
你的想法?
问候,Dana。

以上来自于百度翻译


     以下为原文
  Question for Bob.
     
    Using pointer approach, is compile smart enough to keep track
    of all the absolute addresses used ? To know how much memory
    to set aside for EEPROM use, and where it is so it does not map
    over the EEPROM with other stuff ?
     
    I am not so sure now just using a pointer will work. I still think one
    still needs to set aside memory needed with an absolute directive.
     
    Your thoughts ?
     
    Regards, Dana.
举报

王琳

2019-1-18 10:56:15
Dana
为了我这么多宣传的“可读性”,我总是使用不同的方法。
类似的东西
定义EEEPROME 1001
CONST UTEN8 EEEPROMARE [ EEEPROMESIZE ];

const结构SmiyEePROM {UIT8编程;UTI8数据[EEPROMESSHOMES ];} MyEEEProm;
以后在代码中使用
结果= EEEPROFIX写(MyDATA,EEEPromArea,EEEPROMESIZE);

结果=EEEPROMETHORD(MyDATA,(UTIN 8*)(&;结构SMYEEEPROM),SIZEOF(StReSmieEePROM));
这样即使阵列结构可能与写入单个元素在一定的结构可以进行。
自由伴随着责任:DoototoRead代码!!!!
鲍伯(只希望能少打字)

以上来自于百度翻译


     以下为原文
  Dana,
    for the sake of my so much propagated "Readability" I would always use a different approach.
    something like
    #define EEEPROMSIZE 1001
    const uint8 EEEPromArea[EEEPROMSIZE];
     
    or
     
    const struct sMyEEEProm { uint8 IsProgrammed; uint8 Data[EEPROMSIZE];} MyEEEProm;
    and later using in the code
     
    Result = EEEProm_Write(MyData,EEEPromArea,EEEPROMSIZE);
    or
    Result = EEEProm_Write(MyData,(uint8 *)(& struct sMyEEEProm),sizeof(struct sMyEEEProm));
     
    This way even arrays of a struct are possible with writes to a single element within a certain struct can be performed.
    With freedom comes responsibility: DO NOT OVERWRITE YOUR CODE!!!
     
    Bob (Hoping for only few typos)
举报

更多回帖

发帖
×
20
完善资料,
赚取积分