CI13LC SDK API手册  2.1.1
本手册用于描述CI13LC SDK各个组件和驱动API
函数 | 变量
flash_rw_process.c 文件参考

用于统一管理软件读写flash,避免同硬件读写flash冲突 更多...

#include <stdbool.h>
#include "flash_rw_process.h"
#include "FreeRTOS.h"
#include "task.h"
#include "queue.h"
#include "semphr.h"
#include "status_share.h"
#include "ci_spiflash.h"
#include "ci_dtrflash.h"
#include "ci_scu.h"

函数

void set_asr_run_flag (void)
 设置asr将要启动,之后的flash操作需要通知到dnn 更多...
 
void set_asr_stop_flag (void)
 设置asr停止,之后的flash操作不需要通知到dnn 更多...
 
int32_t flash_ctl_init (void)
 初始化flash管理任务 更多...
 
static void wait_flash_sem (void)
 
static void give_flash_sem (void)
 
int32_t requset_flash_ctl (void)
 请求控制flash 更多...
 
int32_t release_flash_ctl (void)
 解除控制flash 更多...
 
uint32_t xip_read_flash (uint8_t *buf, uint32_t addr, uint32_t size)
 
int32_t post_read_flash (char *buf, uint32_t addr, uint32_t size)
 请求读flash,并等待读取完成 更多...
 
int32_t post_write_flash (char *buf, uint32_t addr, uint32_t size)
 请求写flash,并等待写完成 更多...
 
int32_t post_erase_flash (uint32_t addr, uint32_t size)
 请求擦除flash,并等待擦除完成 更多...
 
_NOINLINE_ int32_t post_read_flash_unique_id (uint8_t *dst_addr)
 请求读flash unique id,并等待读取完成 更多...
 
void flash_init_to_xip (void)
 flash初始化成xip模式 更多...
 
void flash_config_to_normal (void)
 flash从xip模式切换到普通模式 更多...
 
void flash_config_to_xip (void)
 flash从普通模式切换到xip模式 更多...
 

变量

static bool before_asr_run = true
 
SemaphoreHandle_t flash_ctl_xSemaphore = NULL
 

详细描述

用于统一管理软件读写flash,避免同硬件读写flash冲突

版本
2.0
日期
2018-07-10

函数说明

◆ flash_ctl_init()

int32_t flash_ctl_init ( void  )

初始化flash管理任务

注解
this init before task run,maybe other task used these resource

◆ give_flash_sem()

static void give_flash_sem ( void  )
static

◆ release_flash_ctl()

int32_t release_flash_ctl ( void  )

解除控制flash

返回值
RETURN_OK解除成功
RETURN_ERR解除失败

◆ requset_flash_ctl()

int32_t requset_flash_ctl ( void  )

请求控制flash

返回值
RETURN_OK请求成功
RETURN_ERR请求失败

◆ set_asr_run_flag()

void set_asr_run_flag ( void  )

设置asr将要启动,之后的flash操作需要通知到dnn

◆ set_asr_stop_flag()

void set_asr_stop_flag ( void  )

设置asr停止,之后的flash操作不需要通知到dnn

◆ wait_flash_sem()

static void wait_flash_sem ( void  )
static

◆ xip_read_flash()

uint32_t xip_read_flash ( uint8_t *  buf,
uint32_t  addr,
uint32_t  size 
)

变量说明

◆ before_asr_run

bool before_asr_run = true
static

◆ flash_ctl_xSemaphore

SemaphoreHandle_t flash_ctl_xSemaphore = NULL