The purpose of having two DCT tables (DCT1 and DCT2)

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

cross mob
Anonymous
Not applicable

Hello Guys,

What is the purpose of having two DCT tables (DCT1 and DCT2) in the Flash memory? Why not just one?

Is it some kind of wear-levelling?

Thanks.

Oleg

0 Likes
1 Solution
Anonymous
Not applicable

Hi Oleg,

Having 2 DCTs is for reliability and memory optimizations. When changing something in the DCT, (because it is usualy written in flash), you can just re-write the change, you have to erase the full page of the DCT and writ it again, to do this, we can read the DCT in to ram and then erase DCT and write the updated version, but this means a waste of a RAM (at least 4k because of the DCT size) and also  a risk that if the system went down at this point (due to battery or any other reason), then you basically lost all your DCT data. The other solution is to write the DCT in another location with the new data and redem the previous one as outdated (some thing simillar to log file systems).

Hope this answers your question,

Regards,

Bassem

View solution in original post

1 Reply
Anonymous
Not applicable

Hi Oleg,

Having 2 DCTs is for reliability and memory optimizations. When changing something in the DCT, (because it is usualy written in flash), you can just re-write the change, you have to erase the full page of the DCT and writ it again, to do this, we can read the DCT in to ram and then erase DCT and write the updated version, but this means a waste of a RAM (at least 4k because of the DCT size) and also  a risk that if the system went down at this point (due to battery or any other reason), then you basically lost all your DCT data. The other solution is to write the DCT in another location with the new data and redem the previous one as outdated (some thing simillar to log file systems).

Hope this answers your question,

Regards,

Bassem