UMSATS / cdh-tsat

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

Error Correction Code (ECC) #18

Open GrahamDrive opened 5 months ago

GrahamDrive commented 5 months ago

Issue 1: Using the STM32L496RGT6 Error Correcting Code module

Overview: The STM32L496RGT6 has an Error Correcting code feature that can detect anomalies within flash memory and run an exception routine when detected. The goal of this task is to research this feature and if possible create a working demonstration of an example project using it.

Note: It may be difficult to write or test this feature as simulating a fault in the code can be difficult to produce.

Om-Sevak commented 5 months ago

Image

GrahamDrive commented 5 months ago

Interesting, do you think you would be able to write a test project that could try to simulate the ECC error with this method? Just have it send a message over serial to the PC or something from ECC interrupt?

DaighB commented 5 months ago

That makes some good sense! Josh & Andrii did some work on reading & writing the internal flash storage. Feel free to get in contact with them to discuss how to simulate this ECC error by writing to flash. It would be nice to have a program which purposefully flips a bit, let's the ECC correct it, then reads the flash page to demonstrate that single-bit correction works. Then that program could also purposefully flip 2 bits, and demonstrates how the ISR is invoked.