CTS-SAT-1-OBC-Firmware
Loading...
Searching...
No Matches
flash_benchmark.h File Reference
#include <stdint.h>
Include dependency graph for flash_benchmark.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

uint8_t FLASH_benchmark_erase_write_read (uint8_t chip_num, uint32_t test_data_address, uint16_t test_data_length, char *response_str, uint16_t response_str_len)
 Benchmarks the erase/read/write operations on the flash memory module.
 

Function Documentation

◆ FLASH_benchmark_erase_write_read()

uint8_t FLASH_benchmark_erase_write_read ( uint8_t chip_num,
uint32_t test_data_address,
uint16_t test_data_length,
char * response_str,
uint16_t response_str_len )

Benchmarks the erase/read/write operations on the flash memory module.

Parameters
chip_numChip number to use.
test_data_addressAddress to erase, write, and then read back from.
test_data_lengthMust be <= 512. Otherwise, the verification will fail.
response_str
response_str_len
Returns
0 on success. 1 if erase failed. 2 if write failed. 3 if read failed. 4 if verify failed.

This function will erase the flash memory, write test data to it, read it back, and verify the read data. The test data is a sequence of bytes from 0 to 255. The response_str is valid whether or not there are errors.

Here is the call graph for this function:
Here is the caller graph for this function: