1 /** 2 ****************************************************************************** 3 * @file bl616_ef_ctrl.h 4 * @version V1.0 5 * @date 6 * @brief This file is the standard driver header file 7 ****************************************************************************** 8 * @attention 9 * 10 * <h2><center>© COPYRIGHT(c) 2020 Bouffalo Lab</center></h2> 11 * 12 * Redistribution and use in source and binary forms, with or without modification, 13 * are permitted provided that the following conditions are met: 14 * 1. Redistributions of source code must retain the above copyright notice, 15 * this list of conditions and the following disclaimer. 16 * 2. Redistributions in binary form must reproduce the above copyright notice, 17 * this list of conditions and the following disclaimer in the documentation 18 * and/or other materials provided with the distribution. 19 * 3. Neither the name of Bouffalo Lab nor the names of its contributors 20 * may be used to endorse or promote products derived from this software 21 * without specific prior written permission. 22 * 23 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 24 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 25 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 26 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 27 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 28 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 29 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 30 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 31 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 32 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 33 * 34 ****************************************************************************** 35 */ 36 #ifndef __BL616_EF_CTRL_H__ 37 #define __BL616_EF_CTRL_H__ 38 39 #include "ef_ctrl_reg.h" 40 #include "bl616_common.h" 41 42 /** @addtogroup BL616_Peripheral_Driver 43 * @{ 44 */ 45 46 /** @addtogroup EF_CTRL 47 * @{ 48 */ 49 50 /** @defgroup EF_CTRL_Public_Types 51 * @{ 52 */ 53 54 /** 55 * @brief Efuse Ctrl key slot type definition 56 */ 57 typedef enum { 58 EF_CTRL_KEY_SLOT0, /*!< key slot 0 */ 59 EF_CTRL_KEY_SLOT1, /*!< key slot 1 */ 60 EF_CTRL_KEY_SLOT2, /*!< key slot 2 */ 61 EF_CTRL_KEY_SLOT3, /*!< key slot 3 */ 62 EF_CTRL_KEY_SLOT4, /*!< key slot 4 */ 63 EF_CTRL_KEY_SLOT5, /*!< key slot 5 */ 64 EF_CTRL_KEY_MAX, /*!< */ 65 } EF_Ctrl_Key_Type; 66 67 /** 68 * @brief Efuse Ctrl sign type definition 69 */ 70 typedef enum { 71 EF_CTRL_SIGN_NONE, /*!< no sign */ 72 EF_CTRL_SIGN_RSA, /*!< use RSA to sign */ 73 EF_CTRL_SIGN_ECC, /*!< use ECC to sign */ 74 } EF_Ctrl_Sign_Type; 75 76 /** 77 * @brief Efuse Ctrl flash AES type definition 78 */ 79 typedef enum { 80 EF_CTRL_SF_AES_NONE, /*!< No AES */ 81 EF_CTRL_SF_AES_128, /*!< AES 128 */ 82 EF_CTRL_SF_AES_192, /*!< AES 192 */ 83 EF_CTRL_SF_AES_256, /*!< AES 256 */ 84 } EF_Ctrl_SF_AES_Type; 85 86 /** 87 * @brief Efuse Ctrl Dbg type definition 88 */ 89 typedef enum { 90 EF_CTRL_DBG_OPEN = 0, /*!< Open debug */ 91 EF_CTRL_DBG_PASSWORD, /*!< Open debug with password */ 92 EF_CTRL_DBG_CLOSE = 4, /*!< Close debug */ 93 } EF_Ctrl_Dbg_Mode_Type; 94 95 /** 96 * @brief Efuse Ctrl clock type definition 97 */ 98 typedef enum { 99 EF_CTRL_EF_CLK, /*!< Select efuse clock */ 100 EF_CTRL_SAHB_CLK, /*!< Select SAHB clock */ 101 } EF_Ctrl_CLK_Type; 102 103 /** 104 * @brief Efuse Ctrl clock type definition 105 */ 106 typedef enum { 107 EF_CTRL_PARA_DFT, /*!< Select default cyc parameter */ 108 EF_CTRL_PARA_MANUAL, /*!< Select manual cyc parameter */ 109 } EF_Ctrl_CYC_PARA_Type; 110 111 /** 112 * @brief Efuse Ctrl clock type definition 113 */ 114 typedef enum { 115 EF_CTRL_OP_MODE_AUTO, /*!< Select efuse program auto mode */ 116 EF_CTRL_OP_MODE_MANUAL, /*!< Select efuse program manual mode */ 117 } EF_Ctrl_OP_MODE_Type; 118 119 /** 120 * @brief Efuse Ctrl secure configuration structure type definition 121 */ 122 typedef struct 123 { 124 EF_Ctrl_Dbg_Mode_Type ef_dbg_mode; /*!< Efuse debug mode */ 125 uint8_t ef_dbg_jtag_0_dis; /*!< Jtag debug disable config value */ 126 uint8_t ef_dbg_jtag_1_dis; /*!< Jtag debug disable config value */ 127 uint8_t ef_sboot_en; /*!< Secure boot enable config value */ 128 } EF_Ctrl_Sec_Param_Type; 129 130 /** 131 * @brief Efuse analog DcdcDis type definition 132 */ 133 typedef struct 134 { 135 uint32_t dcdcDisAonEn : 1; /*!< Efuse analog dcdc_dis_aon_en */ 136 uint32_t dcdcDisAonParity : 1; /*!< Efuse analog dcdc_dis_aon_parity */ 137 uint32_t dcdcDisAon : 1; /*!< Efuse analog dcdc_dis_aon */ 138 uint32_t reserved : 29; /*!< Efuse analog reserved */ 139 } Efuse_Ana_DcdcDis_Type; 140 141 /** 142 * @brief Efuse analog DcdcVoutSel type definition 143 */ 144 typedef struct 145 { 146 uint32_t dcdcVoutSelAonEn : 1; /*!< Efuse analog dcdc_vout_sel_aon_en */ 147 uint32_t dcdcVoutSelAonParity : 1; /*!< Efuse analog dcdc_vout_sel_aon_parity */ 148 uint32_t dcdcVoutSelAon : 5; /*!< Efuse analog dcdc_vout_sel_aon[4:0] */ 149 uint32_t reserved : 25; /*!< Efuse analog reserved */ 150 } Efuse_Ana_DcdcVoutSel_Type; 151 152 /** 153 * @brief Efuse analog Ldo18ioVoutSel type definition 154 */ 155 typedef struct 156 { 157 uint32_t ldo18ioVoutSelEn : 1; /*!< Efuse analog ldo18io_vout_sel_en */ 158 uint32_t ldo18ioVoutSelParity : 1; /*!< Efuse analog ldo18io_vout_sel_parity */ 159 uint32_t ldo18ioVoutSelAon : 4; /*!< Efuse analog ldo18io_vout_sel_aon[3:0] */ 160 uint32_t reserved : 26; /*!< Efuse analog reserved */ 161 } Efuse_Ana_Ldo18ioVoutSel_Type; 162 163 /** 164 * @brief Efuse analog Ldo18ioBypass type definition 165 */ 166 typedef struct 167 { 168 uint32_t ldo18ioBypassEn : 1; /*!< Efuse analog ldo18io_bypass_en */ 169 uint32_t ldo18ioBypassParity : 1; /*!< Efuse analog ldo18io_bypass_parity */ 170 uint32_t ldo18ioBypassAon : 1; /*!< Efuse analog ldo18io_bypass_aon */ 171 uint32_t reserved : 29; /*!< Efuse analog reserved */ 172 } Efuse_Ana_Ldo18ioBypass_Type; 173 174 /** 175 * @brief Efuse analog Ldo33VoutTrim type definition 176 */ 177 typedef struct 178 { 179 uint32_t ldo33VoutTrimAonEn : 1; /*!< Efuse analog ldo33_vout_trim_aon_en */ 180 uint32_t ldo33VoutTrimAonParity : 1; /*!< Efuse analog ldo33_vout_trim_aon_parity */ 181 uint32_t ldo33VoutTrimAon : 4; /*!< Efuse analog ldo33_vout_trim_aon[3:0] */ 182 uint32_t reserved : 26; /*!< Efuse analog reserved */ 183 } Efuse_Ana_Ldo33VoutTrim_Type; 184 185 /** 186 * @brief Efuse analog Ldo18ioVoutTrim type definition 187 */ 188 typedef struct 189 { 190 uint32_t ldo18ioVoutTrimEn : 1; /*!< Efuse analog ldo18io_vout_trim_en */ 191 uint32_t ldo18ioVoutTrimParity : 1; /*!< Efuse analog ldo18io_vout_trim_parity */ 192 uint32_t ldo18ioVoutTrimAon : 4; /*!< Efuse analog ldo18io_vout_trim_aon[3:0] */ 193 uint32_t reserved : 26; /*!< Efuse analog reserved */ 194 } Efuse_Ana_Ldo18ioVoutTrim_Type; 195 196 /** 197 * @brief Efuse analog DcdcVoutTrim type definition 198 */ 199 typedef struct 200 { 201 uint32_t dcdcVoutTrimAonEn : 1; /*!< Efuse analog dcdc_vout_trim_aon_en */ 202 uint32_t dcdcVoutTrimAonParity : 1; /*!< Efuse analog dcdc_vout_trim_aon_parity */ 203 uint32_t dcdcVoutTrimAon : 4; /*!< Efuse analog dcdc_vout_trim_aon[3:0] */ 204 uint32_t reserved : 26; /*!< Efuse analog reserved */ 205 } Efuse_Ana_DcdcVoutTrim_Type; 206 207 /** 208 * @brief Efuse analog Ldo11socVoutTrim type definition 209 */ 210 typedef struct 211 { 212 uint32_t ldo11socVoutTrimAonEn : 1; /*!< Efuse analog ldo11soc_vout_trim_aon_en */ 213 uint32_t ldo11socVoutTrimAonTrim : 1; /*!< Efuse analog ldo11soc_vout_trim_aon_trim */ 214 uint32_t ldo11socVoutTrimAon : 4; /*!< Efuse analog ldo11soc_vout_trim_aon[3:0] */ 215 uint32_t reserved : 26; /*!< Efuse analog reserved */ 216 } Efuse_Ana_Ldo11socVoutTrim_Type; 217 218 /** 219 * @brief Efuse analog RC32M trim type definition 220 */ 221 typedef struct 222 { 223 uint32_t rc32mCodeFrExt2En : 1; /*!< Efuse analog rc32m_code_fr_ext2_en */ 224 uint32_t rc32mCodeFrExt2Parity : 1; /*!< Efuse analog rc32m_code_fr_ext2_parity */ 225 uint32_t rc32mCodeFrExt2 : 8; /*!< Efuse analog rc32m_code_fr_ext2[7:0] */ 226 uint32_t reserved : 22; /*!< Efuse analog reserved */ 227 } Efuse_Ana_RC32M_Trim_Type; 228 229 /** 230 * @brief Efuse analog RC32K trim type definition 231 */ 232 typedef struct 233 { 234 uint32_t rc32kCodeFrExtEn : 1; /*!< Efuse analog rc32k_code_fr_ext_en */ 235 uint32_t rc32kCodeFrExtParity : 1; /*!< Efuse analog rc32k_code_fr_ext_parity */ 236 uint32_t rc32kCodeFrExt : 10; /*!< Efuse analog rc32k_code_fr_ext[9:0] */ 237 uint32_t reserved : 20; /*!< Efuse analog reserved */ 238 } Efuse_Ana_RC32K_Trim_Type; 239 240 /** 241 * @brief Efuse analog Usb20RcalCode type definition 242 */ 243 typedef struct 244 { 245 uint32_t usb20RcalCodeAonEn : 1; /*!< Efuse analog usb20_rcal_code_aon_en */ 246 uint32_t usb20RcalCodeAonParity : 1; /*!< Efuse analog usb20_rcal_code_aon_parity */ 247 uint32_t usb20RcalCodeAon : 6; /*!< Efuse analog usb20_rcal_code_aon[5:0] */ 248 uint32_t reserved : 24; /*!< Efuse analog reserved */ 249 } Efuse_Ana_Usb20RcalCode_Type; 250 251 /** 252 * @brief Efuse analog TSEN trim type definition 253 */ 254 typedef struct 255 { 256 uint32_t tsenRefcodeCorner : 12; /*!< TSEN refcode */ 257 uint32_t tsenRefcodeCornerParity : 1; /*!< TSEN refcode parity */ 258 uint32_t tsenRefcodeCornerEn : 1; /*!< TSEN refcode enable */ 259 uint32_t tsenRefcodeCornerVersion : 1; /*!< TSEN refcode version */ 260 uint32_t reserved : 17; /*!< TSEN analog trim:reserved */ 261 } Efuse_TSEN_Refcode_Corner_Type; 262 263 /** 264 * @brief Efuse analog ADC Gain trim type definition 265 */ 266 typedef struct 267 { 268 uint32_t adcGainCoeff : 12; /*!< ADC gain coeff */ 269 uint32_t adcGainCoeffParity : 1; /*!< ADC gain coeff parity */ 270 uint32_t adcGainCoeffEn : 1; /*!< ADC gain coeff enable */ 271 uint32_t reserved : 18; /*!< ADC gain coeff:reserved */ 272 } Efuse_ADC_Gain_Coeff_Type; 273 274 /** 275 * @brief Efuse analog device info type definition 276 */ 277 typedef struct 278 { 279 uint32_t rsvd : 22; /*!< Reserved */ 280 uint32_t deviceInfo : 2; /*!< Efuse device information */ 281 uint32_t psramInfo : 2; /*!< Efuse psram info 0:no psram, 1:WB 4MB*/ 282 uint32_t memoryInfo : 3; /*!< Efuse memory info 0:no memory, 8:1MB flash */ 283 uint32_t chipInfo : 3; /*!< Efuse chip revision */ 284 } Efuse_Device_Info_Type; 285 286 /** 287 * @brief Efuse Capcode type definition 288 */ 289 typedef struct 290 { 291 uint32_t capCode : 6; /*!< Cap code value */ 292 uint32_t parity : 1; /*!< Parity of capcode */ 293 uint32_t en : 1; /*!< Enable status */ 294 uint32_t rsvd : 24; /*!< Reserved */ 295 } Efuse_Capcode_Info_Type; 296 297 /** 298 * @brief Efuse common trim config definition 299 */ 300 typedef struct 301 { 302 char *name; /*!< trim anme */ 303 uint16_t en_addr; /*!< enable address */ 304 uint16_t parity_addr; /*!< parity address */ 305 uint16_t value_addr; /*!< value address */ 306 uint16_t value_len; /*!< value length */ 307 } Efuse_Common_Trim_Cfg; 308 309 /** 310 * @brief Efuse common trim type definition 311 */ 312 typedef struct 313 { 314 uint8_t en; /*!< Enable status */ 315 uint8_t parity; /*!< Trim parity */ 316 uint8_t empty; /*!< Trim empty */ 317 uint8_t len; /*!< Trim value len in bit */ 318 uint32_t value; /*!< Trim value */ 319 } Efuse_Common_Trim_Type; 320 321 /*@} end of group EF_CTRL_Public_Types */ 322 323 /** @defgroup EF_CTRL_Public_Constants 324 * @{ 325 */ 326 327 /** @defgroup EF_CTRL_KEY_TYPE 328 * @{ 329 */ 330 #define IS_EF_CTRL_KEY_TYPE(type) (((type) == EF_CTRL_KEY_SLOT0) || \ 331 ((type) == EF_CTRL_KEY_SLOT1) || \ 332 ((type) == EF_CTRL_KEY_SLOT2) || \ 333 ((type) == EF_CTRL_KEY_SLOT3) || \ 334 ((type) == EF_CTRL_KEY_SLOT4) || \ 335 ((type) == EF_CTRL_KEY_SLOT5) || \ 336 ((type) == EF_CTRL_KEY_MAX)) 337 338 /** @defgroup EF_CTRL_SIGN_TYPE 339 * @{ 340 */ 341 #define IS_EF_CTRL_SIGN_TYPE(type) (((type) == EF_CTRL_SIGN_NONE) || \ 342 ((type) == EF_CTRL_SIGN_RSA) || \ 343 ((type) == EF_CTRL_SIGN_ECC)) 344 345 /** @defgroup EF_CTRL_SF_AES_TYPE 346 * @{ 347 */ 348 #define IS_EF_CTRL_SF_AES_TYPE(type) (((type) == EF_CTRL_SF_AES_NONE) || \ 349 ((type) == EF_CTRL_SF_AES_128) || \ 350 ((type) == EF_CTRL_SF_AES_192) || \ 351 ((type) == EF_CTRL_SF_AES_256)) 352 353 /** @defgroup EF_CTRL_DBG_MODE_TYPE 354 * @{ 355 */ 356 #define IS_EF_CTRL_DBG_MODE_TYPE(type) (((type) == EF_CTRL_DBG_OPEN) || \ 357 ((type) == EF_CTRL_DBG_PASSWORD) || \ 358 ((type) == EF_CTRL_DBG_CLOSE)) 359 360 /** @defgroup EF_CTRL_CLK_TYPE 361 * @{ 362 */ 363 #define IS_EF_CTRL_CLK_TYPE(type) (((type) == EF_CTRL_EF_CLK) || \ 364 ((type) == EF_CTRL_SAHB_CLK)) 365 366 /** @defgroup EF_CTRL_CYC_PARA_TYPE 367 * @{ 368 */ 369 #define IS_EF_CTRL_CYC_PARA_TYPE(type) (((type) == EF_CTRL_PARA_DFT) || \ 370 ((type) == EF_CTRL_PARA_MANUAL)) 371 372 /** @defgroup EF_CTRL_OP_MODE_TYPE 373 * @{ 374 */ 375 #define IS_EF_CTRL_OP_MODE_TYPE(type) (((type) == EF_CTRL_OP_MODE_AUTO) || \ 376 ((type) == EF_CTRL_OP_MODE_MANUAL)) 377 378 /*@} end of group EF_CTRL_Public_Constants */ 379 380 /** @defgroup EF_CTRL_Public_Macros 381 * @{ 382 */ 383 #define EF_CTRL_EFUSE_R0_SIZE (128 * 4) 384 385 /*@} end of group EF_CTRL_Public_Macros */ 386 387 /** @defgroup EF_CTRL_Public_Functions 388 * @{ 389 */ 390 /*----------*/ 391 BL_Err_Type EF_Ctrl_Get_Customer_PIDVID(uint16_t pid[1], uint16_t vid[1]); 392 /*----------*/ 393 void EF_Ctrl_Load_Efuse_R0(void); 394 void EF_Ctrl_Program_Efuse_0(void); 395 BL_Sts_Type EF_Ctrl_Busy(void); 396 BL_Sts_Type EF_Ctrl_AutoLoad_Done(void); 397 void EF_Ctrl_Write_Dbg_Pwd(uint8_t slot, uint32_t passWdLow, uint32_t passWdHigh, uint8_t program); 398 void EF_Ctrl_Read_Dbg_Pwd(uint8_t slot, uint32_t *passWdLow, uint32_t *passWdHigh); 399 void EF_Ctrl_Readlock_Dbg_Pwd(uint8_t program); 400 void EF_Ctrl_Writelock_Dbg_Pwd(uint8_t program); 401 void EF_Ctrl_Write_Secure_Cfg(EF_Ctrl_Sec_Param_Type *cfg, uint8_t program); 402 void EF_Ctrl_Read_Secure_Cfg(EF_Ctrl_Sec_Param_Type *cfg); 403 void EF_Ctrl_Write_Secure_Boot(EF_Ctrl_Sign_Type sign[1], EF_Ctrl_SF_AES_Type aes[1], uint8_t program); 404 void EF_Ctrl_Read_Secure_Boot(EF_Ctrl_SF_AES_Type aes[2]); 405 BL_Fun_Type EF_Ctrl_Read_Bus_Remap(void); 406 void EF_Ctrl_Set_sf_key_re_sel(uint8_t ef_sf_key_re_sel); 407 /*----------*/ 408 uint8_t EF_Ctrl_Get_Trim_Parity(uint32_t val, uint8_t len); 409 void EF_Ctrl_Read_DcdcDis_Trim(Efuse_Ana_DcdcDis_Type *trim); 410 void EF_Ctrl_Read_DcdcVoutSel_Trim(Efuse_Ana_DcdcVoutSel_Type *trim); 411 void EF_Ctrl_Read_Ldo18ioVoutSel_Trim(Efuse_Ana_Ldo18ioVoutSel_Type *trim); 412 void EF_Ctrl_Read_Ldo18ioBypass_Trim(Efuse_Ana_Ldo18ioBypass_Type *trim); 413 void EF_Ctrl_Read_Ldo33VoutTrim_Trim(Efuse_Ana_Ldo33VoutTrim_Type *trim); 414 void EF_Ctrl_Read_Ldo18ioVoutTrim_Trim(Efuse_Ana_Ldo18ioVoutTrim_Type *trim); 415 void EF_Ctrl_Read_DcdcVoutTrim_Trim(Efuse_Ana_DcdcVoutTrim_Type *trim); 416 void EF_Ctrl_Read_Ldo11socVoutTrim_Trim(Efuse_Ana_Ldo11socVoutTrim_Type *trim); 417 void EF_Ctrl_Read_RC32M_Trim(Efuse_Ana_RC32M_Trim_Type *trim); 418 void EF_Ctrl_Read_RC32K_Trim(Efuse_Ana_RC32K_Trim_Type *trim); 419 void EF_Ctrl_Read_Usb20RcalCode_Trim(Efuse_Ana_Usb20RcalCode_Type *trim); 420 /*----------*/ 421 void EF_Ctrl_Read_TSEN_Trim(Efuse_TSEN_Refcode_Corner_Type *trim); 422 void EF_Ctrl_Read_ADC_Gain_Trim(Efuse_ADC_Gain_Coeff_Type *trim); 423 void EF_Ctrl_Write_Sw_Usage(uint32_t index, uint32_t usage, uint8_t program); 424 void EF_Ctrl_Read_Sw_Usage(uint32_t index, uint32_t *usage); 425 void EF_Ctrl_Writelock_Sw_Usage(uint32_t index, uint8_t program); 426 void EF_Ctrl_Write_MAC_Address(uint8_t mac[6], uint8_t program); 427 BL_Err_Type EF_Ctrl_Read_MAC_Address(uint8_t mac[6]); 428 BL_Err_Type EF_Ctrl_Read_MAC_Address_Raw(uint8_t mac[7]); 429 BL_Err_Type EF_Ctrl_Read_ZiggBee_MAC_Address(uint8_t mac[8]); 430 void EF_Ctrl_Writelock_MAC_Address(uint8_t program); 431 BL_Err_Type EF_Ctrl_Read_Chip_ID(uint8_t id[8]); 432 void EF_Ctrl_Write_AES_Key(uint8_t index, uint32_t *keyData, uint32_t len, uint8_t program); 433 void EF_Ctrl_Read_AES_Key(uint8_t index, uint32_t *keyData, uint32_t len); 434 void EF_Ctrl_Writelock_AES_Key(uint8_t index, uint8_t program); 435 void EF_Ctrl_Readlock_AES_Key(uint8_t index, uint8_t program); 436 void EF_Ctrl_Program_Direct(uint32_t offset, uint32_t *data, uint32_t len); 437 void EF_Ctrl_Read_Direct(uint32_t offset, uint32_t *data, uint32_t len); 438 void EF_Ctrl_Clear(uint32_t index, uint32_t len); 439 void EF_Ctrl_Crc_Enable(void); 440 BL_Sts_Type EF_Ctrl_Crc_Is_Busy(void); 441 void EF_Ctrl_Crc_Set_Golden(uint32_t goldenValue); 442 BL_Err_Type EF_Ctrl_Crc_Result(void); 443 void EF_Ctrl_Sw_AHB_Clk_0(void); 444 uint8_t EF_Ctrl_Is_All_Bits_Zero(uint32_t val, uint8_t start, uint8_t len); 445 uint8_t EF_Ctrl_Read_FlashDlyCoe(void); 446 447 uint32_t EF_Ctrl_Get_Common_Trim_List(Efuse_Common_Trim_Cfg **trim_list); 448 void EF_Ctrl_Read_Common_Trim(char *name, Efuse_Common_Trim_Type *trim, uint8_t reload); 449 void EF_Ctrl_Write_Common_Trim(char *name, uint32_t value, uint8_t program); 450 451 /*@} end of group EF_CTRL_Public_Functions */ 452 453 /*@} end of group EF_CTRL */ 454 455 /*@} end of group BL616_Peripheral_Driver */ 456 457 #endif /* __BL616_EF_CTRL_H__ */ 458