Paparazzi UAS
v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
|
Persistent settings low level flash routines stm32. More...
#include "modules/core/settings.h"
#include <libopencm3/stm32/flash.h>
#include <libopencm3/stm32/crc.h>
#include <libopencm3/stm32/dbgmcu.h>
Go to the source code of this file.
Data Structures | |
struct | FlashInfo |
Macros | |
#define | FLASH_BEGIN 0x08000000 |
#define | FSIZ 8 |
#define | FCHK 4 |
Functions | |
static uint32_t | pflash_checksum (uint32_t ptr, uint32_t size) |
static int32_t | flash_detect (struct FlashInfo *flash) |
static int32_t | pflash_program_bytes (struct FlashInfo *flash, uint32_t src, uint32_t size, uint32_t chksum) |
static int32_t | pflash_erase (struct FlashInfo *flash) |
int32_t | persistent_write (void *ptr, uint32_t size) |
int32_t | persistent_read (void *ptr, uint32_t size) |
int32_t | persistent_clear (void) |
Persistent settings low level flash routines stm32.
data flash_addr data_size flash_end - FSIZ checksum flash_end - FCHK
STM32: minimum write size 2 bytes, endurance 10k cycles, max sector erase time 40ms, max prog time 70us per 2 bytes
Definition in file settings_arch.c.
struct FlashInfo |
#define FCHK 4 |
Definition at line 64 of file settings_arch.c.
#define FLASH_BEGIN 0x08000000 |
Definition at line 62 of file settings_arch.c.
#define FSIZ 8 |
Definition at line 63 of file settings_arch.c.
Definition at line 110 of file settings_arch.c.
References FlashInfo::addr, FLASH_BEGIN, FlashInfo::page_nr, FlashInfo::page_size, and FlashInfo::total_size.
Referenced by persistent_clear(), persistent_read(), and persistent_write().
int32_t persistent_clear | ( | void | ) |
Definition at line 314 of file settings_arch.c.
References flash_detect(), and pflash_erase().
Definition at line 290 of file settings_arch.c.
References FlashInfo::addr, FCHK, flash_detect(), FSIZ, FlashInfo::page_size, and pflash_checksum().
Definition at line 278 of file settings_arch.c.
References flash_detect(), FSIZ, FlashInfo::page_size, pflash_checksum(), and pflash_program_bytes().
Definition at line 67 of file settings_arch.c.
Referenced by persistent_read(), and persistent_write().
Definition at line 213 of file settings_arch.c.
References FlashInfo::addr, FlashInfo::page_nr, and FlashInfo::page_size.
Referenced by persistent_clear(), and pflash_program_bytes().
|
static |
Definition at line 236 of file settings_arch.c.
References FlashInfo::addr, FCHK, FSIZ, FlashInfo::page_size, and pflash_erase().
Referenced by persistent_write().