Description

We are using flash memory to store telemetry. We are using the SST26VF064BT-104I/SM 64MBit/8Mbyte QSPI flash from microchip.

Datasheet

Tasks

Notes

Space for research notes, open questions, progress logs

March 1st 2025

Read through data sheet going up to chapter 5 which included the main operations of the flash chip and the commands that can be sent through SPI and SQI. Ended up making notes (if these notes are desired, let me know as they are currently on a local Obsidian markdown document) on all the commands and the specifics for all the commands excluding the protection register commands. My goal is to now get read and writing functional first before going into the protection registers as it may not be necessary depending on how we will be using the flash memory. I was also able to begin developing the code for the following functions (I’m currently setting it up like a c library so we can use it later easily).

#ifdef F_ERROR_CHECK
bool validAddr(uint32_t addr);
#endif

extern SPI_HandleTypeDef hspi1;
extern DMA_HandleTypeDef hdma_spi1_tx;

uint32_t f_read(uint32_t addr, uint8_t* buff, uint32_t num_bytes);

uint32_t f_writeEnable(void);
uint32_t f_writeDisable(void);
uint32_t f_writeStatusConf(uint8_t status_byte, uint8_t conf_byte);
uint32_t f_writePage(uint32_t addr, uint8_t* buff);

uint32_t f_eraseChip(void);
uint32_t f_eraseBlock(uint32_t addr);
uint32_t f_eraseSector(uint32_t addr);

The next steps will be setting up a testing regime and begin testing with the obc board. Unfortunately, I wasn’t able to get to that point today as I was helping Boris debug and get console output working. The result of which can be seen in the new document: Setting up UART to get the STM32 to print to your console.

March 8, 2025

Switched prescaler for SPI1 to 256 to set the baud rate to 62.5 KBits/s, switched NSSP Mode to disable when on hardware NSS signal and then switched to software NSS signal (external GPIO controller).

The following images show an issue where the CS line never gets pulled low and is stuck at high. Additionally, the CLK and MOSI lines have extremely low rise/fall times.

image.png

Questions