UMSATS / cdh-tsat

Contains software for the Command and Data Handling (CDH) board.
https://www.umsats.ca/
10 stars 4 forks source link

Service Telemetry Data #24

Open GrahamDrive opened 4 months ago

GrahamDrive commented 4 months ago

Servicing of Telemetry Data

Problem Statement

Currently, we have no implemented code to deal with servicing our telemetry data. As seen below in the code snippet the telemetry handler task only dequeues a packet from its queue and does nothing with it. https://github.com/UMSATS/cdh-tsat6/blob/8382f809585326065f5d2c2a5a95bf2da242647b/cdh-tsat6-stm32project-boardV1/Core/Src/main.c#L1173-L1188

Desired Function

We want this task to be able to take the telemetry data and store it in our external memory. This would most likely be done by writing a handler script that would take the data and use the given memory device driver to store the information in a section of memory.

Suggested Start

I recommend familiarizing yourself with the memory drivers for both the Flash and MRAM devices. We most likely won't be using both to store the telemetry data but it would be good to know how both function.

A memory map may also be useful to determine where you want to store certain data, for now we can almost throw it anywhere just to test it, but when we are developing the full memory map @DaighB and @GrahamDrive will assist with sectioning off an address space for the data.

Koloss0 commented 3 weeks ago

The telemetry will be stored into a small buffer in program memory, and eventually flushed to external flash when it reaches full capacity.

Here is the format of each entry into the array. image

Create a buffer of 256 bytes. Then, when telemetry is being processed, load the data into the buffer in this format. If the buffer becomes full, dump the contents of the buffer into flash memory.