ZHCUCQ7A January   2025  – July 2025 F29H850TU , F29H859TU-Q1

 

  1.   1
  2.   摘要
  3.   商标
  4. 1简介
    1. 1.1 与 C28x 的区别
    2. 1.2 函数清单格式
  5. 2F29H85x 闪存 API 概述
    1. 2.1 简介
    2. 2.2 API 概述
    3. 2.3 使用 API
      1. 2.3.1 初始化流程
        1. 2.3.1.1 器件上电后
        2. 2.3.1.2 关于系统频率变化
      2. 2.3.2 使用 API 进行构建
        1. 2.3.2.1 目标库文件
        2. 2.3.2.2 分布文件
      3. 2.3.3 闪存 API 使用的关键事实
  6. 3API 函数
    1. 3.1 初始化函数
      1. 3.1.1 Fapi_initializeAPI()
    2. 3.2 闪存状态机函数
      1. 3.2.1  Fapi_setActiveFlashBank()
      2. 3.2.2  Fapi_setupBankSectorEnable()
      3. 3.2.3  Fapi_issueAsyncCommandWithAddress()
      4. 3.2.4  Fapi_issueBankEraseCommand()
      5. 3.2.5  Fapi_issueProgrammingCommand()
      6. 3.2.6  Fapi_issueAutoEcc512ProgrammingCommand()
      7. 3.2.7  Fapi_issueDataAndEcc512ProgrammingCommand()
      8. 3.2.8  Fapi_issueDataOnly512ProgrammingCommand()
      9. 3.2.9  Fapi_issueEccOnly64ProgrammingCommand()
      10. 3.2.10 Fapi_issueAsyncCommand()
      11. 3.2.11 Fapi_checkFsmForReady()
      12. 3.2.12 Fapi_getFsmStatus()
    3. 3.3 读取函数
      1. 3.3.1 Fapi_doBlankCheck()
      2. 3.3.2 Fapi_doVerify()
      3. 3.3.3 Fapi_doVerifyByByte()
    4. 3.4 信息函数
      1. 3.4.1 Fapi_getLibraryInfo()
    5. 3.5 实用功能
      1. 3.5.1 Fapi_flushPipeline()
      2. 3.5.2 Fapi_calculateEcc()
      3. 3.5.3 Fapi_isAddressEcc()
      4. 3.5.4 Fapi_getUserConfiguration()
      5. 3.5.5 Fapi_setFlashCPUConfiguration()
      6. 3.5.6 Fapi_issueProgBankMode()
  7. 4使用闪存 API 对 SECCFG 和 BANKMGMT 编程
    1. 4.1 BANKMGMT 编程
    2. 4.2 SECCFG 编程
  8. 5所有模式允许的编程范围
  9. 6推荐的 FSM 流程
    1. 6.1 新出厂器件
    2. 6.2 推荐的擦除流程
    3. 6.3 推荐的存储组擦除流程
    4. 6.4 推荐的编程流程
  10. 7参考资料
  11.   A 闪存状态机命令
  12.   B typedef、定义、枚举和结构
    1.     B.1 类型定义
    2.     B.2 定义
    3.     B.3 枚举
      1.      B.3.1 Fapi_FlashProgrammingCommandsType
      2.      B.3.2 Fapi_FlashBankType
      3.      B.3.3 Fapi_FlashStateCommandsType
      4.      B.3.4 Fapi_StatusType
      5.      B.3.5 Fapi_ApiProductionStatusType
      6.      B.3.6 Fapi_BankID
      7.      B.3.7 Fapi_FLCID
      8.      B.3.8 Fapi_BankMode
      9.      B.3.9 Fapi_CPU1BankSwap
      10.      B.3.10 Fapi_CPU3BankSwap
      11.      B.3.11 Fapi_FOTAStatus
      12.      B.3.12 Fapi_SECVALID
      13.      B.3.13 Fapi_BankMgmtAddress
    4.     B.4 结构
      1.      B.4.1 Fapi_FlashStatusWordType
      2.      B.4.2 Fapi_LibraryInfoType
  13.   修订历史记录

Fapi_StatusType

其为包含所有可能返回的状态代码的主类型。

typedef enum
{
   Fapi_Status_Success=0,           /* Function completed successfully */
   Fapi_Status_FsmBusy,             /* FSM is Busy */
   Fapi_Status_FsmReady,            /* FSM is Ready */
   Fapi_Status_AsyncBusy,           /* Async function operation is Busy */
   Fapi_Status_AsyncComplete,       /* Async function operation is Complete */
   Fapi_Error_Fail=500,             /* Generic Function Fail code */
   Fapi_Error_StateMachineTimeout,  /* State machine polling never returned ready and timed out */
   Fapi_Error_OtpChecksumMismatch,  /* Returned if OTP checksum does not match expected value */
   Fapi_Error_InvalidDelayValue,    /* Returned if the Calculated RWAIT value exceeds 15  - Legacy Error */
   Fapi_Error_InvalidHclkValue,     /* Returned if FClk is above max FClk value - FClk is a calculated from HClk and RWAIT/EWAIT */
   Fapi_Error_InvalidCpu,           /* Returned if the specified Cpu does not exist */
   Fapi_Error_InvalidBank,          /* Returned if the specified bank does not exist */
   Fapi_Error_InvalidAddress,       /* Returned if the specified Address does not exist in Flash or OTP */
   Fapi_Error_InvalidReadMode,      /* Returned if the specified read mode does not exist */
   Fapi_Error_AsyncIncorrectDataBufferLength,
   Fapi_Error_AsyncIncorrectEccBufferLength,
   Fapi_Error_AsyncDataEccBufferLengthMismatch,
   Fapi_Error_FeatureNotAvailable,  /* FMC feature is not available on this device */
   Fapi_Error_FlashRegsNotWritable, /* Returned if Flash registers are not writable due to security */
   Fapi_Error_InvalidCPUID          /* Returned if OTP has an invalid CPUID */ 
}  ATTRIBUTE_PACKED Fapi_StatusType;