Related requirement
R-LIB-FSW-0002 - The bus shall allow communications between CDH and AODCS using SPI protocol.
Test Specification
Verify that flight software is able to operate the SPI bus.
Judge Criteria
Flight software is able to drive the SPI communication pins and transmit data using wrapper functions.
Test steps
Connect CDH and AODCS together using SPI.
Program the AODCS microcontroller to reply to SPI messages.
Program the CDH to broadcast SPI messages.
Connect the logic analyzer to the SPI bus.
Power on both boards, ensure that the transmitted data is visible on the logic analyzer trace. Ensure that the AODCS board correctly receives the transmitted message from CDH, and replies with the same message back.
Test results
As seen in this CDH test, the SPI communication protocol is functional. The SPI communication protocol is able to be driven with flight software, allowing for communication with AODCS. Flight software permits communication between CDH and AODCS using SPI.
Related Requirement
R-LIB-FSW-0005 - FSW shall permit operation of the radio transceiver using the RS-485 protocol.
Test Specification
Verify that flight software is able to drive the RS-485 communication protocol. In this test, we are using the star tracker as our secondary device as the transceiver has not arrived yet.
Judge Criteria
Flight software can drive the RS-485 communication pins and transmit data using wrapper functions. Data is correctly transmitted and received by CDH.
Test steps
Connect CDH and the star tracker together using RS-485.
Program the CDH to transmit a ping message to the star tracker.
Connect the logic analyzer to the RS-485 pins.
Power on both the CDH and the star tracker, ensure that the transmitted data is visible on the logic analyzer trace. Ensure that the star tracker board correctly receives and replies to the the transmitted message from CDH.
Related Requirements
R-LIB-FSW-0003 - FSW shall permit communication between the CDH and Power using provided fork of LibCSP.
R-LIB-FSW-0004 - FSW shall permit communication between the CDH and Payload using provided fork of LibCSP.
Test Specification
Verify that flight software allows communication between CDH and Power using the LibCSP network stack driven over CAN.
Judge Criteria
CDH binary compiles while integrating LibCSP.
Power binary compiles while integrating LibCSP.
Power accepts a client connection from CDH while operating a server socket.
CDH accepts a client connection from Power while operating a server socket.
CSP client task in CDH
CSP server task in CDH
Test steps:
Download the LibCSP fork from the LIBus Github repository.
Follow the compilation instructions provided in the LibCSP documentation to compile the fork of LibCSP for our microcontroller architecture.
project_path = "../.."
INCLUDES = f"{project_path}/Core/Inc,"
INCLUDES += "path\to\FreeRTOS-Kernel\include"
optimization_flags = "-O3"
CFLAGS = Wall -std=gnu11 {optimization_flags} -mcpu=cortex-m7 -mthumb -mfloat-abi=hard
python waf configure --toolchain=arm-none-eabi- --enable-can-socketcan --with-os=freertos --includes="{INCLUDES}"
Create a socket task in Power to accept client requests and transmissions from CDH.
Create a client task in Power to connect to CDH sockets and transmit a test packet.
Create a socket task in CDH to accept client requests and transmissions from Power.
Create a client task in CDH to connect to Power sockets and transmit a test packet.
Place a breakpoint after the connection is successfully opened in the Power server task.
Hitting this breakpoint means that the connection between Power and CDH has been successful, and there is a packet from CDH to read.
Place a breakpoint after the connection is successfully opened in the CDH server task.
Hitting this breakpoint means that the connection between Power and CDH has been successful, and there is a packet from Power to read.
CSP server task in Power
CSP client task in Power
Test results
The CDH software is able to compile with LibCSP included.
The Power software is able to compile with LibCSP included.
Power is able to accept communications from CDH.
CDH is able to accept communications from Power.
Related Requirement
R-LIB-FSW-0007 - FSW shall permit storage of configuration parameters within non-volatile storage.
Test Specification
Verify that flight software can collect and store configuration data in non-volatile storage. For an example test of this, store the CDH boot-count in non-volatile storage.
Judge Criteria
CDH stores configuration data in non-volatile storage. The boot count value is received and incremented by one; it is then successfully written to non-volatile storage.
Test steps
Program the CDH to create a file named BOOTCOUNT in the root directory in the file system.
On reset, read this file from non-volatile storage and parse the value. View the value in the debugger and note the result.
Program the CDH to increment this value by one, and then write this new value back to storage.
Reset the CDH. Read the boot count value, and ensure that the value has incremented by one compared to the value received in step 2.
Test results
The boot count value was successfully read, incremented, and written to non-volatile storage on reset of the CDH. This demonstrates that storage and use of configuration data is permitted by flight software.
Related Requirement
R-LIB-FSW-0013 - FSW shall permit the storage of telemetry data into non-volatile storage.
Test Specification
Verify that flight software can store received telemetry data into separate non-volatile storage locations.
Judge Criteria
CDH stores telemetry data in non-volatile storage. Telemetry data is separate based on the source ID of the data.
Test steps:
Program the CDH to create a telemetry queue of telemetry packets. The telemetry packet is a standardized struct.
Populate the queue with telemetry packets.
Ensure that the telemetry packets are properly stored into the corresponding files based off of the telemetry source ID.
Test results
Flight software was able to correctly store telemetry data into non-volatile storage.
Related Requirement
R-LIB-FSW-0021 - FSW shall implement a real-time operating system.
Test Specification
Verify that flight software can compile and execute with the FreeRTOS real-time operating system.
Judge Criteria
Flight software can compile including FreeRTOS library.
Flight software can create and execute FreeRTOS tasks.
Test steps:
Program the CDH to create multiple FreeRTOS tasks. For this test, we will create 4 tasks - vCSPServerTask, vCSPClientTask, vFSManagerTask, and vTestSPITask.
Place a breakpoint in the infinite loop of each task.
Ensure that each task properly reaches the breakpoint.
vTestSPITask breakpointed
vTestCSPServerTask breakpointed
vFSManagerTask breakpointed
vTestCSPClientTask breakpointed
Test results
Flight software successfully integrated FreeRTOS as the real-time operating system.