TMPM4G9  V1.0.0.0
fc.c File Reference
#include <string.h>
#include "fc.h"
#include "txz_sample_def.h"

Macros

#define FC_KCR_KEYCODE   (0xA74A9D23UL)
 
#define FC_BRANK_VALUE   (uint32_t)(0xFFFFFFFFUL)
 
#define FC_MAX_PAGES   (uint8_t)(0x20)
 
#define FC_MAX_BLOCKS   (uint8_t)(0x16)
 
#define FC_MAX_AREAS   (uint8_t)(0x1)
 
#define FC_MAX_DATA_PAGES   (uint8_t)(0x21)
 
#define FC_MAX_DATA_BLOCKS   (uint8_t)(0x8)
 
#define FC_CMD_ADDRESS_MASK   (uint32_t)(0xFFFF0000UL)
 
#define FC_CMD_BC1_ADDR   (0x00000550UL)
 
#define FC_CMD_BC2_ADDR   (0x00000AA0UL)
 
#define FC_AREASEL_EXPECT_AREA0   (uint32_t)(0x00000000UL)
 
#define FC_AREASEL_EXPECT_AREA4   (uint32_t)(0x00000000UL)
 
#define FC_AREASEL_AREA0   (uint32_t)(0x00000007UL)
 
#define FC_AREASEL_AREA4   (uint32_t)(0x00070000UL)
 
#define FC_AREASEL_MASK_AREA0   (uint32_t)(0xFF8F0FF8UL)
 
#define FC_AREASEL_MASK_AREA4   (uint32_t)(0xFF880FFFUL)
 
#define FC_AREASEL_WRITE_MODE   (uint32_t)(0x04000000UL)
 
#define FC_AREASEL4_WRITE_MODE   (uint32_t)(0x40000000UL)
 

Functions

__STATIC_INLINE TXZ_Result fc_enable_areasel4 (void)
 Enables the AREA4. More...
 
__STATIC_INLINE TXZ_Result fc_disable_areasel4 (void)
 Disables the AREA4. More...
 
TXZ_Result fc_verify_check (uint32_t *src_address, uint32_t *dst_address, uint32_t size)
 Verifies data of the Flash ROM. More...
 
TXZ_WorkState fc_get_status (fc_sr0_t status)
 Get the status of the flash auto operation. More...
 
TXZ_Result fc_write_data_flash (uint32_t *src_address, uint32_t *dst_address, uint32_t size)
 Auto write command of the data flash. More...
 
TXZ_Result fc_erase_page_data_flash (fc_data_flash_page_number_t first_page, uint8_t num_of_pages)
 Auro page erase command of the data flash. More...
 
TXZ_Result fc_blank_check_page_data_flash (fc_data_flash_page_number_t first_page, fc_data_flash_page_number_t last_page)
 Checks a blank of the data Flash of specified pages. More...
 
TXZ_Result fc_erase_block_data_flash (fc_data_flash_block_number_t first_block, uint8_t num_of_block)
 Auto block erase command of the data flash. More...
 
TXZ_Result fc_blank_check_block_data_flash (fc_data_flash_block_number_t first_block, fc_data_flash_block_number_t last_block)
 Checks a blank of the data Flash of specified blocks. More...
 
TXZ_Result fc_erase_area_data_flash (fc_data_flash_area_number_t area)
 Auto area erase command of the data flash. More...
 
TXZ_Result fc_blank_check_area_data_flash (fc_data_flash_area_number_t area)
 Checks a blank of the data Flash of specified area. More...