SdFat
SdFat copied to clipboard
SDInfo sketch - wrong manufacturing date
Hi! I used SDFat v2.1.0 and example sketch SDInfo. There are some problem with decoding card manufacturing date. Android apps SD Insight and SD Tools shows correct dates - 02/2021 & 05/2019. SDInfo sketch shows 02/2015 & 05/2013.
.
Looks like SdFat decodes the year as BCD but it's binary.
Could you edit SdIinfo.ino and change line 57 from this:
cout << (2000 + m_cid.mdt_year_low + 10 * m_cid.mdt_year_high) << endl;
to this:
cout << (2000 + m_cid.mdt_year_low + 16* m_cid.mdt_year_high) << endl;
Let me know if this fixes the problem.
cout << (2000 + m_cid.mdt_year_low + 16* m_cid.mdt_year_high) << endl;
Let me know if this fixes the problem.
This code fixes manufacturing date. Thank you!
Thank you. This fix will be in the next version. It may be a while since I have a number of other changes in beta-test.