For those who don't know what RAID is , its basically a redundancy system in which a parity is created so the data can be rebuilt if a storage device suffers a failure , In my project 1 out of 4 flashes can fail and still have the full data available .
The way it works is that three blocks in each stripe store actual data, while the fourth stores XOR parity.
the parity is calculated using a simple formula P = A ^ B ^ C ( all 3 data blocks will be XOR'ed together)
so in case the A block fails , the data on A block can be rebuilt using the other data blocks and the parity block
A = P ^ B ^ C.
The parity location rotates between all 4 flashes, so data can be recovered regardless of which flash becomes unavailable.
But if more than one flash fails then the data cannot be rebuilt due to insufficient parity.
if a failure is detected write command is disabled and it goes into degraded mode with only read command available
The current version does not rebuild the data on the flash instead its rebuilt only in the stm32 RAM when requested and it can only accept data entered through the UART interface .
The MCU used is STM32F401RE
The flash used is W25Q64FV by winbond
It was a fun challenge making this project , learnt a lot and coded most of the stuff like read, write clear block drivers for the flashes by using SPI commands myself , I struggled a bit when it came to linking all 4 flashes using logical memory address and implementing the parity rebuild . So i did end up utilizing AI for that part as I wanted to complete this project to put it on my resume.
Here is my github repository if u want to have a better look at it will all the explanation : GITHUB Repo
If any memory or storage firmware engineers are reading this, I'd really appreciate any feedback or advice on the project. I'm trying to get into companies like Micron, Western Digital and SanDisk, so any suggestions on what I should improve or learn next would be helpful.
Thank You.