![]() |
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.
|
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... | |
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().
void flash_program_word | ( | unsigned int | addr, |
unsigned int * | data, | ||
unsigned char | counter | ||
) |
program flash word to address
[in] | addr | address to write to |
[in] | data | data to be written |
[in] | counter | number 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().
void flash_read_parameters | ( | void | ) |
read all parameters from flash
Definition at line 46 of file flash.c.
References angle_pid_handler, flash_read_word(), foc_parameter_available_flag, int32_to_float(), JUDGE_AVAILABLE, PID_Structure_t::kd, PID_Structure_t::ki, PID_Structure_t::kp, machine_angle_offset, phase_sequence, pid_parameter_available_flag, speed_pid_handler, and PID_Structure_t::sum_maximum.
Referenced by main().
unsigned int flash_read_word | ( | unsigned int | addr | ) |
read flash word from address
[in] | addr | address to read from |
data | read from address |
Definition at line 114 of file flash.c.
References FMC_WRITE_START_ADDR.
Referenced by flash_read_parameters().
void flash_write_parameters | ( | void | ) |
program all parameters to flash
Definition at line 26 of file flash.c.
References angle_pid_handler, flash_erase_page(), flash_program_word(), float_to_int32(), PID_Structure_t::kd, PID_Structure_t::ki, PID_Structure_t::kp, machine_angle_offset, phase_sequence, pid_parameter_available_flag, speed_pid_handler, and PID_Structure_t::sum_maximum.
Referenced by main().