Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Chinmay
Level 1
Level 1
10 sign-ins First reply posted First like given

Hello,

I am trying to come up with a method to perform wear leveling in the Dflash EEPROM (AURIX TC265).

After going through user manual, example code and couple of other posts in this forum, the correct way of writing to Dflash is: (Please correct this if it is wrong)

1. Erase entire sector(8KB)

2. Enter Page mode with page address

3. Load data to be written

4. Write page/ write burst.

Repeat step 3 and 4 until needed amount of data is written to DFlash.

The data that I want to write to Dflash is not more than 32 bytes in total. So, I was looking for a technique to spread out these 32 bytes write in the logical sector (8192 bytes) itself every time I need to store a new dataset. Is this possible? Or am I limited to spread out my writes across sectors and not on page level, as erase command works only on sector level and not on page level?

 

Thanks,

Chinmay

 

0 Likes
1 Solution
µC_Wrangler
Employee
Employee
50 solutions authored 100 sign-ins 25 likes received

Hi Chinmay.  Yes, that's the general sequence.  You don't need to fill the whole sector at once; you can incrementally write pages until the sector is full.

The tricky part is avoiding the erase disturb effect and dealing with the possibility of wordline failures, as described in 10.8.3.1 Robust EEPROM Emulation on page 1000 of tc26xB_um_v1.3.pdf.  For example, it's not possible to have one set of static manufacturing data that is written once in DF0, and one set of dynamic data; all data must be periodically rewritten to avoid erase disturbs.

View solution in original post

1 Reply
µC_Wrangler
Employee
Employee
50 solutions authored 100 sign-ins 25 likes received

Hi Chinmay.  Yes, that's the general sequence.  You don't need to fill the whole sector at once; you can incrementally write pages until the sector is full.

The tricky part is avoiding the erase disturb effect and dealing with the possibility of wordline failures, as described in 10.8.3.1 Robust EEPROM Emulation on page 1000 of tc26xB_um_v1.3.pdf.  For example, it's not possible to have one set of static manufacturing data that is written once in DF0, and one set of dynamic data; all data must be periodically rewritten to avoid erase disturbs.