RL78/G23 Data flash使用與之前的RL78系列(如RL78/G13)有所不同,詳細介紹及使用如下:
1. 文件結構
①庫文件
RFDRL78T01sourcecommon 目錄包含文件:
r_rfd_common_api.c, r_rfd_common_control_api.c
RFDRL78T01sourcedataflash目錄包含文件:
r_rfd_data_flash_api.c
RFDRL78T01userown 目錄包含文件:
r_rfd_common_userown.c
②sample文件接口
RFDRL78T01samplecommonsourcecodeflash 目錄包含文件:
sample_control_code_flash.c
RFDRL78T01samplecommonsourcecommon 目錄包含文件:
sample_control_common.c
③所需頭文件
RFDRL78T01include以及RFDRL78T01include fd目錄下所有文件
RFDRL78T01samplecommoninclude目錄下所有文件
RFDRL78T01sampleRL78_G23DFCCRLinclude 目錄sample_config.h
④文件結構如下圖


2. 關鍵函數(shù)API
①初始化R_RFD_FAR_FUNC e_rfd_ret_t R_RFD_Init(uint8_t i_u08_cpu_frequency)
②讀寫使能R_RFD_FAR_FUNC void R_RFD_SetDataFlashAccessMode(e_rfd_df_access_t i_e_df_access)
③模式設定R_RFD_FAR_FUNC e_rfd_ret_t R_RFD_SetFlashMemoryMode(e_rfd_flash_memory_mode_t i_e_flash_mode)
④查空R_RFD_FAR_FUNC void R_RFD_BlankCheckDataFlashReq(uint8_t i_u08_block_number)
⑤等待函數(shù)R_RFD_FAR_FUNC e_sample_ret_t Sample_CheckCFDFSeqEnd(void)
⑥擦除塊R_RFD_FAR_FUNC void R_RFD_EraseDataFlashReq(uint8_t i_u08_block_number)
⑦按地址寫入R_RFD_FAR_FUNC void R_RFD_WriteDataFlashReq(uint32_t i_u32_start_addr, uint8_t __near * inp_u08_write_data)
(**查空,擦除,寫入均需要調用等待函數(shù))
3. 例子運行結果
寫入64字節(jié),開始地址0xf1000

4. 占用空間(默認優(yōu)化)
①庫函數(shù)占用0x165+0x4a=431bytes
②例子接口函數(shù)占用 0xec+0x90=380bytes

-
FlaSh
+關注
關注
10文章
1656瀏覽量
150549 -
Data
+關注
關注
0文章
63瀏覽量
38538 -
RL78
+關注
關注
2文章
119瀏覽量
21841
原文標題:如何使用RL78/G23 DataFlash FDL庫
文章出處:【微信號:瑞薩MCU小百科,微信公眾號:瑞薩MCU小百科】歡迎添加關注!文章轉載請注明出處。
發(fā)布評論請先 登錄
相關推薦
RL78/G23 Lighting Communication Master 評估板快速入門指南

EEPROM Emulation 軟件 RL78 Type 01 用戶手冊 for RL78/G23

RL78/G23 連接 AWS 云與 FreeRTOS RL78/G23-128p 快速原型板 Rev.1.00 入門指南

Renesas Flash Driver RL78 Type 01 用戶手冊 RL78/G23 Rev.1.00

RL78/G23 Lighting Communication Master 評估板快速入門指南

RL78/G23 Lighting Communication Master評估板BoM清單

EEPROM Emulation 軟件 RL78 Type 01 用戶手冊 for RL78/G23

RL78/G23 連接 AWS 云與 FreeRTOS RL78/G23-128p 快速原型板 Rev.1.00 入門指南

Renesas Flash Driver RL78 Type 01 用戶手冊 RL78/G23 Rev.1.00

RL78/G23 SMS電源監(jiān)控應用說明

評論