C12 Embedded systems in MicroPython and C · Practice
Keeping data through power-off: flash, wear and safe records
Problems dealt one at a time, with new numbers every time. The kinds you miss come back more often, and you can keep going as long as you like.
0 solved
0 in a row
0 of 8 kinds solid
Check
A device erases a flash sector rated for 10000 cycles every time it saves, 1 times a day.
(a)
How long does the sector last?
(b)
In years?
Check
Records of 64 bytes are appended to a log over 8 sectors of 1024 bytes, each rated for 10000 erases; the device saves 1440 times a day.
(a)
How many records fit in a sector?
(b)
How long does the flash last?
Check
A sector erase takes 50 ms at 5 mA from 3.3 V; the system works down to 2.8 V.
(a)
How much energy does the erase need?
Write units the way you normally would: 1.5 mJ, 1500 µJ and 0.0015 J are the same answer.
(b)
What hold-up capacitance supplies it?
Check
A logger writes 16-byte records 10 times a second into a 1 MB circular log of flash rated for 100000 erases.
(a)
How long does the log take to fill once?
(b)
How long until the flash wears out, each sector erased once per lap?
Check
A 64 KB image is written to flash in 256-byte pages taking 2 ms each, after erasing 16 KB sectors that take 20 ms each.
(a)
How long does the whole update take?
Write units the way you normally would: 1.5 ms, 1500 µs and 0.0015 s are the same answer.
(b)
What share of it is erasing?
Check
Days of life erasing a 3000-cycle sector 24 times a day?
Check
How many 12-byte records fit in a 2048-byte sector?
Check
Hold-up capacitor for 25 ms at 10 mA from 3.3 V down to 2.2 V?
Write units the way you normally would: 1.5 µF, 1500 nF and 0.0015 mF are the same answer.
A kind of problem counts as solid once you've got it right on the first try twice in a row. Back to the lesson · Practice every topic in C12