USST-RADSAT-SK / software-and-command

Code and Documentation for USST’s RADSAT-SK in their first Canadian CubeSat Project
8 stars 0 forks source link

Framework/implement FRAM storage #213

Closed w-moretti closed 1 year ago

w-moretti commented 2 years ago

Added implementation of the FRAM storage in the FileTransferService. This service is no longer using volatile memory to store its data frames.

In this implementation, the FRAM design is as follows:

By testing, it seems that the unused FRAM storage is set by default to 255. This can cause an issue if the software reads an FRAM address for the first time and interprets a frame size of 255. Starting from address 0x04, a one-time write has been performed on 200 (current MAX_FRAME_COUNT) data blocks of 236 bytes to set the FRAM content to 0. To accomplish this, a reset function (fileTransferReset) has been added to the FileTransferService that clears all data blocks in FRAM, but also resets the cursors to their default values (write=1, read=0).

TheDopplerEffects commented 2 years ago

Authorship fixed.

w-moretti commented 2 years ago

We could get the cursor values directly from FRAM and get rid of frameReadCursor & frameWriteCursor. FRAM has a VERY high write/read cycles endurance, so no problem there.

w-moretti commented 2 years ago

Changes have been done and PR description has been updated.