This Question is Possibly Answered

1 "correct" answer available (4 pts) 2 "helpful" answers available (2 pts)
784 Views 4 Replies Last post: Jul 14, 2009 1:29 AM by FrankL RSS
gsrahul Newbie 3 posts since
Jul 13, 2009
Currently Being Moderated

Jul 13, 2009 12:55 AM

EEPROM in R32C/100

Hi,

    I am not able to read the data which i have written earlier to the EEPROM location.bit erros are occuring

Can any one give the sample code for the same.

Tags: r32c
FrankL Apprentice 1,100 posts since
Mar 16, 2009
Currently Being Moderated
Jul 13, 2009 1:36 AM in response to: gsrahul
Re: EEPROM in R32C/100

Which device do you have exactly?

Do you really have a device with on-chip EEPROM emulation data flash?

What does bit error mean?

Which address do you write to?

FrankL Apprentice 1,100 posts since
Mar 16, 2009
Currently Being Moderated
Jul 14, 2009 1:29 AM in response to: gsrahul
Re: EEPROM in R32C/100

Sorry, but your code has one big and one small problem.

The big problem is that you try to erase byte wise. R32C can NOT erase byte wise, but it can erase only complete blocks of 32 byte.So erase instructions to 0x62023, 0x62025 or 0x62027 all erase the same block 1. Try reading the data of 0x62023 after you erase 0x62025. It should be gone.

 

The small problem is that erase should be done using the highest even address in one block (see erase flow chart in the manual). You erase using odd addresses inside a block. I know that also in the past for flash erase worked by writing to more or less any address inside a block. But it would be better to comply to the manual and erase a block using its highest even address (i.e. address 0x6201E for the first 32 byte block, 0x6203E for the second block).

More Like This

  • Retrieving data ...

Bookmarked By (0)