## 4 Discussion
### Mission Operations Issues and Status
#### 4.2.3 SD Card and Magnetometer Readings Failure  
The failures in reading the SD card and the magnetometer were caused by the controller board, which includes a single PIC microcontroller. The same PIC is used to read the telemetries of the 12 solar panels (voltage, current and temperature) that are also used for attitude determination purposes. This solution has been followed in order to synchronize the readings of all the ADS telemetries. However, managing so many devices with a single PIC strained the available hardware resources of the microcontroller. The PIC did not have in-built hardware support for all the data buses that it was required to operate simultaneously. Thus, I2C communication with the OBC was implemented making use of the in-built hardware in the microcontroller, while SPI communication with the sensors and the SD card was implemented in software.  
Solar panel and magnetometer board ADCs are sequentially polled to keep their readings synchronized. The acquired data are either stored on the SD card or directly transferred to the OBC for near real-time downlink. When implementing the SPI communication protocol entirely in software, the timing of the clock and the data signals needs to be maintained in order to keep the system operational. Changes in the timing of these signals turned out to be critical when operating the sensor polling sequence, and have ultimately caused the entire SPI bus to suffer partial or complete outages for prolonged periods of time. The changes in this timing could have been caused by either radiation effects, or by changes in temperature of the PIC and its local oscillator. Even though all of the ADS devices have been connected to a single SPI data bus, a propagation of a hardware failure of one of these devices can be ruled out because the devices have been isolated from each other.  
The SD card failed after the first test during the LEOP phase with no possibility of recovering it later. The magnetometer could be read only once during the LEOP phase, and again after 4 March 2019. Between 4 and 17 March 2019, the magnetometer readings operated nominally in the real-time mode that did not make use of the SD card. However, operation in real-time mode means that the magnetometer could only be operated when the satellite was passing over the Kyutech ground station.  
Only a power cycle of the system could restore the ADS operation, which was confirmed during ground tests. However, because the EPS and the ADS controller boards have not been designed to be powered off once the satellite began operating, this solution cannot be implemented in-orbit. All other subsystems can be power cycled, including all the payloads, both COMMS boards, and the OBC board. Even though the EEPROM in the OBC PIC has encountered errors during operation, the system has resumed nominal operations after a power cycle. In the case of the payloads, the ECU and MM controllers are kept off most of the time, and only receive power when an experiment is scheduled for execution. No errors have been encountered in these microcontrollers since the launch. Based on this microcontroller operation evidence, the lack of power cycle capability in the EPS and ADS boards made the microcontrollers of these subsystems more susceptible to failure, and limited the number of means to recover them.