2024-11-07 07:06 AM - last edited on 2024-11-07 07:34 AM by Andrew Neil
Hi All,
Please I need some explenations regarding EEPROM (with SPI interface) .The SPI is working I can see the signals on my LA ,
However I have some very basic questions regarding the EEPROM 256Kx8 page size according to the datasheet is 64 bytes per page .My questions are reality very basic however googling did not realy help .
1- does the 16 bit addresses start at 0x0000 and then incerement by 1 so next will be 0x0001 and so on until byte 63 which is then the address 0x03F
2- does the 2nd page then start at 0x0040 ? and at 0x00FF I would be at the end of page 4 ?
3- is there some visual repersentation that I can view to see this memory map clearly in my head ?
4- If I write 10 bytes in one go start at address x do I need to have some delay between the write of the bytes or can I just clock then out one after the other the datasheet mention something about 5mSec write delay does this delay means beween bytes?
I applogize for these elementary questions however it is my first time working with an EEPROM
Any help hints would be appreciated
Regards
Solved! Go to Solution.
2024-11-09 09:14 PM
Here are the link to the block post about EEPROM writes and the address /page issues
https://controllerstech.com/eeprom-and-stm32/
2024-11-07 07:09 AM
Hello,
You didn't mention what EEPROM part number you are referring to?
2024-11-07 07:27 AM
HI Sorry for that it is a P25C256F from PUYA semiconductor
http://www.easygood.hk/Pro_show.asp?id=73
Thanks again for any help
2024-11-07 07:38 AM
They seem to have forgotten to link to the datasheet from that page!
so Google finds it here:
That should answer your questions
2024-11-08 08:34 PM
Hi all,
Dear Andrew Thank you that sure helped in many ways,
I managed to sort out how the addreses and page boundries are formulated and I can write a number of bytes(10) to a certain address location and read them back , some progress made .
I noticed and as mentioned in the Datasheet when writing to a page it is possible to start at the first address of the page and write 64 bytes to that page if more is written then the internal counter rolls back to the start of that particular page and the previous data is over written.
My lack of of knowldge is letting me down, I am unsure how to detect in the code that I need to shift one page up if 64 bytes are reached, sorry if my writing makes no sense.
I need to write about 320 bytes of data which is in my understanding is 5 pages of the EEPROM Memory.
Any code examples or advise will be highly appreciated .
Best Regards Pje
2024-11-08 11:58 PM
Why yoou dont use internal Flash emulation EEPROM in F1?
2024-11-09 12:09 AM - edited 2024-11-09 12:17 AM
Simply because I am not the person who designed the Hardware
Thanks for your question
I found a tutorial that deal with my issue directly from Controller Tech, Thanks in any case for the people who tried to help me
2024-11-09 01:36 AM
@Pje wrote:I found a tutorial that deal with my issue directly from Controller Tech, Thanks in any case for the people who tried to help me
Please give a link, and/or describe how you resolved the issue, then mark that post as the solution - that way, future readers can learn from you:
https://community.st.com/t5/community-guidelines/help-others-to-solve-their-issues/ta-p/575256
2024-11-09 06:24 AM
Question isnt who design hardware, but if your software can use internal flash for store required info or your design require external hw . If A is right simply dont solder B ...
2024-11-09 09:14 PM
Here are the link to the block post about EEPROM writes and the address /page issues
https://controllerstech.com/eeprom-and-stm32/