- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
We understand that PSoC4 Em_EEPROM component uses internal flash.
How long does it take to read the written variable?
// EEPROM Rad Function :
eepromReturnValue = Em_EEPROM_Read(i*4+12288, wrkbuf, 4);
//The above 'i' is up to 1024 in the for-loop
//Amount of data : 4Byte x 1024
It takes 30 seconds to complete the above process.
I understand that it takes time to write variables,
Does it take time to read variables too?
Regards,
Masashi
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
On our side, created the sample project to measure reading Em_EEPROM with CY8KIT-042.
the result was:
512bytes (4bytes x 128) read took 78ms
you case would be 4bytes x 1024 = 4KB read, so the estimation read time with our project would be calculated as "(1024/128) x 78ms = 624ms".
4bytes read x 1024 --> 624ms (estimation).
Additionally, you mentioned I2C, but there is no I2C in your project.
Could you please clarify why you mentioned I2C?
thank you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
Em_EEPROM_Read API doesn’t just read variable.
It also calculates checksum for the data read and checks in the redundant memory.
If the checksum is not correct it may do a write from redundant memory to ERPROM address.
So, it is suspected that may be taking more time.
Does it always take 30 seconds?
Thank you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you for your answer.
We understood that E_EEPROM API is not just read processing.
We will confirm to see if it always takes 30 seconds.
Currently, it takes 29 ms for one reading.
30 sec / 1024 times = 29ms
Generally do you know the time to read once when using this Em_EEPROM_Read API?
Regards,
Masashi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
We confirmed the datasheet again.
However, We don't use functtion of Redundant Copy.
So I think that checksum will not be rewritten.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
We don't have data for time taken by API, and we think 29ms for one reading would be huge time.
Then, I would like to clarify following.
1) How do you measure the time? Are you using toggling pin?
2) is there any other code called between two Em_EEPROM reads?
And also, if you don't use toggling pin, could you please try to measure with toggling pin as below?
This test will be to understand if the checksum is failing and a write is called while reading.
i) Drag and drop a Pin on TopDesign and configure the pin as software and strong drive.
ii) Build the project
iii) Add "toggle a pin" code in “CheckCrcAndCopy(uint32 startAddr, uint32 dstAddr, uint32 rowOffset, uint32 numBytes, cy_stc_eeprom_context_t * context)” function. This function is in cy_em_eeprom.c. (Just for example, please see the line 1245 and 1248)
iv) Program the board.
Note that you should not do any modification to TopDesign or pin assignment after writing code for toggling. If you do that, the project with regenerate and the code for toggling pin will disappear. You have to rewrite the code and program the project in such case.
Thank you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
We confirmed the time in the way you suggested.
Regarding the matter of time measurement,
We toggled the pin and tried it, but the result was the same time.
And no other processing is performed during Em_EEPROM_Read API processing.
1.
On reading of EmEEPROM, How long will it take to read 1byte?
Is Read time different when reading 1 byte and reading 4 bytes.
2.
About the read function,
The read time of Flash ROM(Em_EEPROM) is the time from when the read function is called to when it returns
Is this recognition correct?
Or is it necessary to wait some time after the read function is called and returned?
Regards,
Masashi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Just confirmation...before answering the additional questions.
I would like to understand whether the pin added for debug was toggled, or not.
Did you confirm this point?
thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I think my last question/explanation was not enough... I am sorry about this.
What we would like to understand is whether the checksum is failing and a write is called while reading with following code change.
Could you please try this check on your side?
thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I will confirm for your proposal.
However, I would like to confirm the following points.
Do you think that you are in the writing process within this loop despite disabling Redundant Copy functionality?
Can you reproduce this problem that flash(EmEEPROM) read time is long?
If it can not be reproduced, we would like to confirm the project.
Regards,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Please let us arrange the problems.
(a)
Reading from this EmEEPROM(Flash ROM) is the same as reading the const value in the code written in the normal program area.
Is recognition of the above (a) correct? .
(b)
To read form EmEEPROM, internally mapped Flash ROM value will be read, We think that it can read without taking 1 us per byte in terms of time.
Is recognition of the above (b) correct? .
However, we confirmed by reading only EEPROM by 4 bytes and 1024 times, but it was a time-consuming situation far beyond the lead from address-mapped area. That is why it is a question from the beginning.
So we usually ask how long it will take.
Even if that time is 3 seconds, is not it as late as Flash ROM access time?
I want to know the normal value.
If we can know the normal time, we can judge that this usage can not be done.
Or it becomes clearer that our usage is wrong.
If this is unknown, we do not know how to deal with this problem.
Regards,
Masashi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I created a Read/Write project to EEPROM and confirmed it.
After 2048 bytes are written three times, 4 bytes are read out 1024 times.
Writing is about 5 seconds (Blue LED Lighting up)
Reading is about 10 seconds (Green LED Lighting up)
After 2048 bytes are written three times, 2048 bytes are written
Read three times.
Writing is about 5 seconds
Reading is less than about 1 second
It will be the above.
Therefore, I think that it takes a long time to read 4 bytes and transfer data by I2C.
Regards,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
On our side, created the sample project to measure reading Em_EEPROM with CY8KIT-042.
the result was:
512bytes (4bytes x 128) read took 78ms
you case would be 4bytes x 1024 = 4KB read, so the estimation read time with our project would be calculated as "(1024/128) x 78ms = 624ms".
4bytes read x 1024 --> 624ms (estimation).
Additionally, you mentioned I2C, but there is no I2C in your project.
Could you please clarify why you mentioned I2C?
thank you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you for your consideration in the sample project.
We will confirm for this project sent from you.
Since it means that it takes more time to add the process of sending data read from EEPROM with I2C, forget about the discussion of I2C.
Regards,