各位大大~
小弟我在做SLIB功能驗證的時候遇到一個問題
在AT32F413_SLIB_Demo 的 Project_L0 裡面.
當我把 USE_SLIB_FUNCTION 定義打開時
出現了 FLASH->SLIB_CDR0 未定義的問題.
會產生編譯錯誤!!!
不知道各位前輩是怎麼解決的?
下方是 FLASH_Type 的結構.
/**
* @brief FLASH Registers
*/
typedef struct
{
__IO uint32_t ACR;
__IO uint32_t FCKEY;
__IO uint32_t OPTKEYR;
__IO uint32_t STS;
__IO uint32_t CTRL;
__IO uint32_t ADDR;
uint32_t RESERVED0;
__IO uint32_t UOB;
__IO uint32_t WRPRT;
uint32_t RESERVED1[8];
__IO uint32_t FCKEY2;
uint32_t RESERVED2;
__IO uint32_t STS2;
__IO uint32_t CTRL2;
__IO uint32_t ADDR2;
uint32_t RESERVED3[7];
#if defined (AT32F415xx) || defined (AT32F421xx)
__IO uint32_t SLIB_STS0;
__IO uint32_t SLIB_STS1;
__IO uint32_t SLIB_PSW;
__IO uint32_t SLIB_PSW_STS;
__IO uint32_t CRC_AR;
__IO uint32_t CRC_CTRL;
__IO uint32_t CRC_OUTR;
uint32_t RESERVED4[3];
#else
uint32_t RESERVED5[4];
__IO uint32_t FCKEY3;
__IO uint32_t B3SEL;
__IO uint32_t STS3;
__IO uint32_t CTRL3;
__IO uint32_t ADDR3;
__IO uint32_t DA;
#endif
uint32_t RESERVED6[12];
#if defined (AT32F415xx) || defined (AT32F421xx)
uint32_t RESERVED7[6];
#else
__IO uint32_t SLIB_STS0;
__IO uint32_t SLIB_STS1;
__IO uint32_t SLIB_PSW;
__IO uint32_t SLIB_PSW_STS;
__IO uint32_t SLIB_SET_PSW;
__IO uint32_t SLIB_SET_RANGE;
#endif
uint32_t RESERVED8[3];
#if defined (AT32F415xx) || defined (AT32F421xx)
uint32_t RESERVED9[3];
#else
__IO uint32_t SLIB_KEYR;
__IO uint32_t CRC_CTRL;
__IO uint32_t CRC_OUTR;
#endif
#if defined (AT32F415xx) || defined (AT32F421xx)
uint32_t RESERVED10[25];
__IO uint32_t SLIB_SET_PSW;
__IO uint32_t SLIB_SET_RANGE;
__IO uint32_t SYS_SLIB_SET;
__IO uint32_t SYS_BOOT_DIS_SET;
__IO uint32_t SLIB_KEYR;
#endif
} FLASH_Type;
|