miniFOC 1.0.3
This open-source project aims to accomplish a FOC(Field Oriented Control) scheme that is operatable with minimum costs in China.
Functions
flash.h File Reference

this is the header file of flash.c. More...

Go to the source code of this file.

Functions

void flash_write_parameters (void)
 program all parameters to flash More...
 
void flash_read_parameters (void)
 read all parameters from flash More...
 
void flash_erase_page (void)
 erase flash page in last sector More...
 
void flash_program_word (unsigned int addr, unsigned int *data, unsigned char counter)
 program flash word to address More...
 
unsigned int flash_read_word (unsigned int addr)
 read flash word from address More...
 

Detailed Description

this is the header file of flash.c.

Author
Lao·Zhu
Version
V1.0.1
Date
10. October 2021

Definition in file flash.h.

Function Documentation

◆ flash_erase_page()

void flash_erase_page ( void  )

erase flash page in last sector

Definition at line 76 of file flash.c.

References FMC_WRITE_START_ADDR.

Referenced by flash_write_parameters().

◆ flash_program_word()

void flash_program_word ( unsigned int  addr,
unsigned int *  data,
unsigned char  counter 
)

program flash word to address

Parameters
[in]addraddress to write to
[in]datadata to be written
[in]counternumber of bytes to be written to flash

Definition at line 95 of file flash.c.

References FMC_WRITE_START_ADDR.

Referenced by flash_write_parameters().

◆ flash_read_parameters()

void flash_read_parameters ( void  )

◆ flash_read_word()

unsigned int flash_read_word ( unsigned int  addr)

read flash word from address

Parameters
[in]addraddress to read from
Return values
dataread from address

Definition at line 114 of file flash.c.

References FMC_WRITE_START_ADDR.

Referenced by flash_read_parameters().

◆ flash_write_parameters()

void flash_write_parameters ( void  )